Adding nemo engine.
[nemo.git] / nemo-impl / src / main / yang / intent-mapping-result.yang
1 /*\r
2  * Copyright (c) 2015 Huawei, Inc. and others. All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 \r
9 module intent-mapping-result {\r
10     yang-version 1;\r
11 \r
12     namespace "urn:opendaylight:params:xml:ns:yang:intent:mapping:result";\r
13     prefix "intent-mapping-result";\r
14 \r
15     import nemo-engine-common {prefix nemo-engine-common;}\r
16     import nemo-common {prefix nemo-common;}\r
17 \r
18     revision "2015-10-10" {\r
19         description\r
20             "Initial revision.";\r
21     }\r
22 \r
23     grouping virtual-resource-instance {\r
24         description\r
25             "Represents the abstract entity of the virtual resource,\r
26              which can be a vport, vnode, vlink or vpath.";\r
27 \r
28         leaf virtual-resource-id {\r
29             description\r
30                 "A unique ID for a virtual resource.";\r
31             type nemo-engine-common:virtual-resource-id;\r
32             mandatory true;\r
33         }\r
34 \r
35         leaf virtual-resource-type {\r
36             description\r
37                 "The type of the virtual resource.";\r
38             type enumeration {\r
39                 enum vport;\r
40                 enum vnode;\r
41                 enum vlink;\r
42                 enum vpath;\r
43             }\r
44         }\r
45 \r
46         leaf virtual-resource-entity-id {\r
47             description\r
48                 "A unique ID for the entity corresponding to\r
49                  the virtual resource.";\r
50             type nemo-engine-common:virtual-resource-entity-id;\r
51         }\r
52 \r
53         leaf parent-virtual-resource-entity-id {\r
54             description\r
55                 "A unique ID for the parent entity corresponding\r
56                  to the virtual resource. If the resource entity\r
57                  is a virtual port, it's parent entity is the\r
58                  virtual node which it belongs to.";\r
59             type nemo-engine-common:virtual-resource-entity-id;\r
60         }\r
61     }\r
62 \r
63     grouping physical-resource-instance {\r
64         description\r
65             "Represents the abstract entity of the physical resource,\r
66              which can be a port, node or path.";\r
67 \r
68         leaf physical-resource-id {\r
69             description\r
70                 "A unique ID for a physical resource.";\r
71             type nemo-engine-common:physical-resource-id;\r
72             mandatory true;\r
73         }\r
74 \r
75         leaf physical-resource-type {\r
76             description\r
77                 "The type of the physical resource.";\r
78             type enumeration {\r
79                 enum port;\r
80                 enum node;\r
81                 enum path;\r
82             }\r
83         }\r
84 \r
85         leaf physical-resource-entity-id {\r
86             description\r
87                 "A unique ID for the entity corresponding to\r
88                  the physical resource.";\r
89             type nemo-engine-common:physical-resource-entity-id;\r
90         }\r
91 \r
92         leaf parent-physical-resource-entity-id {\r
93             description\r
94                 "A unique ID for the parent entity corresponding\r
95                  to the physical resource. If the resource entity\r
96                  is a physical port, it's parent entity is the\r
97                  physical node which it belongs to.";\r
98             type nemo-engine-common:physical-resource-entity-id;\r
99         }\r
100     }\r
101 \r
102     container intent-vn-mapping-results {\r
103         description\r
104             "Contains the intent-vn mapping results of all users.";\r
105 \r
106         list user-intent-vn-mapping {\r
107             description\r
108                 "Represents the intent-vn mapping results of a user.";\r
109 \r
110             key "user-id";\r
111             leaf user-id {\r
112                 description\r
113                     "The user id for the intents that are mapped to\r
114                      the virtual resource.";\r
115                 type nemo-common:user-id;\r
116             }\r
117 \r
118             leaf virtual-network-id {\r
119                 description\r
120                     "The virtual network id of the user.";\r
121                 type nemo-engine-common:virtual-network-id;\r
122             }\r
123 \r
124             list intent-vn-mapping-result {\r
125                 description\r
126                     "Represents a intent-vn mapping result of the user.";\r
127 \r
128                 key "intent-id";\r
129                 leaf intent-id {\r
130                     description\r
131                         "A unique ID for the user intent.";\r
132                     type nemo-common:intent-id;\r
133                 }\r
134 \r
135                 leaf intent-type {\r
136                     description\r
137                         "The type of the user intent.";\r
138                     type enumeration {\r
139                         enum node;\r
140                         enum connection;\r
141                         enum operation;\r
142                     }\r
143                 }\r
144 \r
145                 list virtual-resource {\r
146                     description\r
147                         "The list of virtual resource corresponding to\r
148                          the user intent.";\r
149 \r
150                     key "virtual-resource-id";\r
151                     uses virtual-resource-instance;\r
152 \r
153                     leaf order {\r
154                         description\r
155                             "Specify the order of the virtual resource instance\r
156                              in a sequence list.";\r
157                         type uint32;\r
158                     }\r
159                 }\r
160             }\r
161         }\r
162     }\r
163 \r
164     container vn-pn-mapping-results {\r
165         description\r
166             "Contains the vn-pn mapping results of all users.";\r
167 \r
168         list user-vn-pn-mapping {\r
169             description\r
170                 "Represents the vn-pn mapping results of a user.";\r
171 \r
172             key "virtual-network-id";\r
173             leaf virtual-network-id {\r
174                 description\r
175                     "The virtual network id of the user.";\r
176                 type nemo-engine-common:virtual-network-id;\r
177             }\r
178 \r
179             leaf user-id {\r
180                 description\r
181                     "The user id for the virtual network.";\r
182                 type nemo-common:user-id;\r
183             }\r
184 \r
185             list vn-pn-mapping-result {\r
186                 description\r
187                     "Represents a vn-pn mapping result of the user.";\r
188 \r
189                 key "virtual-resource-entity-id";\r
190                 uses virtual-resource-instance;\r
191 \r
192                 uses physical-resource-instance;\r
193             }\r
194         }\r
195     }\r
196 }\r