From 0463e0486c74de73af6baf9d4062caf73c84ac5d Mon Sep 17 00:00:00 2001 From: Mahesh Jethanandani Date: Tue, 25 Jun 2019 16:38:05 -0700 Subject: [PATCH] Address bug#224 --- example-data/complex-vnfd.xml | 12 +- example-data/nfv-nsd.xml | 285 ++++++++++++++++++---------------- example-data/nfv-vnfd.xml | 1 + src/yang/etsi-nfv-ns.yang | 38 ++--- src/yang/etsi-nfv-nsd.yang | 26 ---- src/yang/etsi-nfv-vnf.yang | 14 +- 6 files changed, 183 insertions(+), 193 deletions(-) diff --git a/example-data/complex-vnfd.xml b/example-data/complex-vnfd.xml index b10ec9f..39bbbaf 100644 --- a/example-data/complex-vnfd.xml +++ b/example-data/complex-vnfd.xml @@ -78,11 +78,11 @@ 16 - + root root-storage 10 - + CP CP @@ -116,17 +116,13 @@ internal-vl - - ipv4 - + ipv4 mgmt - - ipv4 - + ipv4 diff --git a/example-data/nfv-nsd.xml b/example-data/nfv-nsd.xml index ba4ec2d..85d1455 100644 --- a/example-data/nfv-nsd.xml +++ b/example-data/nfv-nsd.xml @@ -1,135 +1,152 @@ - - - ASA - My Company - My Company ASAv - 9.8 - 9.8 - My Company Vnfm - - firewall - Firewall VDU - - inside - nfv:ethernet - - - management - nfv:ethernet - - - outside - nfv:ethernet - - asa-vcd - asa-vsd - asa-image - - - asa-vcd - - 4.0 - - - 2 - - - - asa-vsd - nfv:root-storage - 0 - - - asa-image - ASA image - 1.1 - - nfv:sha-224 - deadbeef - - bare - qcow2 - 2.0 - 1 - http://www.cisco.com/asa.qcow2 - - - inside - - firewall - inside - - nfv:ethernet - - - management - - firewall - management - - nfv:ethernet - - - outside - - firewall - outside - - nfv:ethernet - - - normal - - firewall - 1 - 2 - - - double - - firewall - 2 - - - - single - - firewall - 1 - - - single - - - - firewall-nsd - ASA - - inside - - - management - - - outside - - - firewall - - firewall - ASA - normal - single - 1 - 1 - - - single - - firewall - 1 - - - + + + + + ASA + My Company + My Company ASAv + 9.8 + 9.8 + My Company Vnfm + + firewall + Firewall VDU + + inside + ethernet + + + management + ethernet + + + outside + ethernet + + asa-vcd + asa-vsd + asa-image + + + asa-vcd + + 4.0 + + + 2 + + + + asa-vsd + root-storage + 0 + + + asa-image + ASA image + 1.1 + + sha-224 + deadbeef + + bare + qcow2 + 1 + 2.0 + 1 + http://mycompany.images.com/asa.qcow2 + + + inside + + firewall + inside + + ethernet + + + management + + firewall + management + + ethernet + + + outside + + firewall + outside + + ethernet + + + normal + + firewall + 1 + 2 + + + double + + firewall + 2 + + + + single + + firewall + 1 + + + single + + + true + + + 1 + + + 1 + + + + + + + + firewall-nsd + ASA + + inside + + + management + + + outside + + + firewall + + firewall + ASA + normal + single + 1 + 1 + + + single + + firewall + 1 + + + + - + diff --git a/example-data/nfv-vnfd.xml b/example-data/nfv-vnfd.xml index 7587240..6b76c43 100644 --- a/example-data/nfv-vnfd.xml +++ b/example-data/nfv-vnfd.xml @@ -48,6 +48,7 @@ bare qcow2 + 1 2.0 1 http://www.cisco.com/asa.qcow2 diff --git a/src/yang/etsi-nfv-ns.yang b/src/yang/etsi-nfv-ns.yang index 1eb49ce..44fa558 100644 --- a/src/yang/etsi-nfv-ns.yang +++ b/src/yang/etsi-nfv-ns.yang @@ -97,7 +97,7 @@ submodule etsi-nfv-ns { leaf-list vnfd-id { type leafref { - path "../../vnfd/id"; + path "/nfv:nfv/nfv:vnfd/nfv:id"; } description "References the VNFD of a constituent VNF."; @@ -108,7 +108,7 @@ submodule etsi-nfv-ns { leaf-list pnfd-id { type leafref { - path "../../pnfd/id"; + path "/nfv:nfv/nfv:pnfd/nfv:id"; } description "References the PNFD of a constituent PNF."; @@ -164,7 +164,7 @@ submodule etsi-nfv-ns { leaf vnfd-id { mandatory true; type leafref { - path "../../../../vnfd/id"; + path "/nfv:nfv/nfv:vnfd/nfv:id"; } must "boolean(../../../vnfd-id[.=current()])"; } @@ -172,7 +172,7 @@ submodule etsi-nfv-ns { leaf ext-cpd-id { mandatory true; type leafref { - path "deref(../vnfd-id)/../ext-cpd/id"; + path "deref(../vnfd-id)/../nfv:ext-cpd/nfv:id"; } } } @@ -181,7 +181,7 @@ submodule etsi-nfv-ns { leaf pnfd-id { mandatory true; type leafref { - path "../../../../pnfd/id"; + path "/nfv:nfv/nfv:pnfd/nfv:id"; } must "boolean(../pnfd-id[.=current()])"; } @@ -189,7 +189,7 @@ submodule etsi-nfv-ns { leaf ext-cpd-id { mandatory true; type leafref { - path "deref(../pnfd-id)/../ext-cpd/id"; + path "deref(../pnfd-id)/../nfv:ext-cpd/nfv:id"; } } } @@ -472,12 +472,12 @@ submodule etsi-nfv-ns { must ". = deref(../../vnfd-profile-id)/../vnfd-id" { } type leafref { - path "../../../../../vnfd/id"; + path "/nfv:nfv/nfv:vnfd/nfv:id"; } } leaf cpd-id { type leafref { - path "deref(../vnfd-id)/../ext-cpd/id"; + path "deref(../vnfd-id)/../nfv:ext-cpd/nfv:id"; } } } @@ -486,12 +486,12 @@ submodule etsi-nfv-ns { must ". = deref(../../pnfd-profile-id)/../pnfd-id" { } type leafref { - path "../../../../../pnfd/id"; + path "/nfv:nfv/nfv:pnfd/nfv:id"; } } leaf pnf-cpd-id { type leafref { - path "deref(../pnfd-id)/../ext-cpd/id"; + path "deref(../pnfd-id)/../nfv:ext-cpd/nfv:id"; } } } @@ -642,6 +642,7 @@ submodule etsi-nfv-ns { leaf-list autoscale-rule { type string; } + list lifecycle-management-script { key "event"; leaf event { @@ -721,7 +722,7 @@ submodule etsi-nfv-ns { leaf vnfd-id { mandatory true; type leafref { - path "../../../../vnfd/id"; + path "/nfv:nfv/nfv:vnfd/nfv:id"; } description "References a VNFD."; @@ -733,7 +734,7 @@ submodule etsi-nfv-ns { leaf flavour-id { mandatory true; type leafref { - path "deref(../vnfd-id)/../df/id"; + path "deref(../vnfd-id)/../nfv:df/nfv:id"; } description "Identifies a flavour within the VNFD."; @@ -745,7 +746,8 @@ submodule etsi-nfv-ns { leaf instantiation-level { mandatory true; type leafref { - path "deref(../flavour-id)/../instantiation-level/id"; + path "deref(../flavour-id)/../nfv:instantiation-level/" + + "nfv:id"; } description "Identifier of the instantiation level of the VNF DF @@ -845,7 +847,7 @@ submodule etsi-nfv-ns { leaf constituent-cpd-id { type leafref { - path "deref(../../../vnfd-id)/../ext-cpd/id"; + path "deref(../../../vnfd-id)/../nfv:ext-cpd/nfv:id"; } description "A reference to the descriptor of a connection point @@ -879,7 +881,7 @@ submodule etsi-nfv-ns { leaf pnfd-id { type leafref { - path "../../../../pnfd/id"; + path "/nfv:nfv/nfv:pnfd/nfv:id"; } description "References a PNFD."; @@ -935,7 +937,7 @@ submodule etsi-nfv-ns { leaf constituent-cpd-id { type leafref { - path "deref(../../../pnfd-id)/../ext-cpd/id"; + path "deref(../../../pnfd-id)/../nfv:ext-cpd/nfv:id"; } description "A reference to the descriptor of a connection point @@ -1506,7 +1508,7 @@ submodule etsi-nfv-ns { container vnf-indicator-info { leaf vnfd-id { type leafref { - path "../../../../../vnfd/id"; + path "/nfv:nfv/nfv:vnfd/nfv:id"; } description "Identifies a VNFD."; @@ -1518,7 +1520,7 @@ submodule etsi-nfv-ns { leaf vnf-indicator { mandatory true; type leafref { - path "deref(../vnfd-id)/../indicator/id"; + path "deref(../vnfd-id)/../nfv:indicator/nfv:id"; } description "Identifies a VNF indicator within the VNFD."; diff --git a/src/yang/etsi-nfv-nsd.yang b/src/yang/etsi-nfv-nsd.yang index 52cd508..ad3d05d 100644 --- a/src/yang/etsi-nfv-nsd.yang +++ b/src/yang/etsi-nfv-nsd.yang @@ -20,19 +20,6 @@ module etsi-nfv-nsd { } container nsd { - list vnfd { - key "id"; - description - "A VNF Descriptor (VNFD) is a deployment template which - describes a VNF in terms of deployment and operational - behaviour requirements. It also contains connectivity, - interface and virtualised resource requirements"; - reference - "GS NFV-IFA011: Section 7.1.2, VNFD information element"; - - uses vnf:vnfd; - } - list nsd { key "id"; max-elements 1; @@ -45,18 +32,5 @@ module etsi-nfv-nsd { "GS NFV-IFA014: Section 6.2.2, Network Service Descriptor information element"; } - - list pnfd { - key "id"; - - description - "The Pnfd information element is a deployment template - enabling on-boarding PNFs and referencing them from an - NSD. It focuses on connectivity aspects only."; - reference - "GS NFV-IFA014: Section 6.6.2, Pnfd information element."; - - uses vnf:pnfd; - } } } diff --git a/src/yang/etsi-nfv-vnf.yang b/src/yang/etsi-nfv-vnf.yang index 43c1109..41dc8b3 100755 --- a/src/yang/etsi-nfv-vnf.yang +++ b/src/yang/etsi-nfv-vnf.yang @@ -236,7 +236,7 @@ submodule etsi-nfv-vnf { leaf int-virtual-link-desc { type leafref { - path "../../../int-virtual-link-desc/id"; + path "/nfv:nfv/nfv:vnfd/nfv:int-virtual-link-desc/nfv:id"; } description "Reference of the internal VLD which this internal CPD @@ -259,7 +259,7 @@ submodule etsi-nfv-vnf { leaf nicio-requirements { type leafref { - path "../../../virtual-compute-desc/id"; + path "/nfv:nfv/nfv:vnfd/nfv:virtual-compute-desc/nfv:id"; } description "This references (couples) the CPD with any logical node I/O @@ -1221,7 +1221,7 @@ submodule etsi-nfv-vnf { Descriptor (CPD) connect. Either intVirtualLinkDesc or intCpd shall be present."; type leafref { - path "../../int-virtual-link-desc/id"; + path "/nfv:nfv/nfv:vnfd/nfv:int-virtual-link-desc/nfv:id"; } } @@ -1243,7 +1243,7 @@ submodule etsi-nfv-vnf { leaf nicio-requirements { type leafref { - path "../../virtual-compute-desc/id"; + path "/nfv:nfv/nfv:vnfd/nfv:virtual-compute-desc/nfv:id"; } description "This references (couples) the CPD with any logical node I/O @@ -1374,7 +1374,7 @@ submodule etsi-nfv-vnf { leaf id { type leafref { - path "../../../int-virtual-link-desc/id"; + path "/nfv:nfv/nfv:vnfd/nfv:int-virtual-link-desc/nfv:id"; } description "Uniquely identifies a Vnf VLD."; @@ -1386,7 +1386,7 @@ submodule etsi-nfv-vnf { leaf flavour { type leafref { path "deref(../../../ext-cpd/int-virtual-link-desc)" + - "/../flavour/id"; + "/../nfv:flavour/nfv:id"; } description "Identifies a flavour within the VnfVirtualLinkDesc."; @@ -2713,7 +2713,7 @@ submodule etsi-nfv-vnf { leaf-list virtual-link-desc { type leafref { - path "../../int-virtual-link-desc/id"; + path "/nfv:nfv/nfv:vnfd/nfv:int-virtual-link-desc/nfv:id"; } description "References to VnfVirtualLinkDesc that are part of this -- GitLab