From 88a64f1982895970346bc673fff146c370009cad Mon Sep 17 00:00:00 2001 From: velandy Date: Wed, 7 Jun 2017 23:32:49 -0400 Subject: [PATCH] All the yang files from SO committed to IM Signed-off-by: velandy --- models/yang/ietf-l2-topology.yang | 578 ++++++++++ models/yang/ietf-network-topology.yang | 257 +++++ models/yang/ietf-network.tailf.yang | 27 + models/yang/ietf-network.yang | 157 +++ models/yang/nsr.tailf.yang | 52 + models/yang/nsr.yang | 1459 ++++++++++++++++++++++++ models/yang/odl-network-topology.yang | 359 ++++++ models/yang/rw-nsd.yang | 57 + models/yang/rw-nsr.tailf.yang | 45 + models/yang/rw-nsr.yang | 436 +++++++ models/yang/rw-topology.yang | 126 ++ models/yang/rw-vlr.yang | 87 ++ models/yang/rw-vnfd.yang | 117 ++ models/yang/rw-vnfr.tailf.yang | 50 + models/yang/rw-vnfr.yang | 324 ++++++ models/yang/vlr.tailf.yang | 37 + models/yang/vlr.yang | 191 ++++ models/yang/vnfr.tailf.yang | 45 + models/yang/vnfr.yang | 569 +++++++++ 19 files changed, 4973 insertions(+) create mode 100644 models/yang/ietf-l2-topology.yang create mode 100644 models/yang/ietf-network-topology.yang create mode 100644 models/yang/ietf-network.tailf.yang create mode 100644 models/yang/ietf-network.yang create mode 100644 models/yang/nsr.tailf.yang create mode 100644 models/yang/nsr.yang create mode 100644 models/yang/odl-network-topology.yang create mode 100644 models/yang/rw-nsd.yang create mode 100644 models/yang/rw-nsr.tailf.yang create mode 100644 models/yang/rw-nsr.yang create mode 100644 models/yang/rw-topology.yang create mode 100644 models/yang/rw-vlr.yang create mode 100644 models/yang/rw-vnfd.yang create mode 100644 models/yang/rw-vnfr.tailf.yang create mode 100644 models/yang/rw-vnfr.yang create mode 100644 models/yang/vlr.tailf.yang create mode 100644 models/yang/vlr.yang create mode 100644 models/yang/vnfr.tailf.yang create mode 100644 models/yang/vnfr.yang diff --git a/models/yang/ietf-l2-topology.yang b/models/yang/ietf-l2-topology.yang new file mode 100644 index 0000000..9f572cb --- /dev/null +++ b/models/yang/ietf-l2-topology.yang @@ -0,0 +1,578 @@ + +/* + * NO RW COPYRIGHT + * + */ + +module ietf-l2-topology { + yang-version 1; + namespace "urn:ietf:params:xml:ns:yang:ietf-l2-topology"; + prefix "l2t"; + + import ietf-network { + prefix "nw"; + } + + import ietf-network-topology { + prefix "nt"; + } + + import ietf-inet-types { + prefix "inet"; + } + + import ietf-yang-types { + prefix "yang"; + } + + organization "TBD"; + contact "I-D Editor: jie.dong@huawei.com"; + + description + "This module defines a basic model for + the layer-2 topology of a network"; + + revision "2015-06-23" { + description "Initial revision"; + reference "draft-ietf-i2rs-l2-network-topology-01"; + } + + /* + * Typedefs + */ + + typedef vlan { + type uint16 { + range "0..4095"; + } + description "VLAN ID"; + } + + typedef trill-nickname { + type uint16; + description "TRILL Nickname"; + } + + typedef flag-type { + type identityref { + base "flag-identity"; + } + description "Base type for flags"; + } + + typedef l2-network-event-type { + type enumeration { + enum "add" { + value 0; + description "An L2 node or link or termination-point + has been added"; + } + enum "remove" { + value 1; + description "An L2 node or link or termination-point + has been removed"; + } + enum "update" { + value 2; + description "An L2 node or link or termination-point + has been updated"; + } + } + description "l2 network event type for notifications"; + } // l2-topology-event-type + + + /* + * Features + */ + + feature VLAN { + description + "Indicates that the system supports the + vlan functions"; + } + + feature QinQ { + description + "Indicates that the system supports the + qinq functions"; + } + + feature PBB { + description + "Indicates that the device supports the + provider-backbone-bridging functions"; + } + + feature VPLS { + description + "Indicates that the device supports the + VPLS functions"; + reference "RFC 4761, RFC 4762"; + } + + feature TRILL { + description + "Indicates that the device supports the + TRILL functions"; + reference "RFC 6325"; + } + + feature VXLAN { + description + "Indicates that the device supports the + VXLAN functions"; + reference "RFC 7348"; + } + + /* + * Identities + */ + identity flag-identity { + description "Base type for flags"; + } + + identity encapsulation-type { + description + "Base identity from which specific encapsulation + types are derived."; + } + + identity eth-encapsulation-type { + base encapsulation-type; + description + "Base identity from which specific ethernet + encapsulation types are derived."; + + } + + identity ethernet { + base eth-encapsulation-type; + description + "native ethernet encapsulation"; + } + + identity vlan { + base eth-encapsulation-type; + description + "vlan encapsulation"; + } + + identity qinq { + base eth-encapsulation-type; + description + "qinq encapsulation"; + } + + identity pbb { + base eth-encapsulation-type; + description + "pbb encapsulation"; + } + + identity trill { + base eth-encapsulation-type; + description + "trill encapsulation"; + } + + identity vpls { + base eth-encapsulation-type; + description + "vpls encapsulation"; + } + + identity vxlan { + base eth-encapsulation-type; + description + "vxlan encapsulation"; + } + + identity frame-relay { + base encapsulation-type; + description + "Frame Relay encapsulation"; + } + + identity ppp { + base encapsulation-type; + description + "PPP encapsulation"; + } + + identity hdlc { + base encapsulation-type; + description + "HDLC encapsulation"; + } + + identity atm { + base encapsulation-type; + description + "Base identity from which specific ATM + encapsulation types are derived."; + + } + + identity pwe3 { + base encapsulation-type; + description + "Base identity from which specific pw + encapsulation types are derived."; + } + + + /* + * Groupings + */ + + + grouping l2-network-type { + description "Identify the topology type to be L2."; + container l2-network { + presence "indicates L2 Network"; + description + "The presence of the container node indicates + L2 Topology"; + } + } + + grouping l2-network-attributes { + description "L2 Topology scope attributes"; + container l2-network-attributes { + description "Containing L2 network attributes"; + leaf name { + type string; + description "Name of the L2 network"; + } + + leaf-list flag { + type flag-type; + description "L2 network flags"; + } + } + } + + grouping l2-node-attributes { + description "L2 node attributes"; + container l2-node-attributes { + description "Containing L2 node attributes"; + leaf name { + type string; + description "Node name"; + } + leaf description { + type string; + description "Node description"; + } + leaf-list management-address { + type inet:ip-address; + description "System management address"; + } + leaf management-vid { + if-feature VLAN; + type vlan; + description "System management VID"; + } + leaf-list nick-name { + if-feature TRILL; + type trill-nickname; + description "Nickname of the RBridge"; + } + leaf-list flag { + type flag-type; + description "Node operational flags"; + } + } + } // grouping l2-node-attributes + + + grouping l2-link-attributes { + description "L2 link attributes"; + container l2-link-attributes { + description "Containing L2 link attributes"; + leaf name { + type string; + description "Link name"; + } + leaf-list flag { + type flag-type; + description "Link flags"; + } + leaf rate { + type decimal64 { + fraction-digits 2; + } + description "Link rate"; + + } + leaf delay { + type uint32; + description "Link delay in microseconds"; + } + leaf-list srlg { + type uint32; + description + "List of Shared Risk Link Groups + this link belongs to."; + } + } + } // grouping l2-link-attributes + + grouping l2-termination-point-attributes { + description "L2 termination point attributes"; + container l2-termination-point-attributes { + description "Containing L2 TP attributes"; + leaf description { + type string; + description "Port description"; + } + + leaf maximum-frame-size { + type uint32; + description "Maximum frame size"; + } + + choice l2-termination-point-type { + description + "Indicates termination-point type + specific attributes"; + case ethernet { + leaf mac-address { + type yang:mac-address; + description "Interface MAC address"; + } + + leaf eth-encapsulation { + type identityref { + base eth-encapsulation-type; + } + description + "Encapsulation type of this + ternimation point."; + } + + leaf port-vlan-id { + if-feature VLAN; + type vlan; + description "Port VLAN ID"; + } + + list vlan-id-name { + if-feature VLAN; + key "vlan-id"; + description "Interface configured VLANs"; + leaf vlan-id { + type vlan; + description "VLAN ID"; + } + leaf vlan-name { + type string; + description "VLAN Name"; + } + } + } //case ethernet + + case legacy { + leaf encapsulation { + type identityref { + base encapsulation-type; + } + description + "Encapsulation type of this termination point."; + } + } //case legacy + + } //choice termination-point-type + + leaf tp-state { + type enumeration { + enum in-use { + value 0; + description + "the termination point is in forwarding state"; + } + enum blocking { + value 1; + description + "the termination point is in blocking state"; + } + enum down { + value 2; + description + "the termination point is in down state"; + } + enum others { + value 3; + description + "the termination point is in other state"; + } + } + config false; + description "State of the termination point"; + } + } + } // grouping l2-termination-point-attributes + +/*** grouping of network/node/link/tp leaf-refs ***/ + + grouping network-ref { + description + "Grouping for an absolute reference to a network topology + instance."; + leaf network-ref { + type leafref { + path "/nw:network/nw:network-id"; + } + description + "An absolute reference to a network topology instance."; + } + } + + grouping link-ref { + description + "Grouping for an absolute reference to a link instance."; + uses network-ref; + leaf link-ref { + type leafref { + path "/nw:network" + +"[nw:network-id = current()/../network-ref]" + +"/nt:link/nt:link-id"; + } + description + "An absolute reference to a link instance."; + } + } + + grouping node-ref { + description + "Grouping for an absolute reference to a node instance."; + uses network-ref; + leaf node-ref { + type leafref { + path "/nw:network" + +"[nw:network-id = current()/../network-ref]" + +"/nw:node/nw:node-id"; + } + description + "An absolute reference to a node instance."; + } + } + + grouping tp-ref { + description + "Grouping for an absolute reference to a termination point."; + uses node-ref; + leaf tp-ref { + type leafref { + path "/nw:network" + +"[nw:network-id = current()/../network-ref]" + +"/nw:node[nw:node-id = current()/../node-ref]" + +"/nt:termination-point/nt:tp-id"; + } + description + "Grouping for an absolute reference to a TP."; + } + } + + + /* + * Data nodes + */ + augment "/nw:network/nw:network-types" { + description + "Introduce new network type for L2 topology"; + uses l2-network-type; + } + + augment "/nw:network" { + /* RIFT-Change: when not to be used yet + when "nw:network-types/l2-network" { + description + "Augmentation parameters apply only for networks + with L2 topology"; + } + */ + description + "Configuration parameters for the L2 network + as a whole"; + uses l2-network-attributes; + } + + augment "/nw:network/nw:node" { + /* RIFT-Change: when not to be used yet + when "../nw:network-types/l2-network" { + description + "Augmentation parameters apply only for networks + with L2 topology"; + } + */ + description + "Configuration parameters for L2 at the node + level"; + uses l2-node-attributes; + } + + augment "/nw:network/nt:link" { + /* RIFT-Change: when not to be used yet + when "/nw:network/nw:network-types/l2-network" { + description + "Augmentation parameters apply only for networks + with L2 topology"; + } + */ + description "Augment L2 topology link information"; + uses l2-link-attributes; + } + + augment "/nw:network/nw:node/nt:termination-point" { + /* RIFT-Change: when not to be used yet + when "/nw:network/nw:network-types/l2-network" { + description + "Augmentation parameters apply only for networks + with L2 topology"; + } + */ + description + "Augment L2 topology termination point configuration"; + uses l2-termination-point-attributes; + } + + /* + * Notifications + */ + + notification l2-node-event { + description "Notification event for L2 node"; + leaf event-type { + type l2-network-event-type; + description "Event type"; + } + uses node-ref; + uses l2-network-type; + uses l2-node-attributes; + } + + notification l2-link-event { + description "Notification event for L2 link"; + leaf event-type { + type l2-network-event-type; + description "Event type"; + } + uses link-ref; + uses l2-network-type; + uses l2-link-attributes; + } + + notification l2-termination-point-event { + description "Notification event for L2 termination point"; + leaf event-type { + type l2-network-event-type; + description "Event type"; + } + uses tp-ref; + uses l2-network-type; + uses l2-termination-point-attributes; + } + +} // module l2-topology diff --git a/models/yang/ietf-network-topology.yang b/models/yang/ietf-network-topology.yang new file mode 100644 index 0000000..e8f7c79 --- /dev/null +++ b/models/yang/ietf-network-topology.yang @@ -0,0 +1,257 @@ + +/* + * NO RW COPYRIGHT + * + */ + +module ietf-network-topology { + yang-version 1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network-topology"; + prefix lnk; + + import ietf-inet-types { + prefix inet; + } + import ietf-network { + prefix nd; + } + + organization "TBD"; + contact + "WILL-BE-DEFINED-LATER"; + description + "This module defines a common base model for network topology, + augmenting the base network model with links to connect nodes, + as well as termination points to terminate links on nodes."; + + revision 2015-06-08 { + description + "Initial revision."; + reference "draft-ietf-i2rs-yang-network-topo-01"; + } + + typedef link-id { + type inet:uri; + description + "An identifier for a link in a topology. + The identifier may be opaque. + The identifier SHOULD be chosen such that the same link in a + real network topology will always be identified through the + same identifier, even if the model is instantiated in + separate datastores. An implementation MAY choose to capture + semantics in the identifier, for example to indicate the type + of link and/or the type of topology that the link is a part + of."; + } + + typedef tp-id { + type inet:uri; + description + "An identifier for termination points on a node. + The identifier may be opaque. + The identifier SHOULD be chosen such that the same TP in a + real network topology will always be identified through the + same identifier, even if the model is instantiated in + separate datastores. An implementation MAY choose to capture + semantics in the identifier, for example to indicate the type + of TP and/or the type of node and topology that the TP is a + part of."; + } + + grouping link-ref { + description + "References a link in a specific network."; + leaf link-ref { + type leafref { + path "/nd:network[nd:network-id=current()/../"+ + "nd:network-ref]/link/link-id"; + } + description + "A type for an absolute reference a link instance. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + uses nd:network-ref; + } + + grouping tp-ref { + description + "References a termination point in a specific node."; + leaf tp-ref { + type leafref { + path "/nd:network[nd:network-id=current()/../"+ + "nd:network-ref]/nd:node[nd:node-id=current()/../"+ + "nd:node-ref]/termination-point/tp-id"; + } + description + "A type for an absolute reference to a termination point. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + uses nd:node-ref; + } + + augment "/nd:network" { + description + "Add links to the network model."; + list link { + key "link-id"; + + description + "A Network Link connects a by Local (Source) node and + a Remote (Destination) Network Nodes via a set of the + nodes' termination points. + As it is possible to have several links between the same + source and destination nodes, and as a link could + potentially be re-homed between termination points, to + ensure that we would always know to distinguish between + links, every link is identified by a dedicated link + identifier. + Note that a link models a point-to-point link, not a + multipoint link. + Layering dependencies on links in underlay topologies are + not represented as the layering information of nodes and of + termination points is sufficient."; + container source { + description + "This container holds the logical source of a particular + link."; + leaf source-node { + type leafref { + // RIFT change: + path "../../../../nd:network/nd:node/nd:node-id"; + } + mandatory true; + description + "Source node identifier, must be in same topology."; + } + leaf source-tp { + type leafref { + // RIFT change: + path "../../../../nd:network/nd:node[nd:node-id=current()/../"+ + "source-node]/termination-point/tp-id"; + } + description + "Termination point within source node that terminates + the link."; + } + } + container destination { + description + "This container holds the logical destination of a + particular link."; + leaf dest-node { + type leafref { + // RIFT change + path "../../../../nd:network/nd:node/nd:node-id"; + } + mandatory true; + description + "Destination node identifier, must be in the same + network."; + } + leaf dest-tp { + type leafref { + // RIFT change: + path "../../../../nd:network/nd:node[nd:node-id=current()/../"+ + "dest-node]/termination-point/tp-id"; + } + description + "Termination point within destination node that + terminates the link."; + } + } + leaf link-id { + type link-id; + description + "The identifier of a link in the topology. + A link is specific to a topology to which it belongs."; + } + list supporting-link { + key "network-ref link-ref"; + description + "Identifies the link, or links, that this link + is dependent on."; + leaf network-ref { + type leafref { + // RIFT change: + path "../../../../nd:network/nd:supporting-network/nd:network-ref"; + } + description + "This leaf identifies in which underlay topology + supporting link is present."; + } + leaf link-ref { + type leafref { + path "/nd:network[nd:network-id=current()/.."+ + "/network-ref]/link/link-id"; + } + description + "This leaf identifies a link which is a part + of this link's underlay. Reference loops, in which + a link identifies itself as its underlay, either + directly or transitively, are not allowed."; + } + } + } + } + augment "/nd:network/nd:node" { + description + "Augment termination points which terminate links. + Termination points can ultimately be mapped to interfaces."; + list termination-point { + key "tp-id"; + description + "A termination point can terminate a link. + Depending on the type of topology, a termination point + could, for example, refer to a port or an interface."; + leaf tp-id { + type tp-id; + description + "Termination point identifier."; + } + list supporting-termination-point { + key "network-ref node-ref tp-ref"; + description + "The leaf list identifies any termination points that + the termination point is dependent on, or maps onto. + Those termination points will themselves be contained + in a supporting node. + This dependency information can be inferred from + the dependencies between links. For this reason, + this item is not separately configurable. Hence no + corresponding constraint needs to be articulated. + The corresponding information is simply provided by the + implementing system."; + leaf network-ref { + type leafref { + // RIFT change: + path "/nd:network/nd:node/nd:supporting-node/nd:network-ref"; + } + description + "This leaf identifies in which topology the + supporting termination point is present."; + } + leaf node-ref { + type leafref { + // RIFT change: + path "/nd:network/nd:node/nd:supporting-node/nd:node-ref"; + } + description + "This leaf identifies in which node the supporting + termination point is present."; + } + leaf tp-ref { + type leafref { + path "/nd:network[nd:network-id=current()/../"+ + "network-ref]/nd:node[nd:node-id=current()/../"+ + "node-ref]/termination-point/tp-id"; + } + description + "Reference to the underlay node, must be in a + different topology"; + } + } + } + } +} diff --git a/models/yang/ietf-network.tailf.yang b/models/yang/ietf-network.tailf.yang new file mode 100644 index 0000000..f531f65 --- /dev/null +++ b/models/yang/ietf-network.tailf.yang @@ -0,0 +1,27 @@ + +/* + * NO RW COPYRIGHT + * + */ + +module ietf-network-annotation +{ + namespace "urn:ietf:params:xml:ns:yang:ietf-network"; + prefix "ietf-network-ann"; + + import tailf-common { + prefix tailf; + } + + import ietf-network { + prefix nd; + } + + tailf:annotate "/nd:network" { + tailf:callpoint rw_callpoint; + } + + tailf:annotate "/nd:network/nd:server-provided" { + tailf:callpoint rw_callpoint; + } +} diff --git a/models/yang/ietf-network.yang b/models/yang/ietf-network.yang new file mode 100644 index 0000000..a059e94 --- /dev/null +++ b/models/yang/ietf-network.yang @@ -0,0 +1,157 @@ + +/* + * NO RW COPYRIGHT + * + */ + +module ietf-network { + yang-version 1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network"; + prefix nd; + + import ietf-inet-types { + prefix inet; + } + + import rw-pb-ext { + prefix "rwpb"; + } + + organization "TBD"; + contact + "WILL-BE-DEFINED-LATER"; + description + "This module defines a common base model for a collection + of nodes in a network. Node definitions s are further used + in network topologies and inventories."; + + revision 2015-06-08 { + description + "Initial revision."; + reference "draft-ietf-i2rs-yang-network-topo-01"; + } + + typedef node-id { + type inet:uri; + description + "Identifier for a node."; + } + + typedef network-id { + type inet:uri; + description + "Identifier for a network."; + } + + grouping network-ref { + description + "Contains the information necessary to reference a network, + for example an underlay network."; + leaf network-ref { + type leafref { + path "/network/network-id"; + } + description + "Used to reference a network, for example an underlay + network."; + } + } + + grouping node-ref { + description + "Contains the information necessary to reference a node."; + leaf node-ref { + type leafref { + path "/network[network-id=current()/../network-ref]"+ + "/node/node-id"; + } + description + "Used to reference a node. + Nodes are identified relative to the network they are + contained in."; + } + uses network-ref; + } + + list network { + config false; + key "network-id"; + description + "Describes a network. + A network typically contains an inventory of nodes, + topological information (augmented through + network-topology model), as well as layering + information."; + container network-types { + description + "Serves as an augmentation target. + The network type is indicated through corresponding + presence containers augmented into this container."; + } + leaf network-id { + type network-id; + description + "Identifies a network."; + } + leaf server-provided { + type boolean; + config false; + description + "Indicates whether the information concerning this + particular network is populated by the server + (server-provided true, the general case for network + information discovered from the server), + or whether it is configured by a client + (server-provided true, possible e.g. for + service overlays managed through a controller)."; + } + list supporting-network { + key "network-ref"; + description + "An underlay network, used to represent layered network + topologies."; + + leaf network-ref { + type leafref { + path "/network/network-id"; + } + description + "References the underlay network."; + } + } + list node { + key "node-id"; + description + "The inventory of nodes of this network."; + leaf node-id { + type node-id; + description + "Identifies a node uniquely within the containing + network."; + } + list supporting-node { + key "network-ref node-ref"; + description + "Represents another node, in an underlay network, that + this node is supported by. Used to represent layering + structure."; + leaf network-ref { + type leafref { + path "../../../supporting-network/network-ref"; + } + description + "References the underlay network that the + underlay node is part of."; + } + leaf node-ref { + type leafref { + path "/network/node/node-id"; + } + description + "References the underlay node itself."; + } + } + } + } +} + diff --git a/models/yang/nsr.tailf.yang b/models/yang/nsr.tailf.yang new file mode 100644 index 0000000..b68872e --- /dev/null +++ b/models/yang/nsr.tailf.yang @@ -0,0 +1,52 @@ + +/* + * + * Copyright 2016 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + +module nsr-annotation +{ + namespace "http://riftio.com/ns/riftware-1.0/nsr-annotation"; + prefix "nsr-ann"; + + import tailf-common { + prefix tailf; + } + + import nsr { + prefix nsr; + } + + tailf:annotate "/nsr:ns-instance-opdata" { + tailf:callpoint rw_callpoint; + } + tailf:annotate "/nsr:exec-ns-service-primitive" { + tailf:actionpoint rw_actionpoint; + } + tailf:annotate "/nsr:exec-scale-out" { + tailf:actionpoint rw_actionpoint; + } + tailf:annotate "/nsr:exec-scale-in" { + tailf:actionpoint rw_actionpoint; + } + tailf:annotate "/nsr:get-ns-service-primitive-values" { + tailf:actionpoint rw_actionpoint; + } + tailf:annotate "/nsr:start-network-service" { + tailf:actionpoint rw_actionpoint; + } +} diff --git a/models/yang/nsr.yang b/models/yang/nsr.yang new file mode 100644 index 0000000..36e03a4 --- /dev/null +++ b/models/yang/nsr.yang @@ -0,0 +1,1459 @@ + +/* + * + * Copyright 2016 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + +module nsr +{ + namespace "urn:ietf:params:xml:ns:yang:nfvo:nsr"; + prefix "nsr"; + + import rw-pb-ext { + prefix "rwpb"; + } + + import vlr { + prefix "vlr"; + } + + import nsd { + prefix "nsd"; + } + + import vnfd { + prefix "vnfd"; + } + + import vnfr { + prefix "vnfr"; + } + + import ietf-inet-types { + prefix "inet"; + } + + import ietf-yang-types { + prefix "yang"; + } + + import mano-types { + prefix "manotypes"; + } + + import rw-sdn { + prefix "rwsdn"; + } + + revision 2015-09-10 { + description + "Initial revision. This YANG file defines + the Network Service Record (NSR)"; + reference + "Derived from earlier versions of base YANG files"; + } + + typedef config-states { + type enumeration { + enum init; + enum configuring; + enum config_not_needed; + enum configured; + enum failed; + } + } + + typedef trigger-type { + type enumeration { + enum ns-primitive; + enum vnf-primitive; + } + } + + grouping cloud-config { + description "List of cloud config parameters"; + + list ssh-authorized-key { + key "key-pair-ref"; + + description "List of authorized ssh keys as part of cloud-config"; + + leaf key-pair-ref { + description "A reference to the key pair entry in the global key pair table"; + type leafref { + path "/nsr:key-pair/nsr:name"; + } + } + } + list user { + key "name"; + + description "List of users to be added through cloud-config"; + leaf name { + description "Name of the user "; + type string; + } + leaf user-info { + description "The user name's real name"; + type string; + } + list ssh-authorized-key { + key "key-pair-ref"; + + description "Used to configure the list of public keys to be injected as part + of ns instantiation"; + + leaf key-pair-ref { + description "A reference to the key pair entry in the global key pair table"; + type leafref { + path "/nsr:key-pair/nsr:name"; + } + } + } + } + } + + list key-pair { + key "name"; + description "Used to configure the list of public keys to be injected as part + of ns instantiation"; + leaf name { + description "Name of this key pair"; + type string; + } + + leaf key { + description "Key associated with this key pair"; + type string; + } + } + + rpc start-network-service { + description "Start the network service"; + input { + leaf name { + mandatory true; + description "Name of the Network Service"; + type string; + } + leaf nsd-ref { + description "Reference to NSR ID ref"; + mandatory true; + type leafref { + path "/nsd:nsd-catalog/nsd:nsd/nsd:id"; + } + } + uses ns-instance-config-params; + } + + output { + leaf nsr-id { + description "Automatically generated parameter"; + type yang:uuid; + } + } + } + + + + container ns-instance-config { + + list nsr { + key "id"; + unique "name"; + + leaf id { + description "Identifier for the NSR."; + type yang:uuid; + } + + leaf name { + description "NSR name."; + type string; + } + + leaf short-name { + description "NSR short name."; + type string; + } + + leaf description { + description "NSR description."; + type string; + } + + leaf admin-status { + description + "This is the administrative status of the NS instance"; + + type enumeration { + enum ENABLED; + enum DISABLED; + } + } + + container nsd { + description "NS descriptor used to instantiate this NS"; + uses nsd:nsd-descriptor; + } + + uses ns-instance-config-params; + } + } + + grouping ns-instance-config-params { + uses manotypes:input-parameter; + + list scaling-group { + description "List of ns scaling group instances"; + key "scaling-group-name-ref"; + + leaf scaling-group-name-ref { + description "name of the scaling group + leafref path ../../nsd/scaling-group-descriptor/name"; + type string; + } + + list instance { + description "The instance of the scaling group"; + key "id"; + leaf id { + description "Scaling group instance uuid"; + type uint16; + } + } + } + + list nsd-placement-group-maps { + description + "Mapping from mano-placement groups construct from NSD to cloud + platform placement group construct"; + + key "placement-group-ref"; + + leaf placement-group-ref { + description "Reference for NSD placement group + leafref path ../../nsd/placement-groups/name"; + type string; + } + uses manotypes:placement-group-input; + } + + list vnfd-placement-group-maps { + description + "Mapping from mano-placement groups construct from VNFD to cloud + platform placement group construct"; + + key "placement-group-ref vnfd-id-ref"; + + leaf vnfd-id-ref { + description + "A reference to a vnfd. This is a + leafref to path: + ../../../../nsd:constituent-vnfd + + [nsr:id = current()/../nsd:id-ref] + + /nsd:vnfd-id-ref + NOTE: confd limitations prevent the use of xpath"; + type yang:uuid; + } + + leaf placement-group-ref { + description + "A reference to VNFD placement group"; + type leafref { + path "/vnfd:vnfd-catalog/vnfd:vnfd[vnfd:id = current()/" + + "../nsr:vnfd-id-ref]/vnfd:placement-groups/vnfd:name"; + } + } + + uses manotypes:placement-group-input; + } + uses cloud-config; + } + + grouping vnffgr { + + list vnffgr { + key "id"; + + leaf id { + description "Identifier for the VNFFGR."; + type yang:uuid; + } + + leaf vnffgd-id-ref { + description "VNFFG descriptor id reference"; + type leafref { + path "/nsr:ns-instance-config/nsr:nsr" + + "[nsr:id=current()/../../ns-instance-config-ref]" + + "/nsr:nsd/nsr:vnffgd/nsr:id"; + } + } + + leaf vnffgd-name-ref { + description "VNFFG descriptor name reference"; + type leafref { + path "/ns-instance-config/nsr" + + "[id=current()/../../ns-instance-config-ref]" + + "/nsd/vnffgd[nsr:id = current()/../vnffgd-id-ref]" + + "/name"; + } + } + + leaf sdn-account { + description + "The SDN account to use when requesting resources for + this vnffgr"; + type leafref { + path "/rwsdn:sdn/rwsdn:account/rwsdn:name"; + } + } + + leaf operational-status { + description + "The operational status of the VNFFGR instance + init : The VNFFGR has just started. + running : The VNFFGR is in running state. + terminate : The VNFFGR is being terminated. + terminated : The VNFFGR is in the terminated state. + failed : The VNFFGR instantiation failed + "; + + type enumeration { + rwpb:enum-type "VnffgrOperationalStatus"; + enum init; + enum running; + enum terminate; + enum terminated; + enum failed; + } + } + + list rsp { + key "id"; + + leaf id { + description + "Identifier for the RSP."; + type yang:uuid; + } + + leaf name { + description + "Name for the RSP"; + type string; + } + + leaf vnffgd-rsp-id-ref { + description + "Identifier for the VNFFG Descriptor RSP reference"; + type leafref { + path "/ns-instance-config/nsr" + + "[id=current()/../../../ns-instance-config-ref]" + + "/nsd/vnffgd" + + "[id=current()/../../vnffgd-id-ref]" + + "/rsp/id"; + } + } + + leaf vnffgd-rsp-name-ref { + description + "Name for the VNFFG Descriptor RSP reference"; + type leafref { + path "/ns-instance-config/nsr:nsr" + + "[id=current()/../../../ns-instance-config-ref]" + + "/nsd/vnffgd" + + "[id=current()/../../vnffgd-id-ref]" + + "/rsp[id=current()/../vnffgd-rsp-id-ref]" + + "/name"; + } + } + + leaf classifier-name { + type string; + } + + leaf path-id { + description + "Unique Identifier for the service path"; + type uint32; + } + + list vnfr-connection-point-ref { + key "hop-number"; + leaf hop-number { + description + "Monotonically increasing number to show service path hop + order"; + type uint8; + } + leaf service-function-type { + description + "Type of Service Function. + NOTE: This needs to map with Service Function Type in ODL to + support VNFFG. Service Function Type is mandatory param in ODL + SFC. This is temporarily set to string for ease of use"; + type string; + } + + leaf member-vnf-index-ref { + type uint64; + } + leaf vnfd-id-ref { + description + "Reference to VNF Descriptor Id"; + type string; + } + leaf vnfr-id-ref { + description + "A reference to a vnfr id"; + type leafref { + path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id"; + } + } + leaf vnfr-name-ref { + description + "A reference to a vnfr name"; + type leafref { + path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name"; + } + } + leaf vnfr-connection-point-ref { + description + "A reference to a vnfr connection point."; + type leafref { + path "/vnfr:vnfr-catalog/vnfr:vnfr" + + "[vnfr:id = current()/../nsr:vnfr-id-ref]" + + "/vnfr:connection-point/vnfr:name"; + } + } + leaf service-index { + description + "Location within the service path"; + type uint8; + } + container connection-point-params { + leaf mgmt-address { + type inet:ip-address; + } + leaf name { + type string; + } + leaf port-id { + rwpb:field-inline "true"; + rwpb:field-string-max 64; + type string; + } + leaf vm-id { + rwpb:field-inline "true"; + rwpb:field-string-max 64; + type string; + } + leaf address { + type inet:ip-address; + } + leaf port { + type inet:port-number; + } + } + + container service-function-forwarder { + leaf name { + description + "Service Function Forwarder name"; + type string; + } + leaf ip-address { + description + "Data Plane IP Address of the SFF"; + type inet:ip-address; + } + leaf port { + description + "Data Plane Port of the SFF"; + type inet:port-number; + } + } + } + } + + list classifier { + key "id"; + + leaf id { + description + "Identifier for the classifier rule."; + type yang:uuid; + } + leaf name { + description + "Name of the classifier."; + type string; + } + leaf rsp-id-ref { + description + "A reference to the RSP."; + type leafref { + path "../../nsr:rsp/nsr:id"; + } + } + leaf rsp-name { + description + "Name for the RSP"; + type string; + } + leaf vnfr-id-ref { + description + "A reference to a vnfr id"; + type leafref { + path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id"; + } + } + leaf vnfr-name-ref { + description + "A reference to a vnfr name"; + type leafref { + path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name"; + } + } + leaf vnfr-connection-point-ref { + description + "A reference to a vnfr connection point."; + type leafref { + path "/vnfr:vnfr-catalog/vnfr:vnfr" + + "[vnfr:id = current()/../nsr:vnfr-id-ref]" + + "/vnfr:connection-point/vnfr:name"; + } + } + leaf port-id { + rwpb:field-inline "true"; + rwpb:field-string-max 64; + type string; + } + leaf vm-id { + rwpb:field-inline "true"; + rwpb:field-string-max 64; + type string; + } + leaf ip-address { + type string; + } + leaf sff-name { + type string; + } + } + } + } + + container ns-instance-opdata { + config false; + + list nsr { + key "ns-instance-config-ref"; + + leaf ns-instance-config-ref { + type leafref { + path "/nsr:ns-instance-config/nsr:nsr/nsr:id"; + } + } + + leaf name-ref { + description "Network service name reference"; + type leafref { + path "/nsr:ns-instance-config/nsr:nsr/nsr:name"; + } + } + + leaf nsd-ref { + description "Network service descriptor id reference"; + type leafref { + path "/ns-instance-config/nsr" + + "[id=current()/../ns-instance-config-ref]" + + "/nsd/id"; + } + } + + leaf nsd-name-ref { + description "Network service descriptor name reference"; + type leafref { + path "/ns-instance-config/nsr" + + "[id=current()/../ns-instance-config-ref]" + + "/nsd/name"; + } + } + + leaf create-time { + description + "Creation timestamp of this Network Service. + The timestamp is expressed as seconds + since unix epoch - 1970-01-01T00:00:00Z"; + + type uint32; + } + + leaf uptime { + description + "Active period of this Network Service. + Uptime is expressed in seconds"; + + type uint32; + } + + list connection-point { + description + "List for external connection points. + Each NS has one or more external connection points. + As the name implies that external connection points + are used for connecting the NS to other NS or to + external networks. Each NS exposes these connection + points to the orchestrator. The orchestrator can + construct network service chains by connecting the + connection points between different NS."; + + key "name"; + leaf name { + description + "Name of the NS connection point."; + type string; + } + + leaf type { + description + "Type of the connection point."; + type manotypes:connection-point-type; + } + } + + list vlr { + key "vlr-ref"; + leaf vlr-ref { + description + "Reference to a VLR record in the VLR catalog"; + type leafref { + path "/vlr:vlr-catalog/vlr:vlr/vlr:id"; + } + } + + + list vnfr-connection-point-ref { + description + "A list of references to connection points."; + key "vnfr-id"; + + leaf vnfr-id { + description "A reference to a vnfr"; + type leafref { + path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id"; + } + } + + leaf connection-point { + description + "A reference to a connection point name in a vnfr"; + type leafref { + path "/vnfr:vnfr-catalog/vnfr:vnfr" + + "[vnfr:id = current()/../nsr:vnfr-id]" + + "/vnfr:connection-point/vnfr:name"; + } + } + } + } + + list constituent-vnfr-ref { + description + "List of VNFRs that are part of this + network service."; + key "vnfr-id"; + + leaf vnfr-id { + description + "Reference to the VNFR id + This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id + But due to confd bug (RIFT-9451), changing to string. + "; + type string; + } + } + + list scaling-group-record { + description "List of scaling group records"; + key "scaling-group-name-ref"; + + leaf scaling-group-name-ref { + description "name of the scaling group"; + type leafref { + path "/ns-instance-config/nsr" + + "[id=current()/../../ns-instance-config-ref]" + + "/nsd/scaling-group-descriptor/name"; + } + } + + list instance { + description "Reference to scaling group instance record"; + key "instance-id"; + leaf instance-id { + description "Scaling group instance id"; + type uint16; + } + + leaf is-default { + description "Flag indicating whether this instance was part of + default scaling group (and thus undeletable)"; + type boolean; + } + + leaf op-status { + description + "The operational status of the NS instance + init : The scaling group has just started. + vnf-init-phase : The VNFs in the scaling group are being instantiated. + running : The scaling group is in running state. + terminate : The scaling group is being terminated. + vnf-terminate-phase : The VNFs in the scaling group are being terminated. + terminated : The scaling group is in the terminated state. + failed : The scaling group instantiation failed. + "; + + type enumeration { + enum init; + enum vnf-init-phase; + enum running; + enum terminate; + enum vnf-terminate-phase; + enum terminated; + enum failed; + } + } + + leaf config-status { + description + "The configuration status of the scaling group instance + configuring : At least one of the VNFs in this scaling group instance + is in configuring state + configured : All the VNFs in this scaling group instance are + configured or config-not-needed state + failed : Configuring this scaling group instance failed + "; + type config-states; + } + + leaf error-msg { + description + "Reason for failure in configuration of this scaling instance"; + type string; + } + + leaf create-time { + description + "Creation timestamp of this scaling group record. + The timestamp is expressed as seconds + since unix epoch - 1970-01-01T00:00:00Z"; + + type uint32; + } + + leaf-list vnfrs { + description "Reference to VNFR within the scale instance"; + type leafref { + path "../../../constituent-vnfr-ref/vnfr-id"; + } + } + } + } + + uses vnffgr; + + leaf operational-status { + description + "The operational status of the NS instance + init : The network service has just started. + vl-init-phase : The VLs in the NS are being instantiated. + vnf-init-phase : The VNFs in the NS are being instantiated. + running : The NS is in running state. + terminate : The NS is being terminated. + vnf-terminate-phase : The NS is terminating the VNFs in the NS. + vl-terminate-phase : The NS is terminating the VLs in the NS. + terminated : The NS is in the terminated state. + failed : The NS instantiation failed. + scaling-out : The NS is scaling out + scaling-in : The NS is scaling in + vl-instantiate : The NS is initiating a new VL + vl-terminate : The NS is terminating a VL + "; + + type enumeration { + enum init; + enum vl-init-phase; + enum vnf-init-phase; + enum running; + enum terminate; + enum vnf-terminate-phase; + enum vl-terminate-phase; + enum terminated; + enum failed; + enum scaling-out; + enum scaling-in; + enum vl-instantiate; + enum vl-terminate; + } + } + + leaf config-status { + description + "The configuration status of the NS instance + configuring: At least one of the VNFs in this instance is in configuring state + configured: All the VNFs in this NS instance are configured or config-not-needed state + "; + type config-states; + } + + list service-primitive { + description + "Network service level service primitives."; + + key "name"; + + leaf name { + description + "Name of the service primitive."; + type string; + } + + list parameter { + description + "List of parameters for the service primitive."; + + key "name"; + uses manotypes:primitive-parameter; + } + + uses manotypes:ui-primitive-group; + + list vnf-primitive-group { + description + "List of service primitives grouped by VNF."; + + key "member-vnf-index-ref"; + leaf member-vnf-index-ref { + description + "Reference to member-vnf within constituent-vnfds"; + type uint64; + } + + leaf vnfd-id-ref { + description + "A reference to a vnfd. This is a + leafref to path: + ../../../../nsd:constituent-vnfd + + [nsd:id = current()/../nsd:id-ref] + + /nsd:vnfd-id-ref + NOTE: confd limitations prevent the use of xpath"; + + type string; + } + + leaf vnfd-name { + description + "Name of the VNFD"; + type string; + } + + list primitive { + key "index"; + + leaf index { + description "Index of this primitive"; + type uint32; + } + + leaf name { + description "Name of the primitive in the VNF primitive "; + type string; + } + } + } + + leaf user-defined-script { + description + "A user defined script."; + type string; + } + } + + list initial-config-primitive { + rwpb:msg-new NsrInitialConfigPrimitive; + description + "Initial set of configuration primitives for NSD."; + key "seq"; + leaf seq { + description + "Sequence number for the configuration primitive."; + type uint64; + } + + leaf name { + description + "Name of the configuration primitive."; + type string; + mandatory "true"; + } + + leaf user-defined-script { + description + "A user defined script."; + type string; + } + + list parameter { + description + "List of parameters for the initial config primitive"; + key "name"; + leaf name { + description "Name of the intitial config parameter"; + type string; + } + + leaf value { + description "Value associated with the initial config + parameter"; + type string; + } + } + } + + + list monitoring-param { + description + "List of NS level params."; + key "id"; + + uses manotypes:monitoring-param-value; + uses manotypes:monitoring-param-ui-data; + uses manotypes:monitoring-param-aggregation; + + leaf id { + type string; + } + + leaf name { + type string; + } + + leaf nsd-mon-param-ref { + description "Reference to the NSD monitoring param descriptor + that produced this result"; + type leafref { + path "/nsd:nsd-catalog/nsd:nsd[nsd:id = current()/" + + "../../nsr:nsd-ref]/nsd:monitoring-param/nsd:id"; + } + } + + list vnfr-mon-param-ref { + description "A list of VNFR monitoring params associated with this monp"; + key "vnfr-id-ref vnfr-mon-param-ref"; + + leaf vnfr-id-ref { + description + "A reference to a vnfr. This is a + leafref to path: + /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id"; + + type yang:uuid; + } + + leaf vnfr-mon-param-ref { + description "A reference to the VNFR monitoring param"; + type leafref { + path "/vnfr:vnfr-catalog/vnfr:vnfr" + + "[vnfr:id = current()/../nsr:vnfr-id-ref]" + + "/vnfr:monitoring-param/vnfr:id"; + } + } + } + } + + list config-agent-job { + key "job-id"; + + leaf job-id { + description "config agent job Identifier for the NS."; + type uint64; + } + + leaf job-name { + description "Config agent job name"; + type string; + } + + leaf job-status { + description + "Job status to be set based on each VNF primitive execution, + pending - if at least one VNF is in pending state + and remaining VNFs are in success state. + Success - if all VNF executions are in success state + failure - if one of the VNF executions is failure"; + type enumeration { + enum pending; + enum success; + enum failure; + } + } + + leaf triggered-by { + description "The primitive is triggered from NS or VNF level"; + type trigger-type; + } + + leaf create-time { + description + "Creation timestamp of this Config Agent Job. + The timestamp is expressed as seconds + since unix epoch - 1970-01-01T00:00:00Z"; + + type uint32; + } + + leaf job-status-details { + description "Config agent job status details, in case of errors"; + type string; + } + + uses manotypes:primitive-parameter-value; + + list parameter-group { + description + "List of NS Primitive parameter groups"; + key "name"; + leaf name { + description + "Name of the parameter."; + type string; + } + + uses manotypes:primitive-parameter-value; + } + + list vnfr { + key "id"; + leaf id { + description "Identifier for the VNFR."; + type yang:uuid; + } + leaf vnf-job-status { + description + "Job status to be set based on each VNF primitive execution, + pending - if at least one primitive is in pending state + and remaining primitives are in success state. + Success - if all primitive executions are in success state + failure - if one of the primitive executions is failure"; + type enumeration { + enum pending; + enum success; + enum failure; + } + } + + list primitive { + key "name"; + leaf name { + description "the name of the primitive"; + type string; + } + + uses manotypes:primitive-parameter-value; + + leaf execution-id { + description "Execution id of the primitive"; + type string; + } + leaf execution-status { + description "status of the Execution"; + type enumeration { + enum pending; + enum success; + enum failure; + } + } + leaf execution-error-details { + description "Error details if execution-status is failure"; + type string; + } + } + } + } + } + } + + rpc get-ns-service-primitive-values { + description "Get the service primitive parameter values"; + input { + leaf nsr_id_ref { + description "Reference to NSR ID ref"; + mandatory true; + type leafref { + path "/nsr:ns-instance-config/nsr:nsr/nsr:id"; + } + } + + leaf name { + description "Name of the NS service primitive group"; + mandatory true; + type string; + } + } + + output { + list ns-parameter { + description "Automatically generated parameter"; + key "name"; + + leaf name { + description "Parameter name which should be pulled from a parameter pool"; + type string; + } + leaf value { + description "Automatically generated value"; + type string; + } + } + + list ns-parameter-group { + description "Automatically generated parameters in parameter group"; + key "name"; + leaf name { + description "Parameter group name"; + type string; + } + list parameter { + description "Automatically generated group parameter"; + key "name"; + + leaf name { + description "Parameter name which should be pulled from a parameter pool"; + type string; + } + leaf value { + description "Automatically generated value"; + type string; + } + } + } + + list vnf-primitive-group { + description + "List of service primitives grouped by VNF."; + + key "member-vnf-index-ref"; + leaf member-vnf-index-ref { + description + "Reference to member-vnf within constituent-vnfds"; + type uint64; + } + + leaf vnfd-id-ref { + description + "A reference to a vnfd. This is a + leafref to path: + ../../../../nsd:constituent-vnfd + + [nsd:id = current()/../nsd:id-ref] + + /nsd:vnfd-id-ref + NOTE: confd limitations prevent the use of xpath"; + + type string; + } + + list primitive { + key "index"; + leaf index { + description "Index of this primitive"; + type uint32; + } + + leaf name { + description "Name of the primitive associated with a value pool"; + type string; + } + + list parameter { + description "Automatically generated parameter"; + key "name"; + + leaf name { + description "Parameter name which should be pulled from a parameter pool"; + type string; + } + leaf value { + description "Automatically generated value"; + type string; + } + } + } + } + } + } + + rpc exec-ns-service-primitive { + description "Executes a NS service primitive or script"; + + input { + leaf name { + description "Name of the primitive"; + type string; + } + + leaf nsr_id_ref { + description "Reference to NSR ID ref"; + type leafref { + path "/nsr:ns-instance-config/nsr:nsr/nsr:id"; + } + } + + leaf triggered-by { + description "The primitive is triggered from NS or VNF level"; + type trigger-type; + default ns-primitive; + } + + uses manotypes:primitive-parameter-value; + + list parameter-group { + description + "List of NS Primitive parameter groups"; + key "name"; + leaf name { + description + "Name of the parameter."; + type string; + } + + uses manotypes:primitive-parameter-value; + } + + list vnf-list { + description + "List of VNFs whose primitives are being set."; + key "member_vnf_index_ref"; + + leaf member_vnf_index_ref { + description "Member VNF index"; + type uint64; + } + + leaf vnfr-id-ref { + description + "A reference to a vnfr. This is a + leafref to path"; + type yang:uuid; + } + + list vnf-primitive { + description + "List of service primitives supported by the + configuration agent for this VNF."; + key "index"; + + leaf index { + description + "index of the service primitive."; + type uint32; + } + leaf name { + description + "Name of the service primitive."; + type string; + } + + uses manotypes:primitive-parameter-value; + } + } + leaf user-defined-script { + description + "A user defined script."; + type string; + } + } + output { + leaf job-id { + description "Job identifier for this RPC"; + type uint64; + } + + leaf name { + description "Name of the service primitive"; + type string; + } + + leaf nsr_id_ref { + description "Reference to NSR ID ref"; + type leafref { + path "/nsr:ns-instance-config/nsr:nsr/nsr:id"; + } + } + + leaf triggered-by { + description "The primitive is triggered from NS or VNF level"; + type trigger-type; + } + + leaf create-time { + description + "Creation timestamp of this config agent JOB. + The timestamp is expressed as seconds + since unix epoch - 1970-01-01T00:00:00Z"; + + type uint32; + } + + leaf job-status-details { + description "Job status details, in case of any errors"; + type string; + } + + uses manotypes:primitive-parameter-value; + + list parameter-group { + description + "List of NS Primitive parameter groups"; + key "name"; + leaf name { + description + "Name of the parameter."; + type string; + } + + uses manotypes:primitive-parameter-value; + } + + list vnf-out-list { + description + "List of VNFs whose primitives were set."; + key "member_vnf_index_ref"; + + leaf member_vnf_index_ref { + description "Member VNF index"; + type uint64; + } + leaf vnfr-id-ref { + description + "A reference to a vnfr. This is a + leafref to path"; + type yang:uuid; + } + + list vnf-out-primitive { + description + "List of service primitives supported by the + configuration agent for this VNF."; + key "index"; + + leaf index { + description + "index of the service primitive."; + type uint32; + } + + leaf name { + description + "Name of the service primitive."; + type string; + } + + uses manotypes:primitive-parameter-value; + + leaf execution-id { + description "Execution id of this primitive"; + type string; + } + + leaf execution-status { + description "Status of the execution of this primitive"; + type string; + } + + leaf execution-error-details { + description "Error details if execution-status is failed"; + type string; + } + } + } + } + } + + rpc exec-scale-in { + description "Executes scale out request"; + + input { + + leaf nsr-id-ref { + description "Reference to NSR ID ref"; + type leafref { + path "/nsr:ns-instance-config/nsr:nsr/nsr:id"; + } + } + + leaf scaling-group-name-ref { + description "name of the scaling group"; + type string; + } + + leaf instance-id { + description "id of the scaling group"; + type uint64; + } + + + } + output { + leaf instance-id { + description "id of the scaling group"; + type uint64; + } + } + } + + rpc exec-scale-out { + description "Executes scale out request"; + + input { + + leaf nsr-id-ref { + description "Reference to NSR ID ref"; + type leafref { + path "/nsr:ns-instance-config/nsr:nsr/nsr:id"; + } + } + + leaf scaling-group-name-ref { + description "name of the scaling group"; + type string; + } + + leaf instance-id { + description "id of the scaling group"; + type uint64; + } + + } + output { + leaf instance-id { + description "id of the scaling group"; + type uint64; + } + } + } + +} diff --git a/models/yang/odl-network-topology.yang b/models/yang/odl-network-topology.yang new file mode 100644 index 0000000..9c7101d --- /dev/null +++ b/models/yang/odl-network-topology.yang @@ -0,0 +1,359 @@ + +/* + * + * Copyright 2016 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + +module odl-network-topology { + yang-version 1; + namespace "urn:TBD:params:xml:ns:yang:network-topology"; + // replace with IANA namespace when assigned + prefix "nt"; + + import ietf-inet-types { prefix "inet"; } + + organization "TBD"; + + contact "WILL-BE-DEFINED-LATER"; + + description + "This module defines a model for the topology of a network. + Key design decisions are as follows: + A topology consists of a set of nodes and links. + Links are point-to-point and unidirectional. + Bidirectional connections need to be represented through + two separate links. + Multipoint connections, broadcast domains etc can be represented + through a hierarchy of nodes, then connecting nodes at + upper layers of the hierarchy."; + + revision 2013-10-21 { + description + "Initial revision."; + } + + typedef topology-id { + type inet:uri; + description + "An identifier for a topology."; + } + + typedef node-id { + type inet:uri; + description + "An identifier for a node in a topology. + The identifier may be opaque. + The identifier SHOULD be chosen such that the same node in a + real network topology will always be identified through the + same identifier, even if the model is instantiated in separate + datastores. An implementation MAY choose to capture semantics + in the identifier, for example to indicate the type of node + and/or the type of topology that the node is a part of."; + } + + + typedef link-id { + type inet:uri; + description + "An identifier for a link in a topology. + The identifier may be opaque. + The identifier SHOULD be chosen such that the same link in a + real network topology will always be identified through the + same identifier, even if the model is instantiated in separate + datastores. An implementation MAY choose to capture semantics + in the identifier, for example to indicate the type of link + and/or the type of topology that the link is a part of."; + } + + typedef tp-id { + type inet:uri; + description + "An identifier for termination points on a node. + The identifier may be opaque. + The identifier SHOULD be chosen such that the same TP in a + real network topology will always be identified through the + same identifier, even if the model is instantiated in separate + datastores. An implementation MAY choose to capture semantics + in the identifier, for example to indicate the type of TP + and/or the type of node and topology that the TP is a part of."; + } + + typedef tp-ref { + type leafref { + path "/network-topology/topology/node/termination-point/tp-id"; + } + description + "A type for an absolute reference to a termination point. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + typedef topology-ref { + type leafref { + path "/network-topology/topology/topology-id"; + } + description + "A type for an absolute reference a topology instance."; + } + + typedef node-ref { + type leafref { + path "/network-topology/topology/node/node-id"; + } + description + + "A type for an absolute reference to a node instance. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + + typedef link-ref { + type leafref { + path "/network-topology/topology/link/link-id"; + } + description + "A type for an absolute reference a link instance. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + + grouping tp-attributes { + description + "The data objects needed to define a termination point. + (This only includes a single leaf at this point, used + to identify the termination point.) + Provided in a grouping so that in addition to the datastore, + the data can also be included in notifications."; + leaf tp-id { + type tp-id; + } + leaf-list tp-ref { + type tp-ref; + config false; + description + "The leaf list identifies any termination points that the + termination point is dependent on, or maps onto. + Those termination points will themselves be contained + in a supporting node. + This dependency information can be inferred from + the dependencies between links. For this reason, + this item is not separately configurable. Hence no + corresponding constraint needs to be articulated. + The corresponding information is simply provided by the + implementing system."; + } + } + + grouping node-attributes { + description + "The data objects needed to define a node. + The objects are provided in a grouping so that in addition to + the datastore, the data can also be included in notifications + as needed."; + + leaf node-id { + type node-id; + description + "The identifier of a node in the topology. + A node is specific to a topology to which it belongs."; + } + list supporting-node { + description + "This list defines vertical layering information for nodes. + It allows to capture for any given node, which node (or nodes) + in the corresponding underlay topology it maps onto. + A node can map to zero, one, or more nodes below it; + accordingly there can be zero, one, or more elements in the list. + If there are specific layering requirements, for example + specific to a particular type of topology that only allows + for certain layering relationships, the choice + below can be augmented with additional cases. + A list has been chosen rather than a leaf-list in order + to provide room for augmentations, e.g. for + statistics or priorization information associated with + supporting nodes."; + // This is not what was published in the initial draft, + // added topology-ref leaf and added it to the key + key "topology-ref node-ref"; + leaf topology-ref { + type topology-ref; + } + leaf node-ref { + type node-ref; + } + } + } + + grouping link-attributes { + // This is a grouping, not defined inline with the link definition itself, + // so it can be included in a notification, if needed + leaf link-id { + type link-id; + description + "The identifier of a link in the topology. + A link is specific to a topology to which it belongs."; + } + container source { + leaf source-node { + mandatory true; + type node-ref; + description + "Source node identifier, must be in same topology."; + } + leaf source-tp { + type tp-ref; + description + "Termination point within source node that terminates the link."; + + } + } + container destination { + leaf dest-node { + mandatory true; + type node-ref; + description + "Destination node identifier, must be in same topology."; + } + leaf dest-tp { + type tp-ref; + description + "Termination point within destination node that terminates the link."; + } + } + list supporting-link { + key "link-ref"; + leaf link-ref { + type link-ref; + } + } + } + + + container network-topology { + list topology { + description " + This is the model of an abstract topology. + A topology contains nodes and links. + Each topology MUST be identified by + unique topology-id for reason that a network could contain many + topologies. + "; + key "topology-id"; + leaf topology-id { + type topology-id; + description " + It is presumed that a datastore will contain many topologies. To + distinguish between topologies it is vital to have UNIQUE + topology identifiers. + "; + } + leaf server-provided { + type boolean; + config false; + description " + Indicates whether the topology is configurable by clients, + or whether it is provided by the server. This leaf is + + populated by the server implementing the model. + It is set to false for topologies that are created by a client; + it is set to true otherwise. If it is set to true, any + attempt to edit the topology MUST be rejected. + "; + } + container topology-types { + description + "This container is used to identify the type, or types + (as a topology can support several types simultaneously), + of the topology. + Topology types are the subject of several integrity constraints + that an implementing server can validate in order to + maintain integrity of the datastore. + Topology types are indicated through separate data nodes; + the set of topology types is expected to increase over time. + To add support for a new topology, an augmenting module + needs to augment this container with a new empty optional + container to indicate the new topology type. + The use of a container allows to indicate a subcategorization + of topology types. + The container SHALL NOT be augmented with any data nodes + that serve a purpose other than identifying a particular + topology type. + "; + } + list underlay-topology { + key "topology-ref"; + leaf topology-ref { + type topology-ref; + } + // a list, not a leaf-list, to allow for potential augmentation + // with properties specific to the underlay topology, + // such as statistics, preferences, or cost. + description + "Identifies the topology, or topologies, that this topology + is dependent on."; + } + + list node { + description "The list of network nodes defined for the topology."; + key "node-id"; + uses node-attributes; + must "boolean(../underlay-topology[*]/node[./supporting-nodes/node-ref])"; + // This constraint is meant to ensure that a referenced node is in fact + // a node in an underlay topology. + list termination-point { + description + + "A termination point can terminate a link. + Depending on the type of topology, a termination point could, + for example, refer to a port or an interface."; + key "tp-id"; + uses tp-attributes; + } + } + + list link { + description " + A Network Link connects a by Local (Source) node and + a Remote (Destination) Network Nodes via a set of the + nodes' termination points. + As it is possible to have several links between the same + source and destination nodes, and as a link could potentially + be re-homed between termination points, to ensure that we + would always know to distinguish between links, every link + is identified by a dedicated link identifier. + Note that a link models a point-to-point link, not a multipoint + link. + Layering dependencies on links in underlay topologies are + not represented as the layering information of nodes and of + termination points is sufficient. + "; + key "link-id"; + uses link-attributes; + must "boolean(../underlay-topology/link[./supporting-link])"; + // Constraint: any supporting link must be part of an underlay topology + must "boolean(../node[./source/source-node])"; + // Constraint: A link must have as source a node of the same topology + must "boolean(../node[./destination/dest-node])"; + // Constraint: A link must have as source a destination of the same topology + must "boolean(../node/termination-point[./source/source-tp])"; + // Constraint: The source termination point must be contained in the source node + must "boolean(../node/termination-point[./destination/dest-tp])"; + // Constraint: The destination termination point must be contained + // in the destination node + } + } + } +} diff --git a/models/yang/rw-nsd.yang b/models/yang/rw-nsd.yang new file mode 100644 index 0000000..4475928 --- /dev/null +++ b/models/yang/rw-nsd.yang @@ -0,0 +1,57 @@ + +/* + * + * Copyright 2016 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + +module rw-nsd +{ + namespace "http://riftio.com/ns/riftware-1.0/rw-nsd"; + prefix "rw-nsd"; + + import nsd { + prefix "nsd"; + } + + import ietf-yang-types { + prefix "yang"; + } + + import mano-types { + prefix "manotypes"; + } + + revision 2015-09-10 { + description + "Initial revision. This YANG file augments + the base MANO NSD"; + reference + "Derived from earlier versions of base YANG files"; + } + + augment /nsd:nsd-catalog/nsd:nsd { + uses manotypes:control-param; + uses manotypes:action-param; + leaf meta { + description + "Any meta-data needed by the UI"; + type string; + } + } +} + +// vim: sw=2 diff --git a/models/yang/rw-nsr.tailf.yang b/models/yang/rw-nsr.tailf.yang new file mode 100644 index 0000000..3b7588a --- /dev/null +++ b/models/yang/rw-nsr.tailf.yang @@ -0,0 +1,45 @@ + +/* + * + * Copyright 2016 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + +module rw-nsr-annotation +{ + namespace "http://riftio.com/ns/riftware-1.0/rw-nsr-annotation"; + prefix "rw-nsr-ann"; + + import tailf-common { + prefix tailf; + } + + import rw-nsr { + prefix rw-nsr; + } + + import nsr { + prefix nsr; + } + + tailf:annotate "/nsr:ns-instance-opdata/nsr:nsr/rw-nsr:operational-events" { + tailf:callpoint rw_callpoint; + } + + tailf:annotate "/nsr:ns-instance-opdata/rw-nsr:nsd-ref-count" { + tailf:callpoint rw_callpoint; + } +} diff --git a/models/yang/rw-nsr.yang b/models/yang/rw-nsr.yang new file mode 100644 index 0000000..472332e --- /dev/null +++ b/models/yang/rw-nsr.yang @@ -0,0 +1,436 @@ + +/* + * + * Copyright 2016 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + +module rw-nsr +{ + namespace "http://riftio.com/ns/riftware-1.0/rw-nsr"; + prefix "rw-nsr"; + + import mano-types { + prefix "manotypes"; + } + + import nsr { + prefix "nsr"; + } + + import nsd { + prefix "nsd"; + } + + import rw-cloud { + prefix "rw-cloud"; + } + + import rw-config-agent { + prefix "rw-config-agent"; + } + + import rw-sdn { + prefix "rw-sdn"; + } + + import ietf-yang-types { + prefix "yang"; + } + + revision 2015-09-10 { + description + "Initial revision. This YANG file augments + the base MANO VNFD"; + reference + "Derived from earlier versions of base YANG files"; + } + + grouping operational-events { + list operational-events { + key "id"; + description + "Recent operational events for this network service. + Though the model does not impose any restrictions on the numbe of events, + the max operational events will be limited to the most recent 10"; + + leaf id { + description "The id of the instance"; + type uint64; + } + + leaf timestamp { + description + "The timestamp of this event expressed as seconds since + unix epoch - 1970-01-01T00:00:00Z"; + type uint32; + } + leaf event { + description "Short description of the event"; + type string; + } + leaf description { + description + "The description of this event"; + type string; + } + leaf details { + description + "The detailed description of this event (in case of errors)"; + type string; + } + } + } + + + grouping rw-ns-instance-config { + leaf cloud-account { + description + "The configured cloud account which the NSR is instantiated within. + All VDU's, Virtual Links, and provider networks will be requested + using the cloud-account's associated CAL instance"; + type leafref { + path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; + } + } + + leaf om-datacenter { + description + "Openmano datacenter name to use when instantiating + the network service. This is only used when openmano + is selected as the cloud account. This should be superceded + by multiple cloud accounts when that becomes available."; + type string; + } + + list vnf-cloud-account-map { + description + "Mapping VNF to Cloud Account where VNF will be instantiated"; + + key "member-vnf-index-ref"; + leaf member-vnf-index-ref { + type uint64; + } + + leaf cloud-account { + description + "The configured cloud account where VNF is instantiated within. + All VDU's, Virtual Links, and provider networks will be requested + using the cloud-account's associated CAL instance"; + type leafref { + path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; + } + } + + leaf om-datacenter { + description + "Openmano datacenter name to use when instantiating + the network service. This is only used when openmano + is selected as the cloud account. This should be superceded + by multiple cloud accounts when that becomes available."; + type string; + } + + leaf config-agent-account { + description + "The configured config agent account to use for instantiating this VNF. + The configuration for this VNF will be driven using the specified config + agent account"; + type leafref { + path "/rw-config-agent:config-agent/rw-config-agent:account/rw-config-agent:name"; + } + } + } + + list vl-cloud-account-map { + description + "Mapping VL to Cloud Account where VL will be instantiated"; + + key "vld-id-ref"; + + leaf vld-id-ref { + description + "A reference to a vld. + leafref path ../../nsd/vld/id"; + type string; + } + + leaf-list cloud-accounts { + description + "The configured list of cloud accounts where VL is instantiated. + All VDU's, Virtual Links, and provider networks will be requested + using the cloud-account's associated CAL instance"; + type leafref { + path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; + } + } + + leaf-list om-datacenters { + description + "Openmano datacenter names to use when instantiating + the VLs. This is only used when openmano + is selected as the cloud account. This should be superceded + by multiple cloud accounts when that becomes available."; + type string; + } + } + } + + + augment /nsr:ns-instance-config/nsr:nsr { + uses rw-ns-instance-config; + } + + augment /nsr:start-network-service/nsr:input{ + uses rw-ns-instance-config; + } + + augment /nsr:ns-instance-opdata/nsr:nsr { + uses manotypes:action-param; + uses manotypes:control-param; + + leaf sdn-account { + description + "The SDN account associted with the cloud account using which an + NS was instantiated."; + type leafref { + path "/rw-sdn:sdn/rw-sdn:account/rw-sdn:name"; + } + } + + leaf config-status-details { + description + "The configuration status error details of the NS instance, in case of any errors"; + type string; + } + + container nfvi-metrics { + container vm { + leaf label { + description + "Label to show in UI"; + type string; + default "VM"; + } + + leaf active-vm { + description + "The number of active VMs."; + type uint64; + } + + leaf inactive-vm { + description + "The number of inactive VMs."; + type uint64; + } + } + + uses manotypes:nfvi-metrics; + } + + container epa-param { + container ovs-acceleration { + leaf label { + description + "Label to show in UI for the param"; + type string; + default "OVS ACCELERATION"; + } + + leaf vm { + description + "Number of VMs with the EPA attribute"; + type uint64; + } + + leaf unit { + description + "Unit label to show in the UI"; + type string; + default "vms"; + } + } + + container ovs-offload { + leaf label { + description + "Label to show in UI for the param"; + type string; + default "OVS OFFLOAD"; + } + + leaf vm { + description + "Number of VMs with the EPA attribute"; + type uint64; + } + + leaf unit { + description + "Unit label to show in the UI"; + type string; + default "vms"; + } + + } + + container ddio { + leaf label { + description + "Label to show in UI for the param"; + type string; + default "DDIO"; + } + + leaf vm { + description + "Number of VMs with the EPA attribute"; + type uint64; + } + + leaf unit { + description + "Unit label to show in the UI"; + type string; + default "vms"; + } + + } + + container cat { + leaf label { + description + "Label to show in UI for the param"; + type string; + default "CAT"; + } + + leaf vm { + description + "Number of VMs with the EPA attribute"; + type uint64; + } + + leaf unit { + description + "Unit label to show in the UI"; + type string; + default "vms"; + } + } + + container cmt { + leaf label { + description + "Label to show in UI for the param"; + type string; + default "CMT"; + } + + leaf vm { + description + "Number of VMs with the EPA attribute"; + type uint64; + } + + leaf unit { + description + "Unit label to show in the UI"; + type string; + default "vms"; + } + + } + } + uses operational-events; + } + + + augment /nsr:ns-instance-opdata/nsr:nsr/nsr:vlr { + leaf assigned-subnet { + description "Subnet added for the VL"; + type string; + } + leaf cloud-account { + description + "The configured cloud account in which the VL is instantiated within."; + type leafref { + path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; + } + } + leaf om-datacenter { + description + "Openmano datacenter name to use when instantiating + the network service. This is only used when openmano + is selected as the cloud account. This should be superceded + by multiple cloud accounts when that becomes available."; + type string; + } + } + + augment /nsr:ns-instance-opdata/nsr:nsr/nsr:constituent-vnfr-ref { + leaf cloud-account { + description + "The configured cloud account in which the VNF is instantiated within. + All VDU's, Virtual Links, and provider networks will be requested + using the cloud-account's associated CAL instance"; + type leafref { + path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; + } + } + leaf om-datacenter { + description + "Openmano datacenter name to use when instantiating + the network service. This is only used when openmano + is selected as the cloud account. This should be superceded + by multiple cloud accounts when that becomes available."; + type string; + } + } + + augment /nsr:ns-instance-config { + leaf nfvi-polling-period { + description + "Defines the period (secons) that the NFVI metrics are polled at"; + type uint64; + default 4; + } + } + + notification nsm-notification { + description "Notification for NSM Events. + The timestamp of this event is automatically expressed + in human readble format - 1970-01-01T00:00:00Z"; + + leaf event { + description "Short name of the event"; + type string; + } + + leaf description { + description "The description of this event"; + type string; + } + + leaf details { + description "The detailed description of this event, in case of errors"; + type string; + } + } +} + +// vim: sw=2 diff --git a/models/yang/rw-topology.yang b/models/yang/rw-topology.yang new file mode 100644 index 0000000..ff1f2ba --- /dev/null +++ b/models/yang/rw-topology.yang @@ -0,0 +1,126 @@ + +/* + * + * Copyright 2016 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + +module rw-topology { + namespace "http://riftio.com/ns/riftware-1.0/rw-topology"; + prefix rw-topology; + + import ietf-inet-types {prefix inet;} + import ietf-network {prefix nw;} + import ietf-network-topology {prefix nt;} + import ietf-l2-topology {prefix l2t;} + + revision "2015-10-20" { + description "Initial revision of IP level addressing for L2 host topology"; + } + + grouping ip-address-group { + description "IP addresses if present for L2 termination points"; + container ip-attributes { + description "L2 termination points containing IP addresses"; + list ip-addresses { + key ip; + leaf ip { + type inet:ip-address; + description "IPv4 or IPv6 address"; + } + } + } + } // grouping ip-address-group + + + grouping rw-network-attributes { + description "RW Topology scope attributes"; + container rw-network-attributes { + description "Containing RW network attributes"; + leaf name { + type string; + description "Name of the RW Topology network"; + } + leaf sdn-account-name { + type string; + description "Name of the SDN account from which topology is got"; + } + } + } + + grouping rw-node-attributes { + description "RW node attributes"; + container rw-node-attributes { + description "Containing RW node attributes"; + leaf name { + type string; + description "Node name"; + } + leaf ovs-bridge-name { + type string; + description "Name of OVS bridge"; + } + } + } + + grouping rw-link-attributes { + description "RW link attributes"; + container rw-link-attributes { + description "Containing RW link attributes"; + leaf name { + type string; + description "Link name"; + } + } + } + + grouping rw-termination-point-attributes { + description "RW termination point attributes"; + container rw-termination-point-attributes { + description "Containing RW TP attributes"; + leaf description { + type string; + description "Port description"; + } + uses ip-address-group; + } + } + + augment "/nw:network" { + description + "Configuration parameters for the RW network + as a whole"; + uses rw-network-attributes; + } + + augment "/nw:network/nw:node" { + description + "Configuration parameters for RW at the node + level"; + uses rw-node-attributes; + } + + augment "/nw:network/nt:link" { + description "Augment RW topology link information"; + uses rw-link-attributes; + } + + augment "/nw:network/nw:node/nt:termination-point" { + description + "Augment RW topology termination point configuration"; + uses rw-termination-point-attributes; + } +} diff --git a/models/yang/rw-vlr.yang b/models/yang/rw-vlr.yang new file mode 100644 index 0000000..755bb81 --- /dev/null +++ b/models/yang/rw-vlr.yang @@ -0,0 +1,87 @@ + +/* + * + * Copyright 2016 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + +module rw-vlr +{ + namespace "http://riftio.com/ns/riftware-1.0/rw-vlr"; + prefix "rw-vlr"; + + import mano-types { + prefix "manotypes"; + } + + import vlr { + prefix "vlr"; + } + + import rw-cloud { + prefix "rw-cloud"; + } + + import ietf-yang-types { + prefix "yang"; + } + + revision 2015-09-30 { + description + "Initial revision. This YANG file augments + the base MANO VNFD"; + reference + "Derived from earlier versions of base YANG files"; + } + + augment /vlr:vlr-catalog/vlr:vlr { + leaf cloud-account { + description + "The cloud account to use when requesting resources for + this vlr"; + type leafref { + path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; + } + } + leaf om-datacenter { + description + "Openmano datacenter name to use when instantiating + the network service. This is only used when openmano + is selected as the cloud account. This should be superceded + by multiple cloud accounts when that becomes available."; + type string; + } + + + leaf network_pool { + description "The network pool the resource was allocated from."; + type string; + } + + leaf assigned-subnet { + description "Subnet added for the VL"; + type string; + } + + leaf operational-status-details { + description + "The error message in case of a failed VLR operational status"; + type string; + } + } +} + +// vim: sw=2 diff --git a/models/yang/rw-vnfd.yang b/models/yang/rw-vnfd.yang new file mode 100644 index 0000000..29eb852 --- /dev/null +++ b/models/yang/rw-vnfd.yang @@ -0,0 +1,117 @@ + +/* + * + * Copyright 2016 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + +module rw-vnfd +{ + namespace "http://riftio.com/ns/riftware-1.0/rw-vnfd"; + prefix "rw-vnfd"; + + import vnfd { + prefix "vnfd"; + } + + import rwvcs-types { + prefix "rwvcstypes"; + } + + import rw-pb-ext { prefix "rwpb"; } + + import ietf-yang-types { + prefix "yang"; + } + + import mano-types { + prefix "manotypes"; + } + + revision 2015-09-10 { + description + "Initial revision. This YANG file augments + the base MANO VNFD"; + reference + "Derived from earlier versions of base YANG files"; + } + + augment /vnfd:vnfd-catalog/vnfd:vnfd { + uses manotypes:control-param; + uses manotypes:action-param; + leaf meta { + description + "Any meta-data needed by the UI"; + type string; + } + list component { + description + "This section defines the RIFT.ware + virtual components"; + key "component-name"; + rwpb:msg-new VcsComponent; + rwpb:application-request-point; + + leaf component-name { + description ""; + type string; + } + + leaf component-type { + description ""; + type rwvcstypes:component_type; + mandatory true; + } + + choice component { + case rwvcs-rwcollection { + uses rwvcstypes:rwvcs-rwcollection; + } + case rwvcs-rwvm { + uses rwvcstypes:rwvcs-rwvm; + } + case rwvcs-rwproc { + uses rwvcstypes:rwvcs-rwproc; + } + case native-proc { + uses rwvcstypes:native-proc; + } + case rwvcs-rwtasklet { + uses rwvcstypes:rwvcs-rwtasklet; + } + } + } // list component + } + + augment /vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vdu { + leaf vcs-component-ref { + description + "This defines the software components using the + RIFT.ware Virtual Component System (VCS). This + also allows specifying a state machine during + the VM startup. + NOTE: This is an significant addition to MANO, + since MANO doesn't clearly specify a method to + identify various software components in a VM. + Also using a state machine is not something that + is well described in MANO."; + type leafref { + path "/vnfd:vnfd-catalog/vnfd:vnfd/rw-vnfd:component/rw-vnfd:component-name"; + } + } + } +} +// vim: sw=2 diff --git a/models/yang/rw-vnfr.tailf.yang b/models/yang/rw-vnfr.tailf.yang new file mode 100644 index 0000000..6090fcf --- /dev/null +++ b/models/yang/rw-vnfr.tailf.yang @@ -0,0 +1,50 @@ + +/* + * + * Copyright 2016 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + +module rw-vnfr-annotation +{ + namespace "http://riftio.com/ns/riftware-1.0/rw-vnfr-annotation"; + prefix "rw-vnfr-ann"; + + import tailf-common { + prefix tailf; + } + + import rw-vnfr { + prefix rw-vnfr; + } + + import vnfr { + prefix vnfr; + } + + tailf:annotate "/vnfr:vnfr-catalog/rw-vnfr:vnfd-ref-count" { + tailf:callpoint rw_callpoint; + } + + tailf:annotate "/vnfr:vnfr-catalog/vnfr:vnfr/rw-vnfr:operational-events" { + tailf:callpoint rw_callpoint; + } + + tailf:annotate "/rw-vnfr:vnfr-console" { + tailf:callpoint rw_callpoint; + } + +} diff --git a/models/yang/rw-vnfr.yang b/models/yang/rw-vnfr.yang new file mode 100644 index 0000000..be8acb4 --- /dev/null +++ b/models/yang/rw-vnfr.yang @@ -0,0 +1,324 @@ + +/* + * + * Copyright 2016 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + +module rw-vnfr +{ + namespace "http://riftio.com/ns/riftware-1.0/rw-vnfr"; + prefix "rw-vnfr"; + + import mano-types { + prefix "manotypes"; + } + + import rw-pb-ext { prefix "rwpb"; } + + import vnfr { + prefix "vnfr"; + } + + import vnfd { + prefix "vnfd"; + } + + import rw-cloud { + prefix "rw-cloud"; + } + + import rwvcs-types { + prefix "rwvcstypes"; + } + + import ietf-yang-types { + prefix "yang"; + } + + import ietf-inet-types { + prefix "inet"; + } + + revision 2015-09-10 { + description + "Initial revision. This YANG file augments + the base MANO VNFD"; + reference + "Derived from earlier versions of base YANG files"; + } + + grouping vnfr-operational-events { + list operational-events { + key "id"; + description + "Recent operational events for VNFR + Though the model does not impose any restrictions on the numbe of events, + the max operational events will be limited to the most recent 10"; + + leaf id { + description "The id of the instance"; + type uint64; + } + + leaf timestamp { + description + "The timestamp of this event expressed as seconds since + unix epoch - 1970-01-01T00:00:00Z"; + type uint32; + } + leaf event { + description "The event"; + type enumeration { + rwpb:enum-type "VnfrOperationalEvent"; + enum instantiate-rcvd; + enum vl-inited; + enum vnf-inited; + enum running; + enum terminate-rcvd; + enum vnf-terminated; + enum vl-terminated; + enum terminated; + } + } + leaf description { + description + "The description of this event"; + type string; + } + } + } + + grouping vdur-operational-events { + list operational-events { + key "id"; + description + "Recent operational events for VDUR + Though the model does not impose any restrictions on the numbe of events, + the max operational events will be limited to the most recent 10"; + + leaf id { + description "The id of the instance"; + type uint64; + } + + leaf timestamp { + description + "The timestamp of this event expressed as seconds since + unix epoch - 1970-01-01T00:00:00Z"; + type uint32; + } + leaf event { + description "The event"; + type enumeration { + rwpb:enum-type "VdurOperationalEvent"; + enum instantiate-rcvd; + enum vm-allocation-requested; + enum running; + enum terminate-rcvd; + enum vm-terminate-requested; + enum terminated; + } + } + leaf description { + description + "The description of this event"; + type string; + } + } + } + + augment /vnfr:vnfr-catalog/vnfr:vnfr { + uses manotypes:action-param; + uses manotypes:control-param; + + leaf cloud-account { + description + "The cloud account to use when requesting resources for + this vnf"; + type leafref { + path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; + } + } + + leaf om-datacenter { + description + "Openmano datacenter name to use when instantiating + the network service. This is only used when openmano + is selected as the cloud account. This should be superceded + by multiple cloud accounts when that becomes available."; + type string; + } + + container nfvi-metrics { + container vm { + leaf label { + description + "Label to show in UI"; + type string; + default "VM"; + } + + leaf active-vm { + description + "The number of active VMs."; + type uint64; + } + + leaf inactive-vm { + description + "The number of inactive VMs."; + type uint64; + } + } + + uses manotypes:nfvi-metrics; + } + + list component { + description + "This section defines the RIFT.ware + virtual components"; + key "component-name"; + rwpb:msg-new VcsComponentOp; + rwpb:application-request-point; + + leaf component-name { + description ""; + type string; + } + + leaf component-type { + description ""; + type rwvcstypes:component_type; + mandatory true; + } + + choice component { + case rwvcs-rwcollection { + uses rwvcstypes:rwvcs-rwcollection; + } + case rwvcs-rwvm { + uses rwvcstypes:rwvcs-rwvm; + } + case rwvcs-rwproc { + uses rwvcstypes:rwvcs-rwproc; + } + case native-proc { + uses rwvcstypes:native-proc; + } + case rwvcs-rwtasklet { + uses rwvcstypes:rwvcs-rwtasklet; + } + } + } // list component + + uses vnfr-operational-events; + + leaf operational-status-details { + description + "The error message in case of a failed VNFR operational status"; + type string; + } + } + + augment /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vdur { + leaf vm-pool { + description + "The pool from which this vm was allocated from"; + type string; + } + + container nfvi-metrics { + uses manotypes:nfvi-metrics; + } + + leaf vcs-component-ref { + description + "This defines the software components using the + RIFT.ware Virtual Component System (VCS). This + also allows specifying a state machine during + the VM startup. + NOTE: This is an significant addition to MANO, + since MANO doesn't clearly specify a method to + identify various software components in a VM. + Also using a state machine is not something that + is well described in MANO."; + type leafref { + path "/vnfr:vnfr-catalog/vnfr:vnfr/rw-vnfr:component/rw-vnfr:component-name"; + } + } + + uses vdur-operational-events; + + leaf operational-status-details { + description + "The error message in case of a failed VDU operational status"; + type string; + } + } + grouping vnfd-ref-count { + list vnfd-ref-count { + key "vnfd-id-ref"; + description "This table maintains the number of VNFRs used by each VNFD"; + + leaf vnfd-id-ref { + description "Reference to VNFD"; + type leafref { + path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id"; + } + } + leaf instance-ref-count { + description + "Reference count for the number of VNFRs refering this VNFD. + Every VNF Record instantiated using this descriptor takes + a reference on the VNFD and releases the reference when the + virtual network service is terminated. This desciptor cannot + be deleted when this counter is non zero"; + type uint64; + } + } + } + augment /vnfr:vnfr-catalog { + uses vnfd-ref-count; + } + + container vnfr-console { + config false; + list vnfr { + key "id"; + leaf id { + description "Identifier for the VNFR."; + type yang:uuid; + } + list vdur { + description "List of Virtual Deployment Units"; + key "id"; + leaf id { + description "Unique id for the VDU"; + type yang:uuid; + } + leaf console-url { + description "Console URL for this VDU, if available"; + type inet:uri; + } + } + } + } + +} + +// vim: sw=2 diff --git a/models/yang/vlr.tailf.yang b/models/yang/vlr.tailf.yang new file mode 100644 index 0000000..4bed1d2 --- /dev/null +++ b/models/yang/vlr.tailf.yang @@ -0,0 +1,37 @@ + +/* + * + * Copyright 2016 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + +module vlr-annotation +{ + namespace "http://riftio.com/ns/riftware-1.0/vlr-annotation"; + prefix "vlr-ann"; + + import tailf-common { + prefix tailf; + } + + import vlr { + prefix vlr; + } + + tailf:annotate "/vlr:vlr-catalog" { + tailf:callpoint rw_callpoint; + } +} diff --git a/models/yang/vlr.yang b/models/yang/vlr.yang new file mode 100644 index 0000000..b079dff --- /dev/null +++ b/models/yang/vlr.yang @@ -0,0 +1,191 @@ + +/* + * + * Copyright 2016 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + +module vlr +{ + namespace "urn:ietf:params:xml:ns:yang:nfvo:vlr"; + prefix "vlr"; + + import rw-pb-ext { + prefix "rwpb"; + } + + import ietf-inet-types { + prefix "inet"; + } + + import ietf-yang-types { + prefix "yang"; + } + + import mano-types { + prefix "manotypes"; + } + + + revision 2015-09-10 { + description + "Initial revision. This YANG file defines + the Virtual Link Record (VLR)"; + reference + "Derived from earlier versions of base YANG files"; + } + + container vlr-catalog { + config false; + + list vlr { + key "id"; + unique "name"; + + leaf id { + description "Identifier for the VLR."; + type yang:uuid; + } + + leaf name { + description "VLR name."; + type string; + } + + leaf nsr-id-ref { + description + "NS instance identifier. + This is a leafref /nsr:ns-instance-config/nsr:nsr/nsr:id"; + type yang:uuid; + } + + leaf vld-ref { + description + "Reference to VLD + /nsr:ns-instance-config/nsr:nsr[nsr:id=../nsr-id-ref]/nsd/vld:vld/vld:id"; + type string; + } + + leaf res-id { + description "Identifier for resmgr id mapping"; + type yang:uuid; + } + + leaf short-name { + description "Short name to appear as label in the UI"; + type string; + } + + leaf vendor { + description "Provider of the VLR."; + type string; + } + + leaf description { + description "Description of the VLR."; + type string; + } + + leaf version { + description "Version of the VLR"; + type string; + } + + leaf type { + type manotypes:virtual-link-type; + } + + leaf root-bandwidth { + description + "For ELAN this is the aggregate bandwidth."; + type uint64; + } + + leaf leaf-bandwidth { + description + "For ELAN this is the bandwidth of branches."; + type uint64; + } + + leaf create-time { + description + "Creation timestamp of this Virtual Link. + The timestamp is expressed as seconds + since unix epoch - 1970-01-01T00:00:00Z"; + + type uint32; + } + + leaf uptime { + description + "Active period of this Virtual Link. + Uptime is expressed in seconds"; + + type uint32; + } + + leaf network-id { + description + "Identifier for the allocated network resource."; + type string; + } + + leaf vim-network-name { + description + "Name of network in VIM account. This is used to indicate + pre-provisioned network name in cloud account."; + type string; + } + + // replicate for pnfd container here + + uses manotypes:provider-network; + uses manotypes:ip-profile-info; + + leaf status { + description + "Status of the virtual link record."; + type enumeration { + enum LINK_UP; + enum DEGRADED; + enum LINK_DOWN; + } + } + leaf operational-status { + description + "The operational status of the Virtual Link + init : The VL is in init stat. + vl-alloc-pending : The VL alloc is pending in VIM + running : The VL is up and running in VM + vl-terminate-pending : The VL is being terminated in VIM. + terminated : The VL is terminated in the VM. + failed : The VL instantiation failed in VIM. + "; + + type enumeration { + rwpb:enum-type "VlOperationalStatus"; + enum init; + enum vl-alloc-pending; + enum running; + enum vl-terminate-pending; + enum terminated; + enum failed; + } + } + } + } +} + diff --git a/models/yang/vnfr.tailf.yang b/models/yang/vnfr.tailf.yang new file mode 100644 index 0000000..150dc9a --- /dev/null +++ b/models/yang/vnfr.tailf.yang @@ -0,0 +1,45 @@ + +/* + * + * Copyright 2016 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + +module vnfr-annotation +{ + namespace "http://riftio.com/ns/riftware-1.0/vnfr-annotation"; + prefix "vnfr-ann"; + + import tailf-common { + prefix tailf; + } + + import vnfr { + prefix vnfr; + } + + tailf:annotate "/vnfr:vnfr-catalog" { + tailf:callpoint rw_callpoint; + } + + tailf:annotate "/vnfr:create-alarm" { + tailf:actionpoint rw_actionpoint; + } + + tailf:annotate "/vnfr:destroy-alarm" { + tailf:actionpoint rw_actionpoint; + } +} diff --git a/models/yang/vnfr.yang b/models/yang/vnfr.yang new file mode 100644 index 0000000..f228f1d --- /dev/null +++ b/models/yang/vnfr.yang @@ -0,0 +1,569 @@ + +/* + * + * Copyright 2016 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + +module vnfr +{ + namespace "urn:ietf:params:xml:ns:yang:nfvo:vnfr"; + prefix "vnfr"; + + import mano-types { + prefix "manotypes"; + } + + import rw-pb-ext { + prefix "rwpb"; + } + + import vnfd { + prefix "vnfd"; + } + + import nsd { + prefix "nsd"; + } + + import vlr { + prefix "vlr"; + } + + import ietf-yang-types { + prefix "yang"; + } + + import ietf-inet-types { + prefix "inet"; + } + + revision 2015-09-10 { + description + "Initial revision. This YANG file defines + the Virtual Network Function Record (VNFR)"; + reference + "Derived from earlier versions of base YANG files"; + } + + grouping placement-group-info { + list placement-groups-info { + description + " + Placement groups to which this VDU belongs and its + cloud construct + "; + key "name"; + uses manotypes:placement-group-info; + uses manotypes:placement-group-input; + } + } + + + grouping virtual-interface { + container virtual-interface { + description + "Container for the virtual interface properties"; + + leaf type { + description + "Specifies the type of virtual interface + between VM and host. + VIRTIO : Use the traditional VIRTIO interface. + PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface. + SR-IOV : Use SR-IOV interface."; + type enumeration { + enum VIRTIO; + enum PCI-PASSTHROUGH; + enum SR-IOV; + } + } + + leaf bandwidth { + description + "Aggregate bandwidth of the NIC."; + type uint64; + } + + leaf ovs-offload { + description + "Defines if the NIC supports OVS offload. + MANDATORY : OVS offload support in the NIC is mandatory. + PREFERRED : OVS offload support in the NIC is preferred."; + type enumeration { + enum MANDATORY; + enum PREFERRED; + } + } + + leaf vendor-id { + description + "Specifies the vendor specific id for + the device. This is used when a NIC from + specific HW vendor is required."; + type string; + } + + leaf datapath-library { + description + "Specifies the name and version of the datapath + library the NIC is expected to support."; + type string; + } + + leaf provider-network-name { + description + "Name of the provider network to which this + NIC is attached."; + type string; + } + } + } + + container vnfr-catalog { + config false; + list vnfr { + description + "Virtual Network Function Record (VNFR)."; + key "id"; + unique "name"; + + leaf id { + description "Identifier for the VNFR."; + type yang:uuid; + } + + leaf nsr-id-ref { + description + "NS instance identifier. + This is a leafref /nsr:ns-instance-config/nsr:nsr/nsr:id"; + type yang:uuid; + } + + leaf member-vnf-index-ref { + description "Reference to member VNF index in Network service."; + type leafref { + path "/nsd:nsd-catalog/nsd:nsd/nsd:constituent-vnfd/nsd:member-vnf-index"; + } + } + + leaf dashboard-url { + description "Dashboard URL"; + type inet:uri; + } + + leaf name { + description "VNFR name."; + type string; + } + + leaf short-name { + description "VNFR short name."; + type string; + } + + leaf vendor { + description "Vendor of the VNFR."; + type string; + } + + leaf description { + description "Description of the VNFR."; + type string; + } + + leaf version { + description "Version of the VNFR"; + type string; + } + + leaf create-time { + description + "Creation timestamp of this Virtual Network + Function. The timestamp is expressed as + seconds since unix epoch - 1970-01-01T00:00:00Z"; + + type uint32; + } + + leaf uptime { + description + "Active period of this Virtual Network Function. + Uptime is expressed in seconds"; + + type uint32; + } + + container vnfd { + description "VNF descriptor used to instantiate this VNF"; + uses vnfd:vnfd-descriptor; + } + + // Use parameters provided here to configure this VNF + uses manotypes:vnf-configuration; + + // Mainly used by Mon-params & dashboard url + container mgmt-interface { + leaf ip-address { + type inet:ip-address; + } + leaf port { + type inet:port-number; + } + } + + list internal-vlr { + key "vlr-ref"; + + leaf vlr-ref { + description "Reference to a VLR record in the VLR catalog"; + type leafref { + path "/vlr:vlr-catalog/vlr:vlr/vlr:id"; + } + } + + leaf-list internal-connection-point-ref { + type leafref { + path "../../vdur/internal-connection-point/id"; + } + } + } + + list connection-point { + key "name"; + description + "List for external connection points. Each VNF has one + or more external connection points. As the name + implies that external connection points are used for + connecting the VNF to other VNFs or to external networks. + Each VNF exposes these connection points to the + orchestrator. The orchestrator can construct network + services by connecting the connection points between + different VNFs. The NFVO will use VLDs and VNFFGs at + the network service level to construct network services."; + + uses vnfd:common-connection-point; + + leaf vlr-ref { + description + "Reference to the VLR associated with this connection point"; + type leafref { + path "/vlr:vlr-catalog/vlr:vlr/vlr:id"; + } + } + + leaf ip-address { + description + "IP address assigned to the external connection point"; + type inet:ip-address; + } + leaf mac-address { + description + "MAC address assigned to the external connection point"; + // type inet:mac-address; + type string; + } + leaf connection-point-id { + rwpb:field-inline "true"; + rwpb:field-string-max 64; + type string; + } + } + + list vdur { + description "List of Virtual Deployment Units"; + key "id"; + unique "name"; + + leaf id { + description "Unique id for the VDU"; + type yang:uuid; + } + + leaf name { + description "name of the instantiated VDUR"; + type string; + } + + leaf unique-short-name { + description "Short Unique name of the VDU + This will be of the format NSR name-ShortnedString-VDUname + NSR name and VDU name shall be constrained to 10 characters"; + rwpb:field-inline "true"; + rwpb:field-string-max 64; + type string; + } + + leaf vdu-id-ref { + type leafref { + path "../../vnfd/vdu/id"; + } + } + + leaf vim-id { + description "Allocated VM resource id"; + type string; + } + + leaf flavor-id { + description "VIM assigned flavor id"; + type string; + } + + leaf image-id { + description "VIM assigned image id"; + type string; + } + + leaf management-ip { + description "Management IP address"; + type inet:ip-address; + } + + leaf vm-management-ip { + description "VM Private Management IP address"; + type inet:ip-address; + } + + leaf console-url { + description "Console URL for this VDU, if available"; + type inet:uri; + } + + uses manotypes:vm-flavor; + uses manotypes:guest-epa; + uses manotypes:vswitch-epa; + uses manotypes:hypervisor-epa; + uses manotypes:host-epa; + + uses manotypes:supplemental-boot-data; + + list volumes { + key "name"; + + leaf name { + description "Name of the disk-volumes, e.g. vda, vdb etc"; + type string; + } + + leaf volume-id { + description "VIM assigned volume id"; + type string; + } + + uses manotypes:volume-info; + } + + list alarms { + description + "A list of the alarms that have been created for this VDU"; + + key "alarm-id"; + uses manotypes:alarm; + } + + list internal-connection-point { + key "id"; + description + "List for internal connection points. Each VNFC + has zero or more internal connection points. + Internal connection points are used for connecting + the VNF components internal to the VNF. If a VNF + has only one VNFC, it may not have any internal + connection points."; + + uses vnfd:common-connection-point; + + leaf ip-address { + description + "IP address assigned to the internal connection point"; + type inet:ip-address; + } + leaf mac-address { + description + "MAC address assigned to the internal connection point"; + // type inet:mac-address; + type string; + } + } + + list internal-interface { + description + "List of internal interfaces for the VNF"; + key name; + + leaf name { + description + "Name of internal interface. Note that this + name has only local significance to the VDU."; + type string; + } + + leaf vdur-internal-connection-point-ref { + type leafref { + path "../../internal-connection-point/id"; + } + } + uses virtual-interface; + } + + list external-interface { + description + "List of external interfaces for the VNF. + The external interfaces enable sending + traffic to and from VNF."; + key name; + + leaf name { + description + "Name of the external interface. Note that + this name has only local significance."; + type string; + } + + leaf vnfd-connection-point-ref { + description + "Name of the external connection point."; + type leafref { + path "../../../connection-point/name"; + } + } + uses virtual-interface; + } + leaf operational-status { + description + "The operational status of the VDU + init : The VDU has just started. + vm-init-phase : The VDUs in the VNF is being created in VIM. + vm-alloc-pending : The VM alloc is pending in VIM + running : The VDU is active in VM + terminate : The VDU is being terminated + vm-terminate-phase : The VDU in the VNF is being terminated in VIM. + terminated : The VDU is in the terminated state. + failed : The VDU instantiation failed. + "; + + type enumeration { + rwpb:enum-type "VduOperationalStatus"; + enum init; + enum vm-init-phase; + enum vm-alloc-pending; + enum running; + enum terminate; + enum vl-terminate-phase; + enum terminated; + enum failed; + } + } + uses placement-group-info; + } + + uses manotypes:monitoring-param; + + leaf operational-status { + description + "The operational status of the VNFR instance + init : The VNF has just started. + vl-init-phase : The internal VLs in the VNF are being instantiated. + vm-init-phase : The VMs for VDUs in the VNF are being instantiated. + running : The VNF is in running state. + terminate : The VNF is being terminated. + vm-terminate-phase : The VMs in the VNF are being terminated. + vl-terminate-phase : The internal VLs in the VNF are being terminated. + terminated : The VNF is in the terminated state. + failed : The VNF instantiation failed + "; + + type enumeration { + rwpb:enum-type "VnfrOperationalStatus"; + enum init; + enum vl-init-phase; + enum vm-init-phase; + enum running; + enum terminate; + enum vm-terminate-phase; + enum vl-terminate-phase; + enum terminated; + enum failed; + } + } + leaf config-status { + description + "The configuration status of the NS instance + configuring: At least one of the VNFs in this instance is in configuring state + configured: All the VNFs in this NS instance are configured or config-not-needed state + "; + + type enumeration { + enum configuring { + value 1; + } + enum configured { + value 2; + } + enum failed { + value 3; + } + enum config-not-needed { + value 4; + } + } + } + uses placement-group-info; + } + } + + rpc create-alarm { + description "Create an alert for a running VDU"; + input { + leaf cloud-account { + mandatory true; + type string; + } + + leaf vdur-id { + mandatory true; + type string; + } + + container alarm { + uses manotypes:alarm; + } + } + + output { + leaf alarm-id { + type string; + } + } + } + + rpc destroy-alarm { + description "Destroy an alert that is associated with a running VDU"; + input { + leaf cloud-account { + mandatory true; + type string; + } + + leaf alarm-id { + mandatory true; + type string; + } + } + } +} + -- 2.25.1