2 * Copyright (c) 2015 Huawei, Inc. and others. All rights reserved.
\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
9 module generic-virtual-network {
\r
12 namespace "urn:opendaylight:params:xml:ns:yang:generic:virtual:network";
\r
13 prefix "generic-vn";
\r
15 import nemo-engine-common {prefix nemo-engine-common;}
\r
16 import generic-physical-network {prefix generic-pn;}
\r
17 import nemo-common {prefix nemo-common;}
\r
18 import ietf-inet-types {
\r
20 revision-date 2010-09-24;
\r
22 import ietf-yang-types {
\r
24 revision-date 2010-09-24;
\r
27 revision "2015-10-10" {
\r
29 "Initial revision.";
\r
32 grouping virtual-port-instance {
\r
34 "Represents a virtual port instance and it's metadata.";
\r
38 "A unique ID for a virtual port.";
\r
39 type nemo-engine-common:virtual-port-id;
\r
45 "The type of a virtual port.";
\r
49 "The virtual port is connected to a external host
\r
50 or network device.";
\r
54 "The virtual port is connected to a virtual node.";
\r
62 "The bandwidth capacity of a virtual port.
\r
68 container external-mac-addresses {
\r
70 "A list of external mac addresses in the layer2 network
\r
71 that connects to the virtual port.";
\r
73 leaf-list external-mac-address {
\r
74 type yang:mac-address;
\r
78 container external-ip-prefixes {
\r
80 "A list of external ip prefixes in the layer3 network
\r
81 that connects to the virtual port.";
\r
83 leaf-list external-ip-prefix {
\r
84 type inet:ip-prefix;
\r
88 list physical-resource-requirement {
\r
90 "A list of physical port attribute requirements
\r
91 for selecting physical port resource.";
\r
93 key "attribute-name";
\r
94 uses generic-pn:attribute-instance;
\r
96 leaf attribute-match-pattern {
\r
98 "The match pattern for an attribute instance.
\r
99 It represents the arithmetic logic.";
\r
102 enum not-less-than;
\r
106 enum not-greater-than;
\r
113 grouping virtual-node-instance {
\r
115 "Represents a virtual node instance and it's metadata.";
\r
119 "A unique ID for a virtual node.";
\r
120 type nemo-engine-common:virtual-node-id;
\r
126 "The type of a virtual node.";
\r
131 enum vloadbalancer;
\r
135 list virtual-port {
\r
137 "A list of ports of a virtual node.";
\r
140 uses virtual-port-instance;
\r
143 list physical-resource-requirement {
\r
145 "A list of physical node attribute requirements
\r
146 for selecting physical node resource.";
\r
148 key "attribute-name";
\r
149 uses generic-pn:attribute-instance;
\r
151 leaf attribute-match-pattern {
\r
153 "The match pattern for an attribute instance.
\r
154 It represents the arithmetic logic.";
\r
157 enum not-less-than;
\r
161 enum not-greater-than;
\r
168 grouping virtual-link-instance {
\r
170 "Represents a virtual link instance and it's metadata.";
\r
174 "A unique ID for a virtual link.";
\r
175 type nemo-engine-common:virtual-link-id;
\r
181 "A unique ID for the source virtual node.";
\r
182 type nemo-engine-common:virtual-node-id;
\r
187 "A unique ID for the source virtual port.";
\r
188 type nemo-engine-common:virtual-port-id;
\r
191 leaf dest-node-id {
\r
193 "A unique ID for the destination virtual node.";
\r
194 type nemo-engine-common:virtual-node-id;
\r
197 leaf dest-port-id {
\r
199 "A unique ID for the destination virtual port.";
\r
200 type nemo-engine-common:virtual-port-id;
\r
205 "The routing metric is used by routing computation.";
\r
211 "The bandwidth capacity of a virtual link.
\r
212 The unit is kbps.";
\r
219 "The packet transfer delay of a virtual link.
\r
220 The unit is millisecond.";
\r
225 leaf delay-requirement {
\r
227 "The packet transfer delay requirement which
\r
228 is specified by the user and used in the virtual
\r
235 grouping virtual-path-instance {
\r
237 "Represents a virtual path instance and it's metadata.";
\r
241 "A unique ID for a virtual path.";
\r
242 type nemo-engine-common:virtual-path-id;
\r
246 list virtual-link {
\r
248 "A list of virtual links which compose the virtual path.";
\r
253 "A unique ID for the virtual link.";
\r
254 type nemo-engine-common:virtual-link-id;
\r
259 "Specify the order of the virtual link instance
\r
260 in a sequence list.";
\r
267 "The routing metric of a virtual path.";
\r
273 "The bandwidth capacity of a virtual path.
\r
274 The unit is kbps.";
\r
281 "The packet transfer delay of a virtual path.
\r
282 The unit is millisecond.";
\r
288 grouping virtual-route-instance {
\r
290 "Represents a route instance in the virtual network.";
\r
294 "A unique ID for the source virtual node.";
\r
295 type nemo-engine-common:virtual-node-id;
\r
298 leaf dest-node-id {
\r
300 "A unique ID for the destination virtual node.";
\r
301 type nemo-engine-common:virtual-node-id;
\r
306 "A unique ID for the virtual path.";
\r
307 type nemo-engine-common:virtual-path-id;
\r
311 grouping virtual-arp-instance {
\r
313 "Represents a arp instance in the virtual network.";
\r
317 "Represents the ip address for an ARP entry.";
\r
318 type inet:ip-address;
\r
323 "Represents the mac address for an ARP entry.";
\r
324 type yang:mac-address;
\r
329 "A unique ID for the virtual node that connects to
\r
330 the host corresponding to the ARP entry.";
\r
331 type nemo-engine-common:virtual-node-id;
\r
336 "A unique ID for the virtual port that connects to
\r
337 the host corresponding to the ARP entry.";
\r
338 type nemo-engine-common:virtual-port-id;
\r
342 container virtual-networks {
\r
344 "Contains all virtual networks that the NEMO engine maintains.";
\r
346 list virtual-network {
\r
348 "A virtual network which a user created.";
\r
353 "A unique ID for a virtual network.";
\r
354 type nemo-engine-common:virtual-network-id;
\r
359 "The user ID for the virtual network.";
\r
360 type nemo-common:user-id;
\r
363 container virtual-nodes {
\r
364 list virtual-node {
\r
366 "All virtual nodes in the virtual network.";
\r
369 uses virtual-node-instance;
\r
373 container virtual-links {
\r
374 list virtual-link {
\r
376 "All virtual links in the virtual network.";
\r
379 uses virtual-link-instance;
\r
383 container virtual-paths {
\r
384 list virtual-path {
\r
386 "All virtual paths in the virtual network.";
\r
389 uses virtual-path-instance;
\r
393 container virtual-routes {
\r
394 list virtual-route {
\r
396 "All virtual routes in the virtual network.";
\r
398 key "src-node-id dest-node-id";
\r
399 uses virtual-route-instance;
\r
403 container virtual-arps {
\r
406 "All virtual ARP entries in the virtual network.";
\r
409 uses virtual-arp-instance;
\r