X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=models%2Fplugins%2Fyang%2Fnsd.yang;h=0cadca316742bd79a7355ac0ba35acec6987bb0b;hb=7749bcbc2837e49b50e6ecfb8cdfa48e02b45bcf;hp=ac0987c94720c2becb2e991a74559dbe77cbb4cc;hpb=49868d2c71eb364cee9707515be6841a568dad40;p=osm%2FSO.git diff --git a/models/plugins/yang/nsd.yang b/models/plugins/yang/nsd.yang index ac0987c9..0cadca31 100644 --- a/models/plugins/yang/nsd.yang +++ b/models/plugins/yang/nsd.yang @@ -124,38 +124,6 @@ module nsd } } - grouping ns-initial-config-primitive { - 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 { - key "name"; - leaf name { - type string; - } - - leaf value { - type string; - } - } - } - grouping nsd-descriptor { leaf id { description "Identifier for the NSD."; @@ -283,7 +251,7 @@ module nsd list vnfd-connection-point-ref { description "A list of references to connection points."; - key "member-vnf-index-ref"; + key "member-vnf-index-ref vnfd-connection-point-ref"; leaf member-vnf-index-ref { description "Reference to member-vnf within constituent-vnfds"; @@ -292,40 +260,44 @@ module nsd } } - 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: An issue with confd is preventing the - use of xpath. Seems to be an issue with leafref - to leafref, whose target is in a different module. - Once that is resovled this will switched to use - leafref"; - type string; - } - - leaf vnfd-connection-point-ref { - description - "A reference to a connection point name - in a vnfd. This is a leafref to path: - /vnfd:vnfd-catalog/vnfd:vnfd - + [vnfd:id = current()/../nsd:vnfd-id-ref] - + /vnfd:connection-point/vnfd:name - NOTE: An issue with confd is preventing the - use of xpath. Seems to be an issue with leafref - to leafref, whose target is in a different module. - Once that is resovled this will switched to use - leafref"; - type string; + 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: An issue with confd is preventing the + use of xpath. Seems to be an issue with leafref + to leafref, whose target is in a different module. + Once that is resovled this will switched to use + leafref"; + type leafref { + path "../../../constituent-vnfd" + + "[member-vnf-index = current()/../member-vnf-index-ref]" + + "/vnfd-id-ref"; + } + } + + leaf vnfd-connection-point-ref { + description "A reference to a connection point name"; + type leafref { + path "/vnfd:vnfd-catalog/vnfd:vnfd" + + "[vnfd:id = current()/../vnfd-id-ref]/" + + "vnfd:connection-point/vnfd:name"; + } } } // replicate for pnfd container here uses manotypes:provider-network; + leaf mgmt-network { + description "Flag indicating whether this network is a VIM management network"; + type boolean; + default false; + } + choice init-params { description "Extra parameters for VLD instantiation"; @@ -337,12 +309,14 @@ module nsd type string; } } + case vim-network-profile { leaf ip-profile-ref { description "Named reference to IP-profile object"; type string; } - } + } + } } @@ -561,7 +535,9 @@ module nsd description "Identifier for the VNFD."; type leafref { - path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id"; + path "../../../constituent-vnfd" + + "[member-vnf-index = current()/../member-vnf-index-ref]" + + "/vnfd-id-ref"; } } } @@ -575,14 +551,14 @@ module nsd key vnf-source-ref; leaf vnf-source-ref { type leafref { - path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id"; + path "../../constituent-vnfd/vnfd-id-ref"; } } leaf vnf-depends-on-ref { description "Reference to VNF that sorce VNF depends."; type leafref { - path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id"; + path "../../constituent-vnfd/vnfd-id-ref"; } } } @@ -674,7 +650,11 @@ module nsd to leafref, whose target is in a different module. Once that is resovled this will switched to use leafref"; - type string; + type leafref { + path "../../../../constituent-vnfd" + + "[member-vnf-index = current()/../member-vnf-index-ref]" + + "/vnfd-id-ref"; + } } leaf vnfd-connection-point-ref { @@ -689,7 +669,11 @@ module nsd to leafref, whose target is in a different module. Once that is resovled this will switched to use leafref"; - type string; + type leafref { + path "/vnfd:vnfd-catalog/vnfd:vnfd" + + "[vnfd:id = current()/../vnfd-id-ref]/" + + "vnfd:connection-point/vnfd:name"; + } } } } //rsp @@ -739,7 +723,11 @@ module nsd to leafref, whose target is in a different module. Once that is resovled this will switched to use leafref"; - type string; + type leafref { + path "../../../constituent-vnfd" + + "[member-vnf-index = current()/../member-vnf-index-ref]" + + "/vnfd-id-ref"; + } } leaf vnfd-connection-point-ref { @@ -754,7 +742,11 @@ module nsd to leafref, whose target is in a different module. Once that is resovled this will switched to use leafref"; - type string; + type leafref { + path "/vnfd:vnfd-catalog/vnfd:vnfd" + + "[vnfd:id = current()/../vnfd-id-ref]/" + + "vnfd:connection-point/vnfd:name"; + } } list match-attributes { @@ -823,7 +815,7 @@ module nsd list vnfd-monitoring-param { description "A list of VNFD monitoring params"; - key "vnfd-id-ref vnfd-monitoring-param-ref"; + key "member-vnf-index-ref vnfd-monitoring-param-ref"; leaf vnfd-id-ref { description @@ -838,7 +830,11 @@ module nsd Once that is resolved this will switched to use leafref"; - type yang:uuid; + type leafref { + path "../../../constituent-vnfd" + + "[member-vnf-index = current()/../member-vnf-index-ref]" + + "/vnfd-id-ref"; + } } leaf vnfd-monitoring-param-ref { @@ -850,10 +846,12 @@ module nsd } } - leaf-list member-vnf-index-ref { - description - "Optional reference to member-vnf within constituent-vnfds"; - type uint64; + leaf member-vnf-index-ref { + description + "Mandatory reference to member-vnf within constituent-vnfds"; + type leafref { + path "../../../constituent-vnfd/member-vnf-index"; + } } } } @@ -900,7 +898,7 @@ module nsd "Initial set of configuration primitives for NSD."; key "seq"; - uses ns-initial-config-primitive; + uses manotypes:initial-config; } list key-pair {