blob: 7cde2ec6894f6929d6d18dcb57b357b1231cd5ff [file] [log] [blame]
Gaurav Agrawalf6e60372016-06-02 11:23:03 +05301 module ietf-sd-onos-common-types {
2 namespace "urn:ietf:params:xml:ns:yang:ietf-sd-onos-common-types";
3 prefix types ;
4 /*
5 import ietf-inet-types{
6 prefix inet;
7 }
8 import ietf-yang-types {
9 prefix yang-types;
10 }
11 */
12 organization "";
13 contact "";
14
15 description
16 "Defines common basic types of L3VPN.";
17
18 revision "2015-12-16" {
19 reference "";
20 }
21
22 typedef admin-status {
23 type enumeration {
24 enum admin-up {
25 value 0 ;
26 description "admin up, the operate-status is depend on the real
27 running status ." ;
28 }
29 enum admin-down {
30 value 1 ;
31 description "admin down,the operate-status is forced to down no
32 matter what the real status is" ;
33 }
34 enum config-up {
35 value 2 ;
36 description "the operate-status is forced to up no matter what
37 the real status is." ;
38 }
39 }
40 default admin-up;
41 description
42 "The administration status of the service.";
43 }
44
45 typedef notification-status {
46 type enumeration {
47 enum up {
48 value 0 ;
49 description "up." ;
50 }
51 enum down {
52 value 1 ;
53 description "down." ;
54 }
55 }
56 default up;
57 description
58 "The notification status of the service.";
59 }
60
61 typedef notification-type {
62 type enumeration {
63 enum ne{
64 value 0 ;
65 description "ncd change." ;
66 }
67 enum link{
68 value 1 ;
69 description "link change." ;
70 }
71 enum ltp{
72 value 2 ;
73 description "ltp change." ;
74 }
75 }
76 default ltp;
77 description
78 "The notification-type of the service.";
79 }
80
81 typedef operate-status {
82 type enumeration {
83 enum operate-up {
84 value 0 ;
85 description "operate up." ;
86 }
87 enum operate-down {
88 value 1 ;
89 description "operate down." ;
90 }
91 }
92 default operate-up;
93 description
94 "The operation status of the service.";
95 }
96
97 grouping command-result {
98 description
99 "Reusable container of the result of the command.";
100 container command-result {
101 description
102 "The result of the command.";
103 leaf result {
104 type int8;
105 description
106 "1 : success, 2 : failed, 3 : partly failed" ;
107 }
108 container success-resources {
109 description
110 "The resources those are available." ;
111 list success-resource-list {
112 description
113 "The resource list shows those are available." ;
114 leaf resource-id {
115 type string;
116 description
117 "The available resource id." ;
118 }
119 }
120 }
121 container failed-resources {
122 description
123 "The resources those are failed." ;
124 list failed-resource-list {
125 description
126 "The resources list shows those are failed." ;
127 leaf resource-id {
128 type string;
129 description
130 "The failed resources ids." ;
131 }
132 leaf error-code {
133 type string;
134 description
135 "The error code." ;
136 }
137 }
138 }
139 }
140 }
141 }