Marc De Leenheer | f20c7fb | 2017-05-05 10:24:41 -0700 | [diff] [blame] | 1 | module org-openroadm-user-mgmt { |
| 2 | namespace "http://org/openroadm/user-mgmt"; |
| 3 | prefix org-openroadm-user-mgmt; |
| 4 | |
| 5 | organization "Open ROADM MSA"; |
| 6 | contact |
| 7 | "OpenROADM.org"; |
| 8 | description |
| 9 | "YANG definitions of user managements. |
| 10 | |
| 11 | Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, |
| 12 | AT&T Intellectual Property. All other rights reserved. |
| 13 | |
| 14 | Redistribution and use in source and binary forms, with or without modification, |
| 15 | are permitted provided that the following conditions are met: |
| 16 | |
| 17 | * Redistributions of source code must retain the above copyright notice, this |
| 18 | list of conditions and the following disclaimer. |
| 19 | * Redistributions in binary form must reproduce the above copyright notice, |
| 20 | this list of conditions and the following disclaimer in the documentation and/or |
| 21 | other materials provided with the distribution. |
| 22 | * Neither the Members of the Open ROADM MSA Agreement nor the names of its |
| 23 | contributors may be used to endorse or promote products derived from this software |
| 24 | without specific prior written permission. |
| 25 | |
| 26 | THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS'' |
| 27 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| 29 | IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT, |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
| 31 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, |
| 32 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 33 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 34 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 35 | POSSIBILITY OF SUCH DAMAGE"; |
| 36 | |
| 37 | revision 2016-10-14 { |
| 38 | description |
| 39 | "Version 1.2"; |
| 40 | } |
| 41 | |
| 42 | grouping user-profile { |
| 43 | list user { |
| 44 | key "name"; |
| 45 | description |
| 46 | "The list of local users configured on this device."; |
| 47 | leaf name { |
| 48 | type string; |
| 49 | description |
| 50 | "The user name string identifying this entry."; |
| 51 | } |
| 52 | leaf password { |
| 53 | type string; |
| 54 | description |
| 55 | "The password for this entry. This shouldn't be in clear text"; |
| 56 | } |
| 57 | leaf group { |
| 58 | type enumeration { |
| 59 | enum "sudo"; |
| 60 | } |
| 61 | description |
| 62 | "The group to which the user is associated to."; |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | rpc chg-password { |
| 68 | input { |
| 69 | leaf currentPassword { |
| 70 | type string; |
| 71 | description |
| 72 | "provide the current password"; |
| 73 | mandatory true; |
| 74 | } |
| 75 | leaf newPassword { |
| 76 | type string; |
| 77 | description |
| 78 | "provide a new password"; |
| 79 | mandatory true; |
| 80 | } |
| 81 | leaf newPasswordConfirm { |
| 82 | type string; |
| 83 | description |
| 84 | "re-enter the new password "; |
| 85 | mandatory true; |
| 86 | } |
| 87 | } |
| 88 | output { |
| 89 | leaf status { |
| 90 | type enumeration { |
| 91 | enum "Successful" { |
| 92 | value 1; |
| 93 | } |
| 94 | enum "Failed" { |
| 95 | value 2; |
| 96 | } |
| 97 | } |
| 98 | mandatory true; |
| 99 | description |
| 100 | "Successful or Failed"; |
| 101 | } |
| 102 | leaf status-message { |
| 103 | type string; |
| 104 | description |
| 105 | "Gives a more detailed reason for success / failure"; |
| 106 | } |
| 107 | } |
| 108 | } |
| 109 | } |