From f390bc6928173090e5576f15863987d9bf8956bf Mon Sep 17 00:00:00 2001 From: Mahesh Jethanandani Date: Tue, 30 Oct 2018 11:03:18 -0700 Subject: [PATCH] Updating models to IFA011/14 2.6.1 --- src/yang/etsi-nfv-common.yang | 150 +--- src/yang/etsi-nfv-ns.yang | 1234 ++++++++++++++++++++++++++++----- src/yang/etsi-nfv-pnf.yang | 12 +- src/yang/etsi-nfv-vnf.yang | 352 +++++++++- src/yang/etsi-nfv.yang | 6 +- 5 files changed, 1439 insertions(+), 315 deletions(-) diff --git a/src/yang/etsi-nfv-common.yang b/src/yang/etsi-nfv-common.yang index 883aae3..841d415 100644 --- a/src/yang/etsi-nfv-common.yang +++ b/src/yang/etsi-nfv-common.yang @@ -1,5 +1,6 @@ module etsi-nfv-common { namespace "urn:etsi:params:xml:ns:yang:etsi-nfv-common"; + yang-version 1.1; prefix common; description @@ -368,18 +369,28 @@ module etsi-nfv-common { information element."; } } + + // The following grouping is Cpd information element as defined in + // IFA014. IFA011 defines its own Cpd information element, which + // is defined in etsi-nfv-vnf.yang file. Do not use this grouping + // for inclusion in a Vnf. grouping cpd { description - "A Cpd information element describes network connectivity to a - compute resource or a VL."; + "The Cpd information element specifies the characteristics of + connection points attached to NFs and NSs. This is an + abstract class used as parent for the various Cpd classes. + It has an attribute 'trunkMode' which enables the NFVO to + identify whether the Cp instantiated from the Cpd is in trunk + mode or not."; reference - "GS NFC IFA011: Section 7.1.6.3 Cpd Information Element"; + "GS NFC IFA014: Section 6.6.3.1 Cpd information element"; + leaf id { type string; description "Identifier of this Cpd information element."; reference - "GS NFV IFA011: Section 7.1.6.3, Cpd information element."; + "GS NFC IFA014: Section 6.6.3.1 Cpd information element"; } leaf layer-protocol { mandatory true; @@ -387,134 +398,45 @@ module etsi-nfv-common { base common:layer-protocol; } description - "Identifies which protocol the CP uses for connectivity - purposes (Ethernet, MPLS, ODU2, IPV4, IPV6, Pseudo-Wire, - etc.)."; + "Identifies a protocol that the connection points + corresponding to the CPD support for connectivity purposes + (e.g. Ethernet, MPLS, ODU2, IPV4, IPV6, Pseudo-Wire, etc.)."; reference - "GS NFV IFA011: Section 7.1.6.3, Cpd information element."; + "GS NFC IFA014: Section 6.6.3.1 Cpd information element"; } leaf role { type identityref { base common:cp-role; } description - "Identifies the role of the port in the context of the - traffic flow patterns in the VNF or parent NS. For example a - VNF with a tree flow pattern within the VNF will have legal - cpRoles of ROOT and LEAF."; + "Identifies the role of the connection points + corresponding to the CPD in the context of the traffic + flow patterns in the VNF, PNF or NS. For example an NS with + a tree flow pattern within the NS will have legal cpRoles + of ROOT and LEAF."; reference - "GS NFV IFA011: Section 7.1.6.3, Cpd information element."; + "GS NFC IFA014: Section 6.6.3.1 Cpd information element"; } leaf description { type string; description - "Human readable description of the connection point"; - reference - "GS NFV IFA011: Section 7.1.6.3, Cpd information element."; - } - container protocol { - description - "Identifies the protocol layering information the CP uses for - connectivity purposes and associated information. There shall - be one cpProtocol for each layer protocol as indicated by the - attribute layerProtocol."; + "Provides human-readable information on the purpose of the + connection point (e.g. connection point for control plane + traffic)."; reference - "GS NFV IFA011: Section 7.1.6.3, Cpd information element."; - leaf associated-layer-protocol { - type identityref { - base common:layer-protocol; - } - description - "One of the values of the attribute layerProtocol of the Cpd - IE."; - reference - "GS NFV IFA011: Section 7.1.6.8, CpProtocolData information - element."; - } - - list address-data { - key "address-type"; - leaf address-type { - type identityref { - base common:address-type; - } - description - "Describes the type of the address to be assigned to the CP - instantiated from the parent CPD. - Value: - • MAC address. - • IP address. - • … - The content type shall be aligned with the address type - supported by the layerProtocol attribute of the parent CPD."; - reference - "GS NFV IFA011: Section 7.1.3.3, AddressData information - element."; - } - container l2-address-data { - when "../address-type='mac-address'"; - } - container l3-address-data { - when "../address-type='ip-address'"; - leaf ip-address-assignment { - type boolean; - description - "Specify if the address assignment is the responsibility - of management and orchestration function or not. If it - is set to True, it is the management and orchestration - function responsibility. "; - reference - "GS NFV IFA011: Section 7.1.3.4, L3AddressData - information element."; - } - leaf floating-ip-activated { - type boolean; - description - "Specify if the floating IP scheme is activated on the CP - or not."; - reference - "GS NFV IFA011: Section 7.1.3.4, L3AddressData - information element."; - } - leaf ip-address-type { - type enumeration { - enum "ipv4"; - enum "ipv6"; - } - description - "Define address type. The address type should be aligned - with the address type supported by the layerProtocol - attribute of the parent VnfExtCpd."; - reference - "GS NFV IFA011: Section 7.1.3.4, L3AddressData - information element."; - } - leaf number-of-ip-addresses { - type uint32; - description - "Minimum number of IP addresses to be assigned based on - this L3AddressData information element."; - reference - "GS NFV IFA011: Section 7.1.3.4, L3AddressData - information element."; - } - } - description - "The AddressData information element supports providing - information about the addressing scheme and parameters - applicable to a CP."; - reference - "GS NFV IFA011: Section 7.1.3.3, AddressData information - element."; - } + "GS NFC IFA014: Section 6.6.3.1 Cpd information element"; } leaf trunk-mode { type boolean; description - "Information about whether the CP instantiated from this CPD - is in Trunk mode (802.1Q or other)."; + "Information about whether the Cp instantiated from this CPD + is in Trunk mode (802.1Q or other). When operating in + 'trunk mode', the Cp is capable of carrying traffic for + several VLANs. A cardinality of 0 implies that trunkMode + is not configured for the Cp i.e. It is equivalent to + Boolean value 'false'."; reference - "GS NFV IFA011: Section 7.1.6.3, Cpd information element."; + "GS NFC IFA014: Section 6.6.3.1 Cpd information element"; } } } diff --git a/src/yang/etsi-nfv-ns.yang b/src/yang/etsi-nfv-ns.yang index 161310a..a75279e 100644 --- a/src/yang/etsi-nfv-ns.yang +++ b/src/yang/etsi-nfv-ns.yang @@ -1,4 +1,5 @@ submodule etsi-nfv-ns { + yang-version 1.1; belongs-to etsi-nfv { prefix nfv; } @@ -7,6 +8,9 @@ submodule etsi-nfv-ns { prefix common; } + include etsi-nfv-vnf; + include etsi-nfv-pnf; + description "Models for NS according to ETSI GS NFV-IFA 014."; @@ -17,14 +21,14 @@ submodule etsi-nfv-ns { ETSI GS NFV-IFA 011 Ed251v243"; reference - "ETSI GS NFV-IFA 011 Ed251v243"; + "ETSI GS NFV-IFA 011 Ed251v243"; } grouping resource-handle { leaf vim-id { type string; } - leaf resrouce-provider-id { + leaf resource-provider-id { type string; } leaf resource-id { @@ -32,169 +36,309 @@ submodule etsi-nfv-ns { } } + grouping nsd { list nsd { key "id"; + leaf id { type string; description - "Uniquely identifies an network service descriptor"; + "Identifier of this NSD information element. It Globally + uniquely identifies an instance of the NSD."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; } leaf designer { type string; description - "Identifies the designer of the network service descriptor"; + "Identifies the designer of the NSD."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; } leaf version { type string; description - "Identifies the version of the network service descriptor"; + "Identifies the version of the NSD."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; } leaf name { type string; description - "Provides the human readable name of the network service. descriptor"; + "Provides the human readable name of the NSD."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; } leaf invariant-id { - description - "Identifies an network service descriptor in a version - independent manner. This attribute is invariant across - versions of the network service descriptor."; type string; + description + "Identifies an NSD in a version independent manner. This + attribute is invariant across versions of the network + service descriptor."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; } - leaf-list nested-nsd { + leaf-list nested-nsd-id { + must ". != ../id"; type leafref { path "../../nsd/id"; } - must ". != ../id"; + description + "References the NSD of a constituent nested NS."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; } - list vnfd { - key "vnfd"; - min-elements 1; - description - "This lists the VNFDs this network service - descriptor consists of."; - leaf vnfd { - type leafref { - path "../../../vnfd/id"; - } + leaf-list vnfd-id { + type leafref { + path "../../vnfd/id"; } + description + "References the VNFD of a constituent VNF."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; } - list service-access-point-descriptor { + + leaf-list pnfd-id { + type leafref { + path "../../pnfd/id"; + } + description + "References the PNFD of a constituent PNF."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; + } + + list sapd { key "id"; - min-elements 1; description - "A service access point serves as the network - service's external connection point"; + "Provides the descriptor of a service access point of the + network service."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; + leaf id { type string; + description + "Identifier of this Cpd information element."; + reference + "GS NFC IFA014: Section 6.6.3.1 Cpd information element"; } leaf address-assignment { + type boolean; description - "Specify whether the SAP address - assignment is under the responsibility of - management and orchestration functions + "Specify whether the SAP address assignment is under the + responsibility of management and orchestration functions or not. If it is set to True, management and - orchestration functions are responsible for - assigning addresses to the access points - instantiated from this SAPD"; - type empty; - } - leaf description { - type string; - } - leaf layer-protocol { - type identityref { - base common:layer-protocol; - } - } - leaf role { - type identityref { - base common:cp-role; - } + orchestration functions are responsible for assigning + addresses to the access points instantiated from this + SAPD."; + reference + "GS NFV IFA014: Section 6.2.3.2 Sapd information element"; } + leaf virtual-link-desc { type leafref { path "../../virtual-link-desc/id"; } description - "Can optionally connect this service-access-point to an virtual-link. If not set, - it's assumed a VNFD's connection-points references this - service-access-point."; - } - /* - associatedCpdId: - Deliberatly not according to standard, see - vnf-profile -> sapd-connectivity - */ + "References the descriptor of the NS VL instance to + which the SAP instantiated from this SAPD connects to."; + reference + "GS NFV IFA014: Section 6.2.3.2 Sapd information element"; + } + + choice associated-cpd-id { + container vnf { + leaf vnfd-id { + mandatory true; + type leafref { + path "../../../../nfv:vnfd/nfv:id"; + } + must "boolean(../../../vnfd-id[.=current()])"; + } + + leaf ext-cpd-id { + mandatory true; + type leafref { + path "deref(../vnfd-id)/../nfv:ext-cpd/nfv:id"; + } + } + } + container pnf { + leaf pnfd-id { + mandatory true; + type leafref { + path "../../../../nfv:pnfd/nfv:id"; + } + must "boolean(../pnfd-id[.=current()])"; + } + + leaf ext-cpd-id { + mandatory true; + type leafref { + path "deref(../pnfd-id)/../nfv:ext-cpd/nfv:id"; + } + } + } + container ns { + leaf nsd-id { + mandatory true; + type leafref { + path "../../../../nfv:nsd/nfv:id"; + } + must "boolean(../nsd-id[.=current()])"; + } + + leaf ext-cpd-id { + mandatory true; + type leafref { + path "deref(../nsd-id)/../nfv:sapd/nfv:id"; + } + } + } + } } + list virtual-link-desc { key "id"; description - "The virtual-link-desc information element provides general information - enabling the instantiation of virtual links."; + "Provides the constituent VLDs."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; leaf id { type string; + description + "Identifier of the NsVirtualLinkDesc information element. + It uniquely identifies a VLD."; + reference + "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc + information element"; } + leaf provider { - description - "Defines the organization generating the VLD. "; type string; + description + "Defines the organization generating the VLD."; + reference + "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc + information element"; } + leaf version { mandatory true; type string; + description + "Specifies the version of the VLD."; + reference + "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc + information element"; } + uses common:connectivity-type; - list deployment-flavor { + list df { key "id"; + + description + "The VirtualLinkDf information element specifies + properties for instantiating a VL according to a + specific flavour."; + reference + "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc + information element"; + leaf id { type string; + description + "Identifies this VirtualLinkDf information element + within a VLD."; + reference + "GS NFV IFA014: Section 6.5.4.2 VirtualLinkDf + information element"; } container qos { + description + "The QoS information element specifies quality of + service parameters applicable to a VL."; + reference + "GS NFV IFA014: Section 6.5.4.2 VirtualLinkDf + information element"; + leaf latency { mandatory true; - description - "Specifies the maximum latency in ms."; type uint32; units "ms"; + description + "Specifies the maximum latency in ms."; + reference + "GS NFV IFA014: Section 6.5.6.2 QoS information + element"; } leaf packet-delay-variation { mandatory true; - description - "Specifies the maximum jitter in ms."; type uint32; units "ms"; + description + "Specifies the maximum jitter in ms."; + reference + "GS NFV IFA014: Section 6.5.6.2 QoS information + element"; } leaf packet-loss-ratio { - description - "Specifies the maximum packet loss ratio."; type decimal64 { fraction-digits "2"; range "0..1.00"; } + description + "Specifies the maximum packet loss ratio."; + reference + "GS NFV IFA014: Section 6.5.6.2 QoS information + element"; } + leaf priority { + type uint32; description "Specifies the priority level in case of congestion on the underlying physical links."; - type uint32; + reference + "GS NFV IFA014: Section 6.5.6.2 QoS information + element"; } } + leaf service-availability-level { - reference "ETSI GS NFV-REL 001 [i.5]"; type enumeration { enum "level-1"; enum "level-2"; enum "level-3"; } + description + "Specifies one of the three levels defined in ETSI + ETSI GS NFV-REL 001 [i.5] + * Level 1. + * Level 2. + * Level 3."; + reference + "GS NFV IFA014: Section 6.5.4.2 VirtualLinkDf + information element"; } } @@ -204,39 +348,284 @@ submodule etsi-nfv-ns { enum passive-monitoring; enum active; } + description + "Specifies test access facilities expected on the VL."; + reference + "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc + information element"; } leaf description { type string; + description + "Provides human-readable information on the purpose of + the virtual link (e.g. VL for control plane traffic)."; + reference + "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc + information element"; } uses common:security-parameters; } - // vnffgd skipped since not fully specified by the spec - list monitored-info { + + list vnffgd { key "id"; + + description + "Provides the descriptors of the applicable forwarding + graphs."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; + leaf id { type string; + description + "Identifier of this Vnffgd information element. It + uniquely identifies a VNFFGD."; + reference + "GS NFV IFA014: Section 6.4.2.2 Vnffgd information + element"; } - choice source { - // We have no way of refererencing a VNF MP today - container ns-monitoring-parameter { - uses common:monitoring-parameter; + leaf-list vnf-profile-id { + type leafref { + path "../../df/vnf-profile/id"; } - container vnf-indicator { - leaf vnfd { - type leafref { - path "/nfv/vnfd/id"; + description + "References the VnfProfile of a constituent VNF."; + reference + "GS NFV IFA014: Section 6.4.2.2 Vnffgd information + element"; + } + + leaf-list pnf-profile-id { + type leafref { + path "../../df/pnf-profile/id"; + } + description + "References the PnfProfile of a constituent PNF."; + reference + "GS NFV IFA014: Section 6.4.2.2 Vnffgd information + element"; + } + + leaf-list nested-ns-profile-id { + type leafref { + path "../../df/ns-profile/id"; + } + description + "References the NsProfile of a nestedNS."; + reference + "GS NFV IFA014: Section 6.4.2.2 Vnffgd information + element"; + } + + leaf virtual-link-profile-id { + type leafref { + path "../../df/virtual-link-profile/id"; + } + description + "References the Virtual Link Profile of a constituent + VL."; + reference + "GS NFV IFA014: Section 6.4.2.2 Vnffgd information + element"; + } + + list cpd-pool { + key "id"; + + description + "A pool of descriptors of connection points attached to + one of the constituent VNFs and PNFs and/or one of the + SAPs of the parent NS or of a nested NS."; + reference + "GS NFV IFA014: Section 6.4.2.2 Vnffgd information + element"; + + leaf id { + type string; + description + "Identifier of this CpdPool information element. It + identifies a pool of descriptors of connection points + and NS SAPs."; + reference + "GS NFV IFA014: Section 6.4.4.2 CpdPool information + element"; + } + + choice cpd-id { + container vnf { + leaf vnfd-id { + must ". = deref(../../vnfd-profile-id)/../vnfd-id" { + } + type leafref { + path "/nfv/vnfd/id"; + } + } + leaf cpd-id { + type leafref { + path "deref(../vnfd-id)/../nfv:ext-cpd/nfv:id"; + } } } - leaf indicator { - type leafref { - path "deref(../vnfd)/../indicator/id"; + container pnf { + leaf pnfd-id { + must ". = deref(../../pnfd-profile-id)/../pnfd-id" { + } + type leafref { + path "/nfv/pnfd/id"; + } + } + leaf pnf-cpd-id { + type leafref { + path "deref(../pnfd-id)/../nfv:ext-cpd/nfv:id"; + } + } + } + container ns { + leaf nsd-id { + must ". = deref(../../ns-profile-id)/../nsd-id" { + } + + type leafref { + path "/nfv/nsd/id"; + } + } + leaf sap-cpd-id { + type leafref { + path "deref(../nsd-id)/../nfv:sapd/nfv:id"; + } + } + } + description + "A reference to the descriptor of a connection point + attached to one of the constituent VNFs and PNFs or to + the descriptor of a NS SAP."; + reference + "GS NFV IFA014: Section 6.4.4.2 CpdPool information + element"; + } + } + + list nfpd { + key "id"; + + description + "The network forwarding path associated to the VNFFG."; + reference + "GS NFV IFA014: Section 6.4.2.2 Vnffgd information + element"; + + leaf id { + type string; + description + "Identifies this nfpd information element within a + VNFFGD."; + reference + "GS NFV IFA014: Section 6.4.3.2 Nfpd information + element"; + } + + leaf rule { + type string; + description + "Provides an NFP classification and selection rule. + The rule may be expressed as a criteria constructed + out of atomic assertions linked by Boolean operators + AND, OR and NOT."; + reference + "GS NFV IFA014: Section 6.4.3.2 Nfpd information + element"; + } + + list position-desc-id { + key "id"; + + description + "Describes a position in the NFP in terms of one or + more CP profiles and rules for distributing the + traffic among CP and SAP instances created from the + CPD or SAPD associated to these profiles. This shall + be connection point profile, which is either a CPD + associated with the VnfProfile of a constituent VNF, + or a CPD associated with the PnfProfile of a + constituent PNF, or a SAPD associated with the + NsProfile of a nested NS. The related VnfProfile, + PnfProfile and NsProfile shall be included in the + parent VNFFGD."; + reference + "GS NFV IFA014: Section 6.4.3.2 Nfpd information + element"; + + leaf id { + type string; + description + "Identifier of this NfpPositionDesc element."; + reference + "GS NFV IFA014: Section 6.4.5.2 NfpPositionDesc + information element"; + } + + list cp-profile-id { + key "id"; + + description + "References the profile of a connection point to be + traversed by the traffic flows matching the criteria. + This shall be a connection point attached to one of + the constituent VNFs and PNFs of the parent VNFFG, + or a SAP of one of the constituent nested NSs of the + parent VNFFG."; + reference + "GS NFV IFA014: Section 6.4.5.2 NfpPositionDesc + information element"; + + leaf id { + type string; + description + "Identifier of this CpProfile information element. + It uniquely identifies a CpProfile."; + reference + "GS NFV IFA014: Section 6.4.6.2 CpProfile + information element"; + } + + list constituent-profile-elements { + key "id"; + + description + "Specifies the constituents of the CpProfile."; + reference + "GS NFV IFA014: Section 6.4.6.2 CpProfile + information element"; + + leaf id { + type string; + description + "Specifies the constituents of the CpProfile."; + reference + "GS NFV IFA014: Section 6.4.7.2 + ConstituentProfileElements information element"; + } + + leaf cpd-id { + type string; + description + "References the VNF external CPD for a given + VnfProfile, or the PNF external CPD for a given + PnfProfile, or a NS SAPD for a give NsProfile + identified by the constituentBasedElementId."; + reference + "GS NFV IFA014: Section 6.4.7.2 + ConstituentProfileElements information element"; + } } } } } } + leaf-list autoscale-rule { type string; } @@ -249,68 +638,146 @@ submodule etsi-nfv-ns { type string; } } - list deployment-flavor { + + list df { min-elements 1; - must "default-instantiation-level or count(instantiation-level) = 1"; + must "default-instantiation-level or " + + "count(ns-instantiation-level) = 1" { + error-message + "default-instantiation-level must be present if there " + + "multiple instantion-level"; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element"; + } + key "id"; description - "The NsDf information element specifies the properties of a variant of an NS."; + "Identifies a DF within the scope of an NSD."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; leaf id { type string; + description + "Identifies this NsDf information element. It identifies + a NS DF within the NSD."; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element"; } leaf flavor-key { type leafref { - path "../../monitored-info/id"; + path "../monitored-info/id"; } + description + "Assurance parameter against which this flavour is being + described. + + The key can be a combination of multiple assurance + parameters with a logical relationship between them. + The parameters should be present as a monitoredInfo + attribute in the NSD."; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element"; } list vnf-profile { - must "min-number-of-instances<=max-number-of-instances"; - must "count(../../vnfd[vnfd=current()/vnfd])=1" { - error-message "VNFDs in the profile has to be listed as a dependency of the network service descriptor."; + must "min-number-of-instances <= max-number-of-instances"; + must "boolean(../../vnfd-id[.=current()/vnfd-id])" { + error-message "VNFDs in the profile has to be listed as a " + + "dependency of the network service " + + "descriptor."; } key "id"; + description + "VNF profile to be used for the NS flavour."; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element"; leaf id { type string; + description + "Identifier of this vnfProfile information element. It + uniquely identifies a VnfProfile."; + reference + "GS NFV IFA014: Section 6.3.3.2 VnfProfile information + element"; } - leaf vnfd { + leaf vnfd-id { mandatory true; type leafref { path "/nfv/vnfd/id"; } + description + "References a VNFD."; + reference + "GS NFV IFA014: Section 6.3.3.2 VnfProfile information + element"; } - leaf flavor { + leaf flavor-id { mandatory true; type leafref { - path "deref(../vnfd)/../deployment-flavor/id"; + path "deref(../vnfd-id)/../df/id"; } + description + "Identifies a flavour within the VNFD."; + reference + "GS NFV IFA014: Section 6.3.3.2 VnfProfile information + element"; } leaf instantiation-level { mandatory true; type leafref { - path "deref(../flavor)/../instantiation-level/id"; + path "deref(../flavor-id)/../instantiation-level/id"; } + description + "Identifier of the instantiation level of the VNF DF + to be used for instantiation. If not present, the + default instantiation level as declared in the VNFD + shall be used."; + reference + "GS NFV IFA014: Section 6.3.3.2 VnfProfile information + element"; } leaf min-number-of-instances { - type uint16; mandatory true; + type uint16; + description + "Minimum number of instances of the VNF based on this + VNFD that is permitted to exist for this VnfProfile."; + reference + "GS NFV IFA014: Section 6.3.3.2 VnfProfile information + element"; } + leaf max-number-of-instances { - type uint16; mandatory true; + type uint16; + description + "Maximum number of instances of the VNF based on this + VNFD that is permitted to exist for this VnfProfile."; + reference + "GS NFV IFA014: Section 6.3.3.2 VnfProfile information + element"; } uses common:local-affinity-or-anti-affinity-rule; + list affinity-or-anti-affinity-group { key "id"; + description + "Identifier(s) of the affinity or anti-affinity + group(s) the VnfProfile belongs to."; + reference + "GS NFV IFA014: Section 6.3.3.2 VnfProfile information + element"; + leaf id { type leafref { path "../../../affinity-or-anti-affinity-group/id"; @@ -319,69 +786,165 @@ submodule etsi-nfv-ns { } list virtual-link-connectivity { - key "virtual-link-profile cp"; + key "virtual-link-profile-id"; + + description + "Defines the connection information of the VNF, it + contains connection relationship between a VNF + connection point and a NS Virtual Link."; + reference + "GS NFV IFA014: Section 6.3.3.2 VnfProfile information + element"; - leaf virtual-link-profile { + leaf virtual-link-profile-id { type leafref { - path "../../../virtual-link-profile/virtual-link-desc"; + path "../../../virtual-link-profile/id"; } + description + "Reference an NS VL profile."; + reference + "GS NFV IFA014: Section 6.3.7.2, NsVirutalLinkConnectivity + information element."; } - leaf cp { + leaf-list cpd-id { type leafref { - path "deref(../../vnfd)/../ext-cpd/id"; + path "deref(../../vnfd-id)/../ext-cpd/id"; } + description + "References the descriptor of a connection point on a + VNF/PNF or a SAP which connects to virtual links + instantiated from the profile identified in the + virtualLinkProfileId attribute."; + reference + "GS NFV IFA014: Section 6.3.7.2, NsVirutalLinkConnectivity + information element."; } } + } - // Not according to standard - list sapd-connectivity { - key "sapd cp"; + list pnf-profile { + key "id"; + must "boolean(../../pnfd-id[.=current()/pnfd-id])" { + error-message "PNFDs in the profile has to be listed as a " + + "dependency of the network service " + + "descriptor."; + } - leaf sapd { + leaf id { + type string; + description + "Identifier of this PnfProfile information element. + It uniquely identifies a PnfProfile."; + reference + "GS NFV IFA014: Section 6.3.6.2 PnfProfile information + element"; + } + + leaf pnfd-id { + type leafref { + path "/nfv/pnfd/id"; + } + description + "References a PNFD."; + reference + "GS NFV IFA014: Section 6.3.6.2 PnfProfile information + element"; + } + + list virtual-link-connectivity { + key "virtual-link-profile-id"; + + description + "Defines the connection information of the PNF, it + contains connection relationship between a PNF + connection point and a NS Virtual Link."; + reference + "GS NFV IFA014: Section 6.3.6.2 PnfProfile information + element"; + + leaf virtual-link-profile-id { type leafref { - path "../../../../service-access-point-descriptor/id"; + path "../../../virtual-link-profile/id"; } + description + "Reference an NS VL profile."; + reference + "GS NFV IFA014: Section 6.3.7.2, NsVirutalLinkConnectivity + information element."; } - leaf cp { + leaf-list cpd-id { type leafref { - path "deref(../../vnfd)/../ext-cpd/id"; + path "deref(../../pnfd-id)/../ext-cpd/id"; } + description + "References the descriptor of a connection point on a + VNF/PNF or a SAP which connects to virtual links + instantiated from the profile identified in the + virtualLinkProfileId attribute."; + reference + "GS NFV IFA014: Section 6.3.7.2, NsVirutalLinkConnectivity + information element."; } } } - list pnf-profile { - key "pnfd"; - leaf pnfd { - type leafref { - path "../../../../pnfd/id"; - } + list virtual-link-profile { + key "id"; + + description + "VL profile to be used for the NS flavour."; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element"; + + leaf id { + type string; + description + "Uniquely identifies this VirtualLinkProfile + information element."; + reference + "GS NFV IFA014: Section 6.3.2.2 VirtualLinkProfile + information element"; } - // no virtual-link-connectivity as we don't have PNFD modelled. - } - list virtual-link-profile { - key "virtual-link-desc"; - leaf virtual-link-desc { + leaf virtual-link-desc-id { mandatory true; type leafref { path "../../../virtual-link-desc/id"; } + description + "Uniquely references a VLD."; + reference + "GS NFV IFA014: Section 6.3.2.2 VirtualLinkProfile + information element"; } - leaf flavor { + leaf flavor-id { mandatory true; type leafref { - path "deref(../virtual-link-desc)/../deployment-flavor/id"; + path "deref(../virtual-link-desc-id)/../df/id"; } + description + "Identifies a flavour within the VLD."; + reference + "GS NFV IFA014: Section 6.3.2.2 VirtualLinkProfile + information element"; } uses common:local-affinity-or-anti-affinity-rule; + list affinity-or-anti-affinity-group { key "id"; + description + "Identifies an affinity or anti-affinity group the + VLs instantiated according to the VlProfile belong + to."; + reference + "GS NFV IFA014: Section 6.3.4.2 VirtualLinkProfile + information element"; + leaf id { type leafref { path "../../../affinity-or-anti-affinity-group/id"; @@ -390,187 +953,536 @@ submodule etsi-nfv-ns { } container max-bitrate-requirements { + description + "Specifies the maximum bitrate requirements for a VL + instantiated according to this profile."; + reference + "GS NFV IFA014: Section 6.3.4.2 VirtualLinkProfile + information element"; uses common:link-bitrate-requirements; } container min-bitrate-requirements { + description + "Specifies the minimum bitrate requirements for a VL + instantiated according to this profile."; + reference + "GS NFV IFA014: Section 6.3.4.2 VirtualLinkProfile + information element"; uses common:link-bitrate-requirements; } } list scaling-aspect { - key "aspect"; - leaf aspect { + key "id"; + + description + "The scaling aspects supported by this DF of the NS."; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element"; + + leaf id { type string; + description + "Identifier of this NsScalingAspect information element. + It uniquely identifies the NS scaling aspect in an + NSD."; + reference + "GS NFV IFA014: Section 6.7.2.2 NsScalingAspect + information element"; } + leaf name { type string; + description + "Provides a human readable name of the NS scaling + aspect."; + reference + "GS NFV IFA014: Section 6.7.2.2 NsScalingAspect + information element"; } + leaf description { type string; + description + "Provides a human readable description of the NS + scaling aspect."; + reference + "GS NFV IFA014: Section 6.7.2.2 NsScalingAspect + information element"; } + leaf scaling-level { type leafref { - path "../../instantiation-level/id"; + path "../../ns-instantiation-level/id"; } + description + "Describes the details of an NS level."; + reference + "GS NFV IFA014: Section 6.7.2.2 NsScalingAspect + information element"; } } list affinity-or-anti-affinity-group { key "id"; + description + "Specifies affinity or anti-affinity relationship + applicable between the VNF instances created using + different VNFDs, the Virtual Link instances created + using different NsVirtualLinkDescs or the nested NS + instances created using different NSDs in the same + affinity or anti-affinity group."; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element"; + leaf id { type string; + description + "Identifier of Identifier of this + AffinityOrAntiAffinityGroup information element."; + reference + "GS NFV IFA014: Section 6.3.5.2 AffinityOrAntiAffinity + information element"; } leaf affinity-type { mandatory true; type common:affinity-type; + description + "Specifies the type of relationship that the members of + the group have: 'affinity' or 'anti-affinity.'"; + reference + "GS NFV IFA014: Section 6.3.5.2 AffinityOrAntiAffinity + information element"; } leaf affinity-scope { mandatory true; type common:affinity-scope; + description + "Specifies the scope of the affinity or anti-affinity + relationship e.g. a NFVI node, an NFVI PoP, etc."; + reference + "GS NFV IFA014: Section 6.3.5.2 AffinityOrAntiAffinity + information element"; } } - list instantiation-level { + list ns-instantiation-level { min-elements 1; key "id"; + + description + "Describes the details of an NS level."; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element + GS NFV IFA014: Section 6.7.2.2 NsScaling information + element"; + leaf id { type string; + description + "Identifier of this NsLevel information element. It + uniquely identifies an NS level within the DF."; + reference + "GS NFV IFA014: Section 6.3.9.2 NsLevel information + element"; } leaf description { - mandatory true; type string; + description + "Human readable description of the NS level."; + reference + "GS NFV IFA014: Section 6.3.9.2 NsLevel information + element"; } list vnf-to-level-mapping { - key "vnf-profile"; + key "vnf-profile-id"; + + description + "Specifies the profile of the VNFs involved in this NS + level and, for each of them, the required number of + instances."; + reference + "GS NFV IFA014: Section 6.3.9.2 NsLevel information + element"; - leaf vnf-profile { + leaf vnf-profile-id { type leafref { path "../../../vnf-profile/id"; } + description + "Identifies the profile to be used for a VNF + involved in an NS level."; + reference + "GS NFV IFA014: Section 6.7.4.2 VnfToLevelMapping + information element"; } leaf number-of-instances { mandatory true; type uint32; + description + "Specifies the number of VNF instances required for + an NS level."; + reference + "GS NFV IFA014: Section 6.7.4.2 VnfToLevelMapping + information element"; } } - list vl-to-level-mapping { - key "virtual-link-profile"; + list virtual-link-to-level-mapping { + key "virtual-link-profile-id"; + + description + "Specifies the profile of the VLs involved in this NS + level and, for each of them, the needed bandwidth."; + reference + "GS NFV IFA014: Section 6.3.9.2 NsLevel information + element"; - leaf virtual-link-profile { + leaf virtual-link-profile-id { type leafref { - path "../../../virtual-link-profile/" + - "virtual-link-desc"; + path "../../../virtual-link-profile/id"; } + description + "Identifies the profile to be used for a VL involved + in an NS level."; + reference + "GS NFV IFA014: Section 6.7.5.2 + VirtualLinkToLevelMapping information element"; } uses common:link-bitrate-requirements; } - must "(count(vnf-to-level-mapping) + " + - "count(vl-to-level-mapping)) > 0"; - list ns-to-level-mapping { - key "ns-profile"; - leaf ns-profile { + key "ns-profile-id"; + + description + "Specifies the profile of the nested NSs involved in + this NS level and, for each of them, the required + number of instances."; + reference + "GS NFV IFA014: Section 6.3.9.2 NsLevel information + element"; + + leaf ns-profile-id { type leafref { - path "../../../ns-profile/nsd"; + path "../../../ns-profile/id"; } + description + "Identifies the profile to be used for a nested NS + involved in the NS level."; + reference + "GS NFV IFA014: Section 6.7.6.2 NsToLevel information + element"; } leaf number-of-instances { mandatory true; type uint32; + description + "Specifies the number of nested NS instances required + for the NS scale level."; + reference + "GS NFV IFA014: Section 6.7.6.2 NsToLevel information + element"; } } + + must "(count(vnf-to-level-mapping) + " + + "count(virtual-link-to-level-mapping) + " + + "count(ns-to-level-mapping)) > 0" { + error-message "At least one attribute between " + + "vnf-to-level-mapping, " + + "virtual-link-to-level-mapping and " + + "ns-to-level-mapping shall be present."; + description + "At least one attribute between vnfToLevelMapping, + vlirtualLinkToLevelMapping and nsToLevelMapping shall + be present."; + reference + "GS NFV IFA014: Section 6.3.9.2 NsLevel information + element"; + } } leaf default-instantiation-level { type leafref { - path "../instantiation-level/id"; + path "../ns-instantiation-level/id"; } + description + "Identifies the NS level which represents the default NS + instantiation level for this DF. It shall be present if + there are multiple 'nsIinstantiationLevel' entries."; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element"; } list ns-profile { - must "min-number-of-instances<=max-number-of-instances"; - key "nsd"; - leaf nsd { + must "min-number-of-instances <= max-number-of-instances" { + error-message + "min-number-of-instances has to be less than or equal" + + "max-number-of-instances."; + } + must "boolean(../../nested-nsd-id[.=current()/nsd-id])" { + error-message "PNFDs in the profile has to be listed as a " + + "dependency of the network service " + + "descriptor."; + } + key "id"; + + description + "Specifies a NS Profile supported by this NS DF."; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element"; + + leaf id { + type string; + description + "Identifies an NS profile."; + reference + "GS NFV IFA014: Section 6.3.11.2 NsProfile information + element"; + } + leaf nsd-id { + mandatory true; type leafref { - path "../../../nested-nsd"; + path "/nfv/nsd/id"; } + description + "Identifies the NSD applicable to NS instantiated + according to this profile."; + reference + "GS NFV IFA014: Section 6.3.11.2 NsProfile information + element"; } - leaf deployment-flavor { + leaf ns-df-id { + mandatory true; type leafref { - path "/nfv/nsd[id=current()/../nsd]/deployment-flavor/id"; + path "deref(../nsd-id)/../df/id"; } + description + "Identifies the applicable network service DF within + the scope of the NSD."; + reference + "GS NFV IFA014: Section 6.3.11.2 NsProfile information + element"; } - leaf instantiation-level { + leaf instantiation-level-id { + mandatory true; type leafref { - path "deref(../deployment-flavor)/../instantiation-level/id"; + path "deref(../ns-df-id)/../ns-instantiation-level/id"; } + description + "Identifies the NS level within the referenced NS DF to + be used in the context of the parent NS instantiation. + If not present, the default NS instantiation level as + declared in the referenced NSD shall be used."; + reference + "GS NFV IFA014: Section 6.3.11.2 NsProfile information + element"; } leaf min-number-of-instances { type uint16; mandatory true; + description + "Minimum number of nested NS instances based on the + referenced NSD that is permitted to exist for this + NsProfile."; + reference + "GS NFV IFA014: Section 6.3.11.2 NsProfile information + element"; } leaf max-number-of-instances { type uint16; mandatory true; + description + "Maximum number of nested NS instances based on the + referenced NSD that is permitted to exist for this + NsProfile."; + reference + "GS NFV IFA014: Section 6.3.11.2 NsProfile information + element"; } - uses common:local-affinity-or-anti-affinity-rule; - list affinity-or-anti-affinity-group { + + list affinity-or-anti-affinity-group-id { key "id"; + description + "Identifies an affinity or anti-affinity group the NSs + created according to this NsProfile belongs to."; + reference + "GS NFV IFA014: Section 6.3.11.2 NsProfile information + element"; + leaf id { type leafref { path "../../../affinity-or-anti-affinity-group/id"; } } } + + list virtual-link-connectivity { + key "virtual-link-profile-id"; + + leaf virtual-link-profile-id { + type leafref { + path "../../../virtual-link-profile/id"; + } + description + "Reference an NS VL profile."; + reference + "GS NFV IFA014: Section 6.3.7.2, NsVirutalLinkConnectivity + information element."; + } + leaf-list cpd-id { + type leafref { + path "deref(../../nsd-id)/../sapd/id"; + } + description + "References the descriptor of a connection point on a + VNF/PNF or a SAP which connects to virtual links + instantiated from the profile identified in the + virtualLinkProfileId attribute."; + reference + "GS NFV IFA014: Section 6.3.7.2, NsVirutalLinkConnectivity + information element."; + } + description + "Defines the connection information of the NS, it + contains connection relationship between an NS SAP and + a NS virtual Link of the composite NS."; + reference + "GS NFV IFA014: Section 6.3.11.2 NsProfile information + element"; + } } - list dependency { - description - "NFV Management and Orchestration functions shall instantiate - VNFs from the VnfProfile and/or nested NSs from the NsProfile - referenced in the primary attribute before instantiating VNFs - from the VnfProfile and/or nested NSs from the NsProfile - referenced in the secondary attribute."; + list dependencies { key "id"; + + description + "Specifies the order in which instances of the VNFs and/or + nested NSs have to be created."; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element"; + leaf id { type string; } - choice primary { + choice primary-id { leaf primary-vnf-profile { type leafref { - path "../../vnf-profile/vnfd"; + path "../../vnf-profile/vnfd-id"; } } leaf primary-ns-profile { type leafref { - path "../../ns-profile/nsd"; + path "../../ns-profile/nsd-id"; } } + description + "References a VnfProfile or NsProfile."; + reference + "GS NFV IFA014: Section 6.3.12.2 Dependencies + information element"; } - choice secondary { + choice secondary-id { leaf secondary-vnf-profile { type leafref { - path "../../vnf-profile/vnfd"; + path "../../vnf-profile/vnfd-id"; } } leaf secondary-ns-profile { type leafref { - path "../../ns-profile/nsd"; + path "../../ns-profile/nsd-id"; } } + description + "References a VnfProfile or NsProfile."; + reference + "GS NFV IFA014: Section 6.3.12.2 Dependencies + information element"; } } + + list monitored-info { + key "id"; + + leaf id { + type string; + } + + container vnf-indicator-info { + leaf vnfd-id { + type leafref { + path "/nfv/vnfd/id"; + } + description + "Identifies a VNFD."; + reference + "GS NFV IFA014: Section 6.2.7.2 VnfIndicatorData + information element"; + } + leaf vnf-indicator { + mandatory true; + type leafref { + path "deref(../vnfd-id)/../indicator/id"; + } + description + "Identifies a VNF indicator within the VNFD."; + reference + "GS NFV IFA014: Section 6.2.7.2 VnfIndicatorData + information element"; + } + description + "Uniquely identifies this VNF Indicator information + element."; + reference + "GS NFV IFA014: Section 6.2.6.2 MonitoredData + information element"; + } + + // monitoringParameter in IFA014 is defined by MonitoredData + // whereas monitoringParameter in IFA011 is defined by + // MonitoringParameter. + container monitoring-parameter { + leaf id { + type string; + description + "Unique identifier of this monitoring parameter + information element."; + reference + "GS NFV IFA014: Section 6.2.8.2 MonitoringParameter + information element"; + } + + leaf name { + type string; + description + "Human readable name of the monitoring parameter."; + reference + "GS NFV IFA014: Section 6.2.8.2 MonitoringParameter + information element"; + } + + leaf performance-metric { + mandatory true; + type string; + description + "Defines the virtualised resource-related performance + metric."; + reference + "GS NFV IFA014: Section 6.2.8.2 MonitoringParameter + information element"; + } + } + } } uses common:security-parameters; } diff --git a/src/yang/etsi-nfv-pnf.yang b/src/yang/etsi-nfv-pnf.yang index a447d38..6203035 100644 --- a/src/yang/etsi-nfv-pnf.yang +++ b/src/yang/etsi-nfv-pnf.yang @@ -1,4 +1,5 @@ submodule etsi-nfv-pnf { + yang-version 1.1; belongs-to etsi-nfv { prefix nfv; } @@ -10,11 +11,6 @@ submodule etsi-nfv-pnf { prefix common; } - /* - * Include - */ - include etsi-nfv-ns; - description "Models for PNFD according to GS NFV-IFA 014."; @@ -37,7 +33,9 @@ submodule etsi-nfv-pnf { reference "GS NFV-IFA014: Section 6.6.2, Pnfd information element"; - container pnfd { + list pnfd { + key "id"; + leaf id { type string; description @@ -83,7 +81,7 @@ submodule etsi-nfv-pnf { reference "GS NFV-IFA014: Section 6.6.2, Pnfd information element"; } - list ext-cp { + list ext-cpd { key "id"; uses common:cpd; description diff --git a/src/yang/etsi-nfv-vnf.yang b/src/yang/etsi-nfv-vnf.yang index 7979e1f..0ee785a 100755 --- a/src/yang/etsi-nfv-vnf.yang +++ b/src/yang/etsi-nfv-vnf.yang @@ -1,4 +1,5 @@ submodule etsi-nfv-vnf { + yang-version 1.1; belongs-to etsi-nfv { prefix nfv; } @@ -12,7 +13,6 @@ submodule etsi-nfv-vnf { import etsi-nfv-common { prefix common; } - include etsi-nfv-ns; description "Models for VNFD according to GS NFV-IFA 011."; @@ -101,6 +101,161 @@ submodule etsi-nfv-vnf { } } + // This grouping definition is for use within Vnfd as defined in + // IFA011. A similar definition of Cpd exists in IFA014, but + // that is for use with Sapd and Pnfd. Do not use this grouping + // for that. + grouping cpd { + description + "A Cpd information element describes network + connectivity to a compute resource or a VL."; + reference + "GS NFC IFA011: Section 7.1.6.3 Cpd Information + Element"; + leaf id { + type string; + description + "Identifier of this Cpd information element."; + reference + "GS NFV IFA011: Section 7.1.6.3, Cpd information element."; + } + leaf layer-protocol { + mandatory true; + type identityref { + base common:layer-protocol; + } + description + "Identifies which protocol the CP uses for connectivity + purposes (Ethernet, MPLS, ODU2, IPV4, IPV6, Pseudo-Wire, + etc.)."; + reference + "GS NFV IFA011: Section 7.1.6.3, Cpd information element."; + } + leaf role { + type identityref { + base common:cp-role; + } + description + "Identifies the role of the port in the context of the + traffic flow patterns in the VNF or parent NS. For example a + VNF with a tree flow pattern within the VNF will have legal + cpRoles of ROOT and LEAF."; + reference + "GS NFV IFA011: Section 7.1.6.3, Cpd information element."; + } + leaf description { + type string; + description + "Human readable description of the connection point"; + reference + "GS NFV IFA011: Section 7.1.6.3, Cpd information element."; + } + container protocol { + description + "Identifies the protocol layering information the CP uses for + connectivity purposes and associated information. There shall + be one cpProtocol for each layer protocol as indicated by the + attribute layerProtocol."; + reference + "GS NFV IFA011: Section 7.1.6.3, Cpd information element."; + leaf associated-layer-protocol { + type identityref { + base common:layer-protocol; + } + description + "One of the values of the attribute layerProtocol of the Cpd + IE."; + reference + "GS NFV IFA011: Section 7.1.6.8, CpProtocolData information + element."; + } + + list address-data { + key "address-type"; + leaf address-type { + type identityref { + base common:address-type; + } + description + "Describes the type of the address to be assigned to the CP + instantiated from the parent CPD. + Value: + • MAC address. + • IP address. + • … + The content type shall be aligned with the address type + supported by the layerProtocol attribute of the parent CPD."; + reference + "GS NFV IFA011: Section 7.1.3.3, AddressData information + element."; + } + container l2-address-data { + when "../address-type='mac-address'"; + } + container l3-address-data { + when "../address-type='ip-address'"; + leaf ip-address-assignment { + type boolean; + description + "Specify if the address assignment is the responsibility + of management and orchestration function or not. If it + is set to True, it is the management and orchestration + function responsibility. "; + reference + "GS NFV IFA011: Section 7.1.3.4, L3AddressData + information element."; + } + leaf floating-ip-activated { + type boolean; + description + "Specify if the floating IP scheme is activated on the CP + or not."; + reference + "GS NFV IFA011: Section 7.1.3.4, L3AddressData + information element."; + } + leaf ip-address-type { + type enumeration { + enum "ipv4"; + enum "ipv6"; + } + description + "Define address type. The address type should be aligned + with the address type supported by the layerProtocol + attribute of the parent VnfExtCpd."; + reference + "GS NFV IFA011: Section 7.1.3.4, L3AddressData + information element."; + } + leaf number-of-ip-addresses { + type uint32; + description + "Minimum number of IP addresses to be assigned based on + this L3AddressData information element."; + reference + "GS NFV IFA011: Section 7.1.3.4, L3AddressData + information element."; + } + } + description + "The AddressData information element supports providing + information about the addressing scheme and parameters + applicable to a CP."; + reference + "GS NFV IFA011: Section 7.1.3.3, AddressData information + element."; + } + } + leaf trunk-mode { + type boolean; + description + "Information about whether the CP instantiated from this CPD + is in Trunk mode (802.1Q or other)."; + reference + "GS NFV IFA011: Section 7.1.6.3, Cpd information element."; + } + } + grouping vnfd { list vnfd { key "id"; @@ -241,6 +396,7 @@ submodule etsi-nfv-vnf { an external connection point."; reference "GS NFV IFA011: Section 7.1.6.2, Vdu information element"; + choice cp-connection { mandatory true; description @@ -294,13 +450,19 @@ submodule etsi-nfv-vnf { "GS NFV IFA011: Section 7.1.6.4, VduCpd information element."; } - uses common:cpd; + + uses cpd; } leaf virtual-compute-desc { type leafref { path "../../nfv:virtual-compute-descriptor/" + "nfv:id"; } + must "../../nfv:virtual-compute-descriptor[id=current()]/" + + "nfv:virtual-memory/size >=" + + "../../nfv:sw-image-desc[id=current()/" + + "../sw-image-desc]/min-ram" { + } description "Describes CPU, Memory and acceleration requirements of the Virtualisation Container realizing this VDU."; @@ -553,7 +715,6 @@ submodule etsi-nfv-vnf { fraction-digits 1; range "0..max"; } - must ". >= ../../../sw-image-desc[id=current()]/min-ram"; units "Gb"; mandatory true; description @@ -729,8 +890,6 @@ submodule etsi-nfv-vnf { related to Virtual Storage."; } leaf size-of-storage { - must ". >= ../../sw-image-desc[id=current()]/min-disk"; - type uint64; units "Gb"; mandatory true; @@ -768,6 +927,9 @@ submodule etsi-nfv-vnf { type leafref { path "../../sw-image-desc/id"; } + must "../nfv:size-of-storage >=" + + "../../nfv:sw-image-desc[id=current()]/min-disk" { + } description "Software image to be loaded on the VirtualStorage resource created based on this VirtualStorageDesc."; @@ -777,7 +939,8 @@ submodule etsi-nfv-vnf { } } - container sw-image-desc { + list sw-image-desc { + key "id"; description "Defines descriptors of software images to be used by the VNF."; @@ -916,6 +1079,7 @@ submodule etsi-nfv-vnf { leaf min-disk { type uint64; units "Gb"; + default 0; description "The minimal disk size requirement for this software image. The value of the 'size of storage' attribute @@ -932,6 +1096,7 @@ submodule etsi-nfv-vnf { range "0..max"; } units "Gb"; + default 0; description "The minimal RAM requirement for this software image. The value of the 'size' attribute of @@ -1122,10 +1287,10 @@ submodule etsi-nfv-vnf { ext-CP to the VDU's CP. */ uses virtual-network-interface-requirements; - uses common:cpd; + uses cpd; } - list deployment-flavor { + list df { must "nfv:default-instantiation-level or " + "count(nfv:instantiation-level) = 1"; key "id"; @@ -1335,11 +1500,11 @@ submodule etsi-nfv-vnf { } leaf number-of-instances { type uint16; - must ". <= ../../../../nfv:deployment-flavor/" + - "nfv:vdu-profile[id=current()]/" + + must ". <= ../../../../nfv:df/" + + "nfv:vdu-profile[id=current()/../nfv:id]/" + "nfv:max-number-of-instances"; - must ". >= ../../../../nfv:deployment-flavor/" + - "nfv:vdu-profile[id=current()]/" + + must ". >= ../../../../nfv:df/" + + "nfv:vdu-profile[id=current()/../nfv:id]/" + "nfv:min-number-of-instances"; mandatory true; description @@ -1694,31 +1859,160 @@ submodule etsi-nfv-vnf { "GS NFV IFA011: Section 7.1.10.2 ScalingAspect information element"; } - leaf associated-group { - type leafref { - path "../../../nfv:element-group/nfv:id"; + leaf max-scale-level { + type uint32 { + range "1..max"; } description - "Reference to the group of Vnfd elements defining this - aspect. If present, scaling for this aspect is limited - to the elements of the group, but there is no - assumption that all the elements of the groups will be - increased at each step."; + "The maximum scaleLevel for total number of scaling + steps that can be applied w.r.t. this aspect. The + value of this attribute corresponds to the number of + scaling steps can be applied to this aspect when + scaling it from the minimum scale level (i.e. 0) to the + maximum scale level defined by this attribute."; reference "GS NFV IFA011: Section 7.1.10.2 ScalingAspect information element"; } - leaf max-scale-level { - type uint32 { - range "1..max"; + + container aspect-delta-details { + list deltas { + key "id"; + min-elements 1; + + leaf id { + type string; + description + "Identifier of this scaling delta."; + reference + "GS NFV IFA011: Section 7.1.10.4 ScalingDelta + information element"; + } + + list vdu-delta { + key "id"; + + leaf id { + type leafref { + path "/nfv/vnfd/vdu/id"; + } + description + "Uniquely identifies a VDU."; + reference + "GS NFV IFA011: Section 7.1.8.9 VduLevel + information element"; + } + + leaf number-of-instances { + type uint32 { + range "0..max"; + } + description + "Number of instances of VNFC based on this VDU to + deploy for an instantiation level or for a + scaling delta. Shall be zero or greater."; + reference + "GS NFV IFA011: Section 7.1.8.9 VduLevel + information element"; + } + description + "The number of VNFC instances based on particular + VDUs to be created or removed."; + reference + "GS NFV IFA011: Section 7.1.10.4 ScalingDelta + information element"; + } + + list virtual-link-bit-rate-delta { + key "id"; + + leaf id { + type string; + description + "Uniquely identifies a VnfVirtualLinkDesc."; + reference + "GS NFV IFA011: Section 7.1.10.5 + VirtualLinkBitRateLevel information element"; + } + + container bit-rate-requirements { + leaf root { + type uint32; + units bits/sec; + mandatory true; + description + "Throughput requirement of the link (e.g. + bitrate of E-Line, root bitrate of E-Tree, + aggregate capacity of E-LAN)."; + reference + "GS NFV IFA011: Section 7.1.8.6 + LinkBitrateRequirements information element"; + } + + leaf leaf { + type uint32; + units bits/sec; + description + "Throughput requirement of leaf connections to + the link when applicable to the connectivity + type (e.g. for E-Tree and E-LAN branches)."; + reference + "GS NFV IFA011: Section 7.1.8.6 + LinkBitrateRequirements information element"; + } + description + "Bitrate requirements for an instantiation level + or bitrate delta for a scaling step."; + reference + "GS NFV IFA011: Section 7.1.10.5 + VirtualLinkBitRateLevel information element"; + } + description + "The bitrate to be added or removed to virtual links + created from particular virtual link descriptors."; + reference + "GS NFV IFA011: Section 7.1.10.4 ScalingDelta + information element"; + } + description + "Declares different scaling deltas, each of which is + applied for one or more scaling steps of this + aspect."; + reference + "GS NFV IFA011: Section 7.1.10.3 AspectDeltaDetails + information element"; + } + + leaf step-deltas { + type leafref { + path "../deltas/id"; + } + description + "Identifiers of the individual scaling deltas to be + applied for the subsequent scaling steps of this + aspect. The first entry in the array shall correspond + to the first scaling step (between scale levels 0 to + 1) and the last entry in the array shall correspond + to the last scaling step (between maxScaleLevel-1 + and maxScaleLevel). + + Each referenced scaling delta shall be declared in + the 'deltas' attribute."; + reference + "GS NFV IFA011: Section 7.1.10.3 AspectDeltaDetails + information element"; } description - "The maximum scaleLevel for total number of scaling - steps that can be applied w.r.t. this aspect. The value - of this attribute corresponds to the number of scaling - steps can be applied to this aspect when scaling it - from the minimum scale level (i.e. 0) to the maximum - scale level defined by this attribute."; + "A specification of the deltas in terms of number of + instances of VNFCs and virtual link bit rates that + correspond to the scaling steps of this aspect. A + cardinality of zero indicates that this mapping has to + be specified in a lifecycle management script or be + otherwise known to the VNFM. The information in this + attribute, if provided, shall be consistent with the + information provided in the 'InstantiationLevel' + information element. If this attribute is provided, it + shall be provided for all scaling aspects."; reference "GS NFV IFA011: Section 7.1.10.2 ScalingAspect information element"; diff --git a/src/yang/etsi-nfv.yang b/src/yang/etsi-nfv.yang index 2fc5960..4865b24 100644 --- a/src/yang/etsi-nfv.yang +++ b/src/yang/etsi-nfv.yang @@ -1,10 +1,8 @@ module etsi-nfv { + yang-version 1.1; namespace "urn:etsi:params:xml:ns:yang:etsi-nfv"; prefix nfv; - import etsi-nfv-common { - prefix common; - } include etsi-nfv-vnf; include etsi-nfv-pnf; include etsi-nfv-ns; @@ -26,5 +24,5 @@ module etsi-nfv { uses vnfd; uses nsd; uses pnfd; - } // nfv + } } -- GitLab