From: Philip Joseph Date: Mon, 14 Nov 2016 06:57:38 +0000 (+0000) Subject: New Feature : Support VNF service access points, model changes X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=7ea611a7824cc6fceca57523434af1930e0f6053;p=osm%2FSO.git New Feature : Support VNF service access points, model changes Signed-off-by: Philip Joseph --- diff --git a/models/plugins/yang/mano-types.yang b/models/plugins/yang/mano-types.yang index 3411cb70..91e981ea 100644 --- a/models/plugins/yang/mano-types.yang +++ b/models/plugins/yang/mano-types.yang @@ -101,6 +101,7 @@ module mano-types "The value should be greyed out by the UI. Only applies to parameters with default values."; type boolean; + default false; } leaf hidden { @@ -108,6 +109,13 @@ module mano-types "The value should be hidden by the UI. Only applies to parameters with default values."; type boolean; + default false; + } + + leaf out { + description "If this is an output of the primitive execution"; + type boolean; + default false; } leaf parameter-type { description "Type of this parameter, whether this in IN or OUT"; @@ -252,22 +260,22 @@ module mano-types } } - list service-primitive { - rwpb:msg-new ServicePrimitive; + list config-primitive { + rwpb:msg-new ConfigPrimitive; description - "List of service primitives supported by the + "List of config primitives supported by the configuration agent for this VNF."; key "name"; leaf name { description - "Name of the service primitive."; + "Name of the config primitive."; type string; } list parameter { description - "List of parameters to the service primitive."; + "List of parameters to the config primitive."; key "name"; uses primitive-parameter; } @@ -284,20 +292,28 @@ module mano-types type uint64; } - leaf name { - description - "Name of the configuration primitive."; - type string; - } + choice primtive-type { + case primtive-definition { + leaf name { + description + "Name of the configuration primitive."; + type string; + } - list parameter { - key "name"; - leaf name { - type string; + uses primitive-parameter-value; } - leaf value { - type string; + case primitive-ref { + leaf config-primtive-ref { + description + "Reference to a config primitive name. + NOTE: The config primitive referred should have + all the input paramaters predefined either + with default values or dependency references."; + type leafref { + path "../../config-primitive/name"; + } + } } } } diff --git a/models/plugins/yang/nsd.yang b/models/plugins/yang/nsd.yang index f5e7b282..ab92682f 100644 --- a/models/plugins/yang/nsd.yang +++ b/models/plugins/yang/nsd.yang @@ -417,6 +417,58 @@ module nsd } } + list vnfap-map { + description + "Mapping of capability and dependency in this + network service."; + key "id"; + + leaf id { + description "Identifier for VNF access point mapping"; + type string; + } + + container capability { + leaf member-vnf-index { + description "Reference to member VNF within this network service"; + type leafref { + path "../../../constituent-vnfd/member-vnf-index"; + } + } + + leaf capability-ref { + description + "Reference to the capability in the specified + member VNF. This should be a leafref as follows: + path \"/vnfd:vnf-catalog/vnfd[id= + ../../constituent-vnfd[member-vnf-index= + ../member-vnf-index]/vnfd-id-ref]/ + vnfap/capability/name\""; + type string; + } + } + + container dependency { + leaf member-vnf-index { + description "Reference to member VNF within this network service"; + type leafref { + path "../../../constituent-vnfd/member-vnf-index"; + } + } + + leaf dependency-ref { + description + "Reference to the depenency in the specified + member VNF. This should be a leafref as follows: + path \"/vnfd:vnf-catalog/vnfd[id= + ../../constituent-vnfd[member-vnf-index= + ../member-vnf-index]/vnfd-id-ref]/ + vnfap/dependency/name\""; + type string; + } + } + } + list scaling-group-descriptor { description "scaling group descriptor within this network service. diff --git a/models/plugins/yang/vnfd.yang b/models/plugins/yang/vnfd.yang index ebd56adb..5fd811ec 100644 --- a/models/plugins/yang/vnfd.yang +++ b/models/plugins/yang/vnfd.yang @@ -116,96 +116,109 @@ module vnfd } grouping vnf-access-point { - list vnfap { - description "List of VNF access points"; - key "name"; - leaf name { - description "Name of the vnf access point"; - type string { - length 128; - } - } - leaf description { - description "A description of this VNF access point"; - type string; - } - list capability { - description "The List of capabilities of this VNF access point"; + container vnfap { + description + "List of VNF access points, i.e., the capabilites + and dependencies."; + list capbility { + description "The list of capabilites of this VNF"; key "name"; + leaf name { description "Name of the capability"; type string { length 128; } } + leaf description { - description "A description of the capability"; + description " Description of the capability"; type string; } + choice capability-location { - case location-path { + case location-xpath { leaf xpath { - description "Location of this capaibility as an xpath. - This field points to an element within vnfd - with the xpath notation and additionally - provides the flexibility to choose attributes - within the instantiated version of this object. - For example, - /vnfd-catalog/vnfd[id='xyz']/connection-point[name='cp1']/ip_address() - refers to the ip address of the connection point with name 'cp1' - in VNFD with id 'xyz'."; + description + "Location of this capability as an xpath. + For example: + ../../../mgmt-interface/port"; type string; } } - case location-primitive-ref { - leaf config-primitive-name-ref { - description "A leafref to configuration primitive. - This field contains a link to the config primitive - the output paramaters of which will satisfy this requirement."; - type leafref { - path "/vnfd:vnfd-catalog/vnfd/vnf-configuration/service-primitive/name"; - } + + case location-attirbute { + leaf attribute { + description + "Location of this capability as runtime attribute. + The value is , + For example: + ../../../mgmt-interface, ip-address + which retruns the ip-address assigned to the + mgmt-interface after VNF instantiation."; + type string; } } - case user-input { - list user-input { - key "name"; - description "User input for this capability"; - leaf name { - description "Name of this input"; - type string; + + case location-primitive-ref { + leaf config-primitive-name-ref { + description + "A leafref to configuration primitive. + This refers to a config parameter whose + output parameter is referred in out-parameter."; + type leafref { + path "../../../vnf-configuration/config-primitive/name"; } - leaf value { - description "Value of this input"; - type string; + } + + leaf out-parameter { + description + "Name of the output parameter in the config primitiive"; + type leafref { + path + "../../../vnf-configuration/config-primitive[name=current()/../config-primitive-name-ref]/parameter/name"; } } } + + case location-default { + leaf value { + description + "Value to be used for this capability"; + type string; + } + } } } + list dependency { - description "The List of depenencies of this VNF access point"; + description "The list of dependencies for this VNF"; key "name"; + leaf name { - description "Name of this VNF access point"; + description "Name of this dependency"; type string { length 128; } } + leaf mandatory { - description "Is this dependcy mandatory for this dependency"; + description "IS this dependency mandatory for this VNF"; type boolean; + default true; } + leaf description { - description "A description of the dependency"; + description "Description of this dependency"; type string; } - leaf config-primitive-name-ref { - description "A leafref to configuration primitive. - This field contains a link to the config primitive - the input paramaters of which will satisfy this requirement."; + + leaf-list config-primitive-name-ref { + description + "Leafref to configuration primitive where this + dependency will be added as a parameter"; type leafref { - path "/vnfd:vnfd-catalog/vnfd/vnf-configuration/service-primitive/name"; + path "../../../vnf-configuration/config-primitive/name"; } } } @@ -259,6 +272,8 @@ module vnfd uses manotypes:vnf-configuration; + uses vnf-access-point; + container mgmt-interface { description "Interface over which the VNF is managed."; diff --git a/rwcm/plugins/yang/rw-conman.yang b/rwcm/plugins/yang/rw-conman.yang index bb1555d0..10e05197 100644 --- a/rwcm/plugins/yang/rw-conman.yang +++ b/rwcm/plugins/yang/rw-conman.yang @@ -253,6 +253,10 @@ module rw-conman type inet:ip-address; } } + // Resolve the VNF config-primitives and publish it + // here. VNFR will use this and update config-primitives + // from here. + uses manotypes:vnf-configuration; } // list VNFR } // list NSR } // cm-state