Upgrade Network model from 2.1 to 4.1
[transportpce.git] / ordmodels / common / src / main / yang / org-openroadm-maintenance@2018-10-19.yang
1 module org-openroadm-maintenance {
2   namespace "http://org/openroadm/maintenance";
3   prefix org-openroadm-mainteance;
4
5   import org-openroadm-resource {
6     prefix org-openroadm-resource;
7     revision-date 2018-10-19;
8   }
9
10   organization
11     "Open ROADM MSA";
12   contact
13     "OpenROADM.org";
14   description
15     "YANG definitions of maintenace operations.
16
17       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
18       AT&T Intellectual Property.  All other rights reserved.
19
20       Redistribution and use in source and binary forms, with or without modification,
21       are permitted provided that the following conditions are met:
22
23       * Redistributions of source code must retain the above copyright notice, this
24         list of conditions and the following disclaimer.
25       * Redistributions in binary form must reproduce the above copyright notice,
26         this list of conditions and the following disclaimer in the documentation and/or
27         other materials provided with the distribution.
28       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
29         contributors may be used to endorse or promote products derived from this software
30         without specific prior written permission.
31
32       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
33       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
34       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
35       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
36       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
37       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
38       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
39       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
40       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41       POSSIBILITY OF SUCH DAMAGE";
42
43   revision 2018-10-19 {
44     description
45       "Version 2.2.1";
46   }
47   revision 2017-12-15 {
48     description
49       "Version 2.2";
50   }
51   revision 2017-09-29 {
52     description
53       "Version 2.1";
54   }
55   revision 2017-07-28 {
56     description
57       "Version 2.0.1 - added revision-date to imports";
58   }
59   revision 2016-10-14 {
60     description
61       "Version 1.2";
62   }
63
64   typedef maintenance-operation {
65     type enumeration {
66       enum "terminalLoopback" {
67         value 1;
68       }
69       enum "facilityLoopback" {
70         value 2;
71       }
72       enum "testSignal" {
73         value 3;
74       }
75     }
76     description
77       "Maintenance Operation.";
78   }
79
80   grouping maintenance {
81     leaf id {
82       type string;
83       mandatory true;
84       description
85         "Uniquely identify maintenance activity";
86     }
87     container resource {
88       description
89         "Resource under maintenance";
90       uses org-openroadm-resource:resource;
91     }
92     leaf operation {
93       type maintenance-operation;
94     }
95   }
96
97   container maintenance-list {
98     description
99       "A list of active maintenance operations. Adding an entry to this list creates an active maintenance operation.  Removing an entry from this terminates a maintenance activity";
100     list maintenance {
101       key "id";
102       uses maintenance;
103     }
104   }
105 }