blob: f82227ba403a96ad0384628c4364e02520ddfbeb [file] [log] [blame]
Sean Condonfae8e662016-12-15 10:25:13 +00001module svc-activation-types {
2
3 /*** NAMESPACE / PREFIX DEFINITION ***/
4
5 namespace "http://www.microsemi.com/svc-activation-types";
6 prefix "sa";
7
8 import ietf-yang-types {
9 prefix yang;
10 revision-date 2013-07-15;
11 }
12
13 import msea-types {
14 prefix msea;
15 revision-date 2016-02-29;
16 }
17
18 import msea-cfm {
19 prefix msea-cfm;
20 revision-date 2016-02-29;
21 }
22 /*** META INFORMATION ***/
23
24 organization
25 "Microsemi Inc., FTD Division";
26
27 contact
28 "Web URL: http://www.microsemi.com/
29 E-mail: info@microsemi.com
30 Postal: Microsemi Corporation Corporate Headquarters
31 One Enterprise Aliso Viejo,
32 CA 92656
33 U.S.A.
34 Phone: +1 949 380 6100
35 Fax: +1 949 215-4996";
36
37 description
38 "This YANG module defines common types that
39 are used in both RFC 2544 and ITU-T Y.1564
40
41 Copyright 2015 Microsemi Inc.
42 All rights reserved.";
43
44 revision "2015-10-27" {
45 description
46 "Initial version - Sean Condon, Microsemi";
47 reference "Initial revision";
48 }
49
50 /*
51 * Typedefs
52 */
53 typedef test-status {
54 type enumeration {
55 enum disabled {
56 value 0;
57 description "Test is disabled";
58 }
59 enum running {
60 value 1;
61 description "Test is running";
62 }
63 enum pending {
64 value 2;
65 description "Test is pending";
66 }
67 enum stopped {
68 value 3;
69 description "Test is stopped";
70 }
71 enum completed {
72 value 4;
73 description "Test is completed";
74 }
75 enum failed {
76 value 5;
77 description "Test is failed";
78 }
79 }
80 description "Enumerated values for the status of a test";
81 }
82
83 typedef frame-size-type {
84 type uint16 {
85 range 64..9600;
86 }
87 description "Frame size in bytes data type";
88 }
89
90 grouping mep-config-attribs {
91 description
92 "Attributes related to the configuration of a MEP";
93
94 leaf maintenance-domain {
95 type leafref {
96 path "/msea-cfm:mef-cfm/msea-cfm:maintenance-domain/msea-cfm:id";
97// msea:xref-module "msea-cfm";
98 }
99 description
100 "A reference to a specific Maintenance Domain.";
101 }
102
103 leaf maintenance-association {
104 type leafref {
105 path "/msea-cfm:mef-cfm/msea-cfm:maintenance-domain[msea-cfm:id=current()/../maintenance-domain]/msea-cfm:maintenance-association/msea-cfm:id";
106// msea:xref-module "msea-cfm";
107 }
108 description
109 "A reference to a specific Maintenance Association.";
110 }
111
112 leaf maintenance-association-end-point {
113 type leafref {
114 path "/msea-cfm:mef-cfm/msea-cfm:maintenance-domain[msea-cfm:id=current()/../maintenance-domain]/msea-cfm:maintenance-association[msea-cfm:id=current()/../maintenance-association]/msea-cfm:maintenance-association-end-point/msea-cfm:mep-identifier";
115// msea:xref-module "msea-cfm";
116 }
117 description
118 "A reference to a specific Maintenance association End Point.";
119 }
120
121
122 leaf remote-mep-id {
123 type leafref {
124 path "/msea-cfm:mef-cfm/msea-cfm:maintenance-domain[msea-cfm:id=current()/../maintenance-domain]/msea-cfm:maintenance-association[msea-cfm:id=current()/../maintenance-association]/msea-cfm:remote-meps";
125// msea:xref-module "msea-cfm";
126 }
127
128 must "current()/../maintenance-association-end-point != current()" {
129 error-message "Remote MEP Id must not be the same as Local MEP Id";
130 error-app-tag "msea-svc-must-01";
131 }
132
133 //mandatory true; //Should not be mandatory in a top level container
134 description "The Id of the remote MEP";
135 }
136 }
137
138 grouping overwrite-pcp-attribs {
139 leaf overwrite-priority {
140 type msea:priority-type;
141 default 0;
142 description
143 "The priority in the MEP's TAG is replaced
144 with this priority if overwrite-pcp is present";
145 }
146 }
147
148 grouping results-header-group {
149 description
150 "Common attributes of a result set.";
151
152 leaf start-time {
153 type yang:date-and-time;
154 mandatory true;
155 description "Time at which the test was started.";
156 }
157
158 leaf end-time {
159 type yang:date-and-time;
160 description "Time at which the test ended.
161 Not specified if test has ended.";
162 }
163
164 leaf test-status {
165 type test-status;
166 mandatory true;
167 description "The status of the test";
168 }
169 }
170
171 grouping notification-group {
172 description "Attributes related to notifications";
173 leaf new-status {
174 type sa:test-status;
175 mandatory true;
176 description "The new status of the test";
177 }
178
179 leaf old-status {
180 type sa:test-status;
181 description "The old status of the test";
182 }
183
184 leaf test-type {
185 type string;
186 mandatory true;
187 description "Name of the test currently being performed";
188 }
189 }
190}