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