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-physical-network {
\r
12 namespace "urn:opendaylight:params:xml:ns:yang:generic:physical:network";
\r
13 prefix "generic-pn";
\r
15 import nemo-engine-common {prefix nemo-engine-common;}
\r
16 import ietf-inet-types {
\r
18 revision-date 2010-09-24;
\r
20 import ietf-yang-types {
\r
22 revision-date 2010-09-24;
\r
26 "Represents the generic physical network information model.
\r
27 Each renderer will collect detailed physical network information
\r
28 and fill in this generic model.";
\r
30 revision "2015-10-10" {
\r
32 "Initial revision.";
\r
35 grouping attribute-definition {
\r
37 "Defines an attribute for a physical port or node.";
\r
39 leaf attribute-name {
\r
41 "A name for the attribute.";
\r
42 type nemo-engine-common:attribute-name;
\r
46 leaf attribute-value-type {
\r
48 "The value type for the attribute.";
\r
56 container attribute-match-patterns {
\r
58 "Defines the match patterns of the attribute.";
\r
60 leaf-list attribute-match-pattern {
\r
67 enum not-greater-than;
\r
74 container physical-port-attribute-definitions {
\r
76 "Contains all attribute definitions for the physical port.";
\r
78 list physical-port-attribute-definition {
\r
80 "An attribute definition for the physical port.";
\r
82 key "attribute-name";
\r
83 uses attribute-definition;
\r
87 container physical-node-attribute-definitions {
\r
89 "Contains all attribute definitions for the physical node.";
\r
91 list physical-node-attribute-definition {
\r
93 "An attribute definition for the physical node.";
\r
95 key "attribute-name";
\r
96 uses attribute-definition;
\r
100 grouping attribute-instance {
\r
102 "Represents an attribute instance and it's metadata.";
\r
104 leaf attribute-name {
\r
106 "A name for an attribute instance.";
\r
107 type nemo-engine-common:attribute-name;
\r
111 container attribute-value {
\r
113 "The value of the attribute instance.";
\r
115 leaf string-value {
\r
123 container range-value {
\r
137 grouping physical-port-instance {
\r
139 "Represents a physical port instance and it's metadata.";
\r
143 "A unique ID for a physical port.";
\r
144 type nemo-engine-common:physical-port-id;
\r
150 "The type of a physical port.";
\r
154 "The physical port is connected to a external host
\r
155 or network device.";
\r
159 "The physical port is connected to a physical node.";
\r
167 "The mac address of a physical port.";
\r
168 type yang:mac-address;
\r
174 "The bandwidth capacity of a physical port.
\r
175 The unit is kbps.";
\r
182 "The list of attributes of a physical port.";
\r
184 key "attribute-name";
\r
185 uses attribute-instance;
\r
189 grouping physical-node-instance {
\r
191 "Represents a physical node instance and it's metadata.";
\r
195 "A unique ID for a physical node.";
\r
196 type nemo-engine-common:physical-node-id;
\r
202 "The type of a physical node.";
\r
211 list physical-port {
\r
213 "The list of ports of a physical node.";
\r
216 uses physical-port-instance;
\r
221 "The list of attributes of a physical node.";
\r
223 key "attribute-name";
\r
224 uses attribute-instance;
\r
228 grouping physical-link-instance {
\r
230 "Represents a physical link instance and it's metadata.";
\r
234 "A unique ID for a physical link.";
\r
235 type nemo-engine-common:physical-link-id;
\r
241 "Represents the ID of the source physical node.";
\r
242 type nemo-engine-common:physical-node-id;
\r
247 "Represents the ID of the source physical port.";
\r
248 type nemo-engine-common:physical-port-id;
\r
251 leaf dest-node-id {
\r
253 "Represents the ID of the destination physical node.";
\r
254 type nemo-engine-common:physical-node-id;
\r
257 leaf dest-port-id {
\r
259 "Represents the ID of the destination physical port.";
\r
260 type nemo-engine-common:physical-port-id;
\r
265 "The routing metric is used by routing computation.";
\r
271 "The bandwidth capacity of a physical link.
\r
272 The unit is kbps.";
\r
279 "The packet transfer delay of a physical link.
\r
280 The unit is millisecond.";
\r
287 "The ratio of total lost packet outcomes to
\r
288 total transmitted packets. The unit is percent.";
\r
296 grouping physical-host-instance {
\r
298 "Represents a physical host instance and it's metadata.";
\r
302 "A unique ID for a physical host.";
\r
303 type nemo-engine-common:physical-host-id;
\r
309 "A human-readable name for a physical host.";
\r
310 type nemo-engine-common:physical-host-name;
\r
315 "The mac address of the host.";
\r
316 type yang:mac-address;
\r
320 container ip-addresses {
\r
322 "One or more ip addresses of the host.";
\r
324 leaf-list ip-address {
\r
325 type inet:ip-address;
\r
332 "A unique ID for the physical node that the host connects to.";
\r
333 type nemo-engine-common:physical-node-id;
\r
339 "A unique ID for the physical port that the host connects to.";
\r
340 type nemo-engine-common:physical-port-id;
\r
345 grouping physical-path-instance {
\r
347 "Represents a physical tunnel instance and it's metadata.";
\r
351 "A unique ID for a physical path.";
\r
352 type nemo-engine-common:physical-path-id;
\r
356 list physical-link {
\r
358 "A list of physical links which compose the physical path.";
\r
363 "A unique ID for the physical link.";
\r
364 type nemo-engine-common:physical-link-id;
\r
369 "Specify the order of the physical link instance
\r
370 in a sequence list.";
\r
377 "The routing metric of a physical path.";
\r
383 "The bandwidth capacity of a physical path.
\r
384 The unit is kbps.";
\r
391 "The packet transfer delay of a physical path.
\r
392 The unit is millisecond.";
\r
398 container physical-network {
\r
400 "Contains all physical nodes, links and tunnels
\r
401 in the underlying network.";
\r
403 container physical-nodes {
\r
404 list physical-node {
\r
406 "The list of all physical nodes in the underlying network.";
\r
409 uses physical-node-instance;
\r
413 container physical-links {
\r
414 list physical-link {
\r
416 "The list of all physical links in the underlying network.";
\r
419 uses physical-link-instance;
\r
423 container physical-hosts {
\r
424 list physical-host {
\r
426 "The list of all physical hosts in the underlying network.";
\r
429 uses physical-host-instance;
\r
433 container physical-paths {
\r
434 list physical-path {
\r
436 "The list of all physical tunnels in the underlying network.";
\r
439 uses physical-path-instance;
\r