From 9eba2577c8cc1de7cfe9f650bd53fee302881bef Mon Sep 17 00:00:00 2001 From: Rajesh Date: Sun, 8 Oct 2017 04:16:56 +0000 Subject: [PATCH] rel3 IM fixes - removed references to rw-pb and corrected config-primitive instead of service-primitive Change-Id: Ib446a65095c3e7ff2210a2e2268561539d91679d Signed-off-by: Rajesh --- models/openmano/src/openmano2rift.py | 1 - models/plugins/yang/mano-rift-groupings.yang | 12 -- models/plugins/yang/mano-types.yang | 194 ++++++++++--------- models/plugins/yang/nsd-base.yang | 12 -- models/plugins/yang/nsr.yang | 12 +- models/plugins/yang/project-nsd.yang | 4 - models/plugins/yang/vlr.yang | 12 -- models/plugins/yang/vnfd-base.yang | 16 +- models/plugins/yang/vnfd.yang | 1 - models/plugins/yang/vnffgd.yang | 8 - models/plugins/yang/vnfr.role.xml | 6 - models/plugins/yang/vnfr.tailf.yang | 8 - models/plugins/yang/vnfr.yang | 142 +++++--------- 13 files changed, 162 insertions(+), 266 deletions(-) diff --git a/models/openmano/src/openmano2rift.py b/models/openmano/src/openmano2rift.py index 8b919102..0d990afa 100755 --- a/models/openmano/src/openmano2rift.py +++ b/models/openmano/src/openmano2rift.py @@ -176,7 +176,6 @@ class RiftNS(RiftManoDescriptor): )) if key != 'control-net': vld.provider_network.physical_network = 'physnet_sriov' - vld.provider_network.overlay_type = 'VLAN' vnf_member_index_dict = create_consituent_vnfds() create_connections(vnf_member_index_dict) diff --git a/models/plugins/yang/mano-rift-groupings.yang b/models/plugins/yang/mano-rift-groupings.yang index 1f684b25..7788724a 100644 --- a/models/plugins/yang/mano-rift-groupings.yang +++ b/models/plugins/yang/mano-rift-groupings.yang @@ -22,22 +22,10 @@ namespace "urn:ietf:params:xml:ns:yang:nfvo:mano-rift-groupings"; prefix "mano-rift"; - import vnfd { - prefix "vnfd"; - } - import mano-types { prefix "manotypes"; } - import nsd { - prefix "nsd"; - } - - import project-vnfd { - prefix "project-vnfd"; - } - grouping custom-meta-data { description "Grouping for instance-specific meta data"; list custom-meta-data { diff --git a/models/plugins/yang/mano-types.yang b/models/plugins/yang/mano-types.yang index a58492e4..8950c7a2 100644 --- a/models/plugins/yang/mano-types.yang +++ b/models/plugins/yang/mano-types.yang @@ -191,8 +191,8 @@ module mano-types } } } - - grouping image-properties { + + grouping image-properties { leaf image { description "Image name for the software image. @@ -214,117 +214,139 @@ module mano-types } } - grouping vnf-configuration { - container vnf-configuration { - description - "Information about the VNF configuration. Note: - If the NS contains multiple instances of the - same VNF, each instance could have a different - configuration."; - choice config-method { - description - "Defines the configuration method for the VNF."; - case script { + grouping vca-relationships { + container vca-relationships { + list relation { + description "List of relations between VCA componets."; + + key "requires provides"; + + leaf requires { description - "Use custom script for configuring the VNF. - This script is executed in the context of - Orchestrator (The same system and environment - as the Launchpad)."; - container script { - leaf script-type { - description - "Script type - currently supported - Scripts confirming to Rift CA plugin"; - type enumeration { - enum rift; - } - } - } + "Name of the required relation."; + type string; } - case juju { + leaf provides { description - "Configure the VNF through Juju."; - container juju { - leaf charm { - description "Juju charm to use with the VNF."; - type string; + "Name of the provided relation."; + type string; + } + } + } + } + + grouping vca-configuration { + description + "Information about the VNF or VDU configuration. Note: + If the NS contains multiple instances of the + same VNF or VDU, each instance could have a different + configuration."; + + choice config-method { + description + "Defines the configuration method for the VNF or VDU."; + case script { + description + "Use custom script for configuring the VNF or VDU. + This script is executed in the context of + Orchestrator (The same system and environment + as the Launchpad)."; + container script { + leaf script-type { + description + "Script type - currently supported - Scripts confirming to Rift CA plugin"; + type enumeration { + enum rift; } } } } - list config-primitive { + case juju { description - "List of config primitives supported by the - configuration agent for this VNF."; - key "name"; - - leaf name { - description - "Name of the config primitive."; - type string; + "Configure the VNF or VDU through Juju."; + container juju { + leaf charm { + description "Juju charm to use with the VNF or VDU."; + type string; + } + uses manotypes:vca-relationships; } + } + } - list parameter { - description - "List of parameters to the config primitive."; - key "name"; - uses primitive-parameter; - } + list config-primitive { + description + "List of config primitives supported by the + configuration agent for this VNF or VDU."; + key "name"; - leaf user-defined-script { - description - "A user defined script. If user defined script is defined, - the script will be executed using bash"; - type string; - } + leaf name { + description + "Name of the config primitive."; + type string; } - list initial-config-primitive { + list parameter { description - "Initial set of configuration primitives."; - key "seq"; - leaf seq { - description - "Sequence number for the configuration primitive."; - type uint64; - } + "List of parameters to the config primitive."; + key "name"; + uses primitive-parameter; + } - choice primitive-type { - case primitive-definition { - leaf name { - description - "Name of the configuration primitive."; - type string; - } + leaf user-defined-script { + description + "A user defined script. If user defined script is defined, + the script will be executed using bash"; + type string; + } + } - uses primitive-parameter-value; + list initial-config-primitive { + description + "Initial set of configuration primitives."; + key "seq"; + leaf seq { + description + "Sequence number for the configuration primitive."; + type uint64; + } - leaf user-defined-script { - description - "A user defined script."; - type string; - } + choice primitive-type { + case primitive-definition { + leaf name { + description + "Name of the configuration primitive."; + type string; + } + + uses primitive-parameter-value; + + leaf user-defined-script { + description + "A user defined script."; + type string; } } } } - } // END - grouping vnf-configuration + } // END - grouping vca-configuration typedef virtual-link-type { description "Type of virtual link ELAN: A multipoint service connecting a set of VNFs - // ELINE: For a simple point to point connection + ELINE: For a simple point to point connection // between a VNF and the existing network. // ETREE: A multipoint service connecting one or // more roots and a set of leaves, but // preventing inter-leaf communication."; type enumeration { enum ELAN; + enum ELINE; // enum ETREE; - // enum ELINE; } } @@ -981,24 +1003,6 @@ module mano-types type string; } - leaf overlay-type { - description - "Type of the overlay network. - LOCAL - Provider network implemented in a single compute node - FLAT - Provider network shared by all tenants - VLAN - Provider network implemented using 802.1Q tagging - VXLAN - Provider networks implemented using RFC 7348 - GRE - Provider networks implemented using GRE tunnels - PORTGROUP - Provider networks implemented for VIO support"; - type enumeration { - enum LOCAL; - enum FLAT; - enum VLAN; - enum VXLAN; - enum GRE; - enum PORTGROUP; - } - } leaf segmentation_id { description "ID of segregated virtual networks"; diff --git a/models/plugins/yang/nsd-base.yang b/models/plugins/yang/nsd-base.yang index 05903e29..c3328694 100644 --- a/models/plugins/yang/nsd-base.yang +++ b/models/plugins/yang/nsd-base.yang @@ -23,22 +23,10 @@ module nsd-base namespace "http://riftio.com/ns/riftware-1.0/nsd-base"; prefix "nsd-base"; - import vld { - prefix "vld"; - } - - import vnfd-base { - prefix "vnfd-base"; - } - import ietf-inet-types { prefix "inet"; } - import ietf-yang-types { - prefix "yang"; - } - import mano-types { prefix "manotypes"; } diff --git a/models/plugins/yang/nsr.yang b/models/plugins/yang/nsr.yang index ef293fb6..12cf8504 100644 --- a/models/plugins/yang/nsr.yang +++ b/models/plugins/yang/nsr.yang @@ -27,10 +27,6 @@ module nsr prefix "vlr"; } - import vld { - prefix "vld"; - } - import nsd-base { prefix "nsd-base"; } @@ -59,10 +55,6 @@ module nsr prefix "manotypes"; } - import rw-sdn { - prefix "rw-sdn"; - } - import rw-project { prefix "rw-project"; } @@ -393,9 +385,7 @@ module nsr description "The SDN account to use when requesting resources for this vnffgr"; - type leafref { - path "../../../../rw-sdn:sdn/rw-sdn:account/rw-sdn:name"; - } + type string; } leaf cloud-account { diff --git a/models/plugins/yang/project-nsd.yang b/models/plugins/yang/project-nsd.yang index 33d8241f..ae79d960 100644 --- a/models/plugins/yang/project-nsd.yang +++ b/models/plugins/yang/project-nsd.yang @@ -23,10 +23,6 @@ module project-nsd namespace "http://riftio.com/ns/riftware-1.0/project-nsd"; prefix "project-nsd"; - import ietf-yang-types { - prefix "yang"; - } - import mano-types { prefix "manotypes"; } diff --git a/models/plugins/yang/vlr.yang b/models/plugins/yang/vlr.yang index 6b8139f0..6a9b5916 100644 --- a/models/plugins/yang/vlr.yang +++ b/models/plugins/yang/vlr.yang @@ -23,10 +23,6 @@ module vlr namespace "urn:ietf:params:xml:ns:yang:nfvo:vlr"; prefix "vlr"; - import ietf-inet-types { - prefix "inet"; - } - import ietf-yang-types { prefix "yang"; } @@ -35,14 +31,6 @@ module vlr prefix "manotypes"; } - import vld { - prefix "vld"; - } - - import vnfd-base { - prefix "vnfd-base"; - } - import rw-project { prefix "rw-project"; } diff --git a/models/plugins/yang/vnfd-base.yang b/models/plugins/yang/vnfd-base.yang index 389bc69e..c2eae357 100644 --- a/models/plugins/yang/vnfd-base.yang +++ b/models/plugins/yang/vnfd-base.yang @@ -160,7 +160,10 @@ module vnfd-base type string; } - uses manotypes:vnf-configuration; + + container vnf-configuration { + uses manotypes:vca-configuration; + } container mgmt-interface { description @@ -356,8 +359,19 @@ module vnfd-base uses manotypes:vswitch-epa; uses manotypes:hypervisor-epa; uses manotypes:host-epa; + + list alarm { + key "alarm-id"; + + uses manotypes:alarm; + } + uses manotypes:image-properties; + container vdu-configuration { + uses manotypes:vca-configuration; + } + choice cloud-init-input { description "Indicates how the contents of cloud-init script are provided. diff --git a/models/plugins/yang/vnfd.yang b/models/plugins/yang/vnfd.yang index 7d487ca9..d1c9df65 100644 --- a/models/plugins/yang/vnfd.yang +++ b/models/plugins/yang/vnfd.yang @@ -39,7 +39,6 @@ module vnfd reference "Derived from earlier versions of base YANG files"; } - container vnfd-catalog { description "Virtual Network Function Descriptor (VNFD)."; diff --git a/models/plugins/yang/vnffgd.yang b/models/plugins/yang/vnffgd.yang index 254bca26..652ee81e 100644 --- a/models/plugins/yang/vnffgd.yang +++ b/models/plugins/yang/vnffgd.yang @@ -23,18 +23,10 @@ module vnffgd namespace "urn:ietf:params:xml:ns:yang:nfvo:vnffgd"; prefix "vnffgd"; - import ietf-inet-types { - prefix "inet"; - } - import ietf-yang-types { prefix "yang"; } - import mano-types { - prefix "manotypes"; - } - import rw-project { prefix "rw-project"; } diff --git a/models/plugins/yang/vnfr.role.xml b/models/plugins/yang/vnfr.role.xml index c61751f4..6197e18d 100644 --- a/models/plugins/yang/vnfr.role.xml +++ b/models/plugins/yang/vnfr.role.xml @@ -5,8 +5,6 @@ project-name /rw-project:project/rw-project:name - /vnfr:create-alarm/vnfr:project-name - /vnfr:destroy-alarm/vnfr:project-name @@ -25,8 +23,6 @@ create read update delete execute /rw-project:project/vnfr:vnfr-catalog - /vnfr:create-alarm - /vnfr:destroy-alarm @@ -35,8 +31,6 @@ rw-project-mano:vnfr-role create read update delete execute - /vnfr:create-alarm - /vnfr:destroy-alarm diff --git a/models/plugins/yang/vnfr.tailf.yang b/models/plugins/yang/vnfr.tailf.yang index ef266a1a..d0b45ddf 100644 --- a/models/plugins/yang/vnfr.tailf.yang +++ b/models/plugins/yang/vnfr.tailf.yang @@ -38,12 +38,4 @@ module vnfr-annotation tailf:annotate "/rw-project:project/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/plugins/yang/vnfr.yang b/models/plugins/yang/vnfr.yang index 9e120328..ebccf129 100644 --- a/models/plugins/yang/vnfr.yang +++ b/models/plugins/yang/vnfr.yang @@ -55,10 +55,6 @@ module vnfr prefix "rw-project"; } - import rw-cloud { - prefix "rw-cloud"; - } - revision 2017-02-28 { description "Update model to support projects."; @@ -285,7 +281,9 @@ module vnfr } // Use parameters provided here to configure this VNF - uses manotypes:vnf-configuration; + container vnf-configuration { + uses manotypes:vca-configuration; + } // Mainly used by Mon-params & dashboard url container mgmt-interface { @@ -437,6 +435,10 @@ module vnfr uses manotypes:supplemental-boot-data; + container vdu-configuration { + uses manotypes:vca-configuration; + } + list volumes { key "name"; @@ -485,57 +487,56 @@ module vnfr uses associated-virtual-cps; } - list interface { - description - "List of interfaces (internal and external) for the VNF"; - key name; - - leaf name { - description - "Name of the interface. Note that this - name has only local significance to the VDU."; - type string; - } + list interface { + description + "List of interfaces (internal and external) for the VNF"; + key name; - leaf position { - description - "Explicit Position of the interface within the list"; - type uint32; - } + leaf name { + description + "Name of the interface. Note that this + name has only local significance to the VDU."; + type string; + } - leaf type { - description - "Type of the Interface"; + leaf position { + description + "Explicit Position of the interface within the list"; + type uint32; + } - type vnfd-base:interface-type; + leaf type { + description + "Type of the Interface"; - default "EXTERNAL"; - } + type vnfd-base:interface-type; - choice connection-point-type { - case internal { - leaf internal-connection-point-ref { - description - "Leaf Ref to the particular internal connection point"; - type leafref { - path "../../internal-connection-point/id"; - } + default "EXTERNAL"; + } + choice connection-point-type { + case internal { + leaf internal-connection-point-ref { + description + "Leaf Ref to the particular internal connection point"; + type leafref { + path "../../internal-connection-point/id"; } } - case external { - leaf external-connection-point-ref { - description - "Leaf Ref to the particular external connection point"; - type leafref { - path "../../../connection-point/name"; - } + } + case external { + leaf external-connection-point-ref { + description + "Leaf Ref to the particular external connection point"; + type leafref { + path "../../../connection-point/name"; } } } - uses virtual-interface; } + uses virtual-interface; + } - leaf operational-status { + leaf operational-status { description "The operational status of the VDU init : The VDU has just started. @@ -548,7 +549,8 @@ module vnfr failed : The VDU instantiation failed. "; type vdu-operational-status; - } + } + uses placement-group-info; } @@ -601,54 +603,4 @@ module vnfr } } } - - rpc create-alarm { - description "Create an alert for a running VDU"; - input { - uses manotypes:rpc-project-name; - - leaf cloud-account { - mandatory true; - type leafref { - path "/rw-project:project[rw-project:name=current()/../project-name]" + - "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; - } - } - - 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 { - uses manotypes:rpc-project-name; - - leaf cloud-account { - mandatory true; - type leafref { - path "/rw-project:project[rw-project:name=current()/../project-name]" + - "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; - } - } - - leaf alarm-id { - mandatory true; - type string; - } - } - } } -- 2.17.1