From: Rajesh Velandy Date: Mon, 18 Sep 2017 21:21:48 +0000 (-0400) Subject: initial submission of RIFT model changes for multi-tenancy, RBAC and projects X-Git-Tag: v3.0.0rc02~3 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=e27e0b2fcd1d2278a5f82dc8b090aa8bcd0177b0;p=osm%2FIM.git initial submission of RIFT model changes for multi-tenancy, RBAC and projects Change-Id: Iedb3c5cabc8312f302795d7f3b777edb047114fb Signed-off-by: Rajesh Velandy --- diff --git a/models/yang/CMakeLists.txt b/models/yang/CMakeLists.txt deleted file mode 100644 index 0347367..0000000 --- a/models/yang/CMakeLists.txt +++ /dev/null @@ -1,55 +0,0 @@ -# -# Copyright 2016 RIFT.IO Inc -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Author(s): Anil Gunturu -# Creation Date: 10/15/2014 -# - -# NOTE: These files will be used by the new MANO subsystem -set(source_yang_files - ietf-l2-topology.yang - ietf-network-topology.yang - ietf-network.yang - nsd.yang rw-nsd.yang - nsr.yang rw-nsr.yang - pnfd.yang - rw-topology.yang - vlr.yang rw-vlr.yang - vnfd.yang rw-vnfd.yang - vnfr.yang rw-vnfr.yang - ) - -rift_add_yang_target( - TARGET mano-types_yang - YANG_FILES - mano-types.yang - COMPONENT ${PKG_LONG_NAME} - ) - -rift_add_yang_target( - TARGET mano_yang - YANG_FILES ${source_yang_files} - GIR_PATHS ${CMAKE_CURRENT_BINARY_DIR} - COMPONENT ${PKG_LONG_NAME} - LIBRARIES - rwmanifest_yang_gen - rwschema_yang_gen - rwcloud_yang_gen - rwconfig_agent_yang_gen - mano-types_yang_gen - DEPENDS - rwcloud_yang - rwconfig_agent_yang - ) diff --git a/models/yang/ietf-network.tailf.yang b/models/yang/ietf-network.tailf.yang deleted file mode 100644 index f531f65..0000000 --- a/models/yang/ietf-network.tailf.yang +++ /dev/null @@ -1,27 +0,0 @@ - -/* - * NO RW COPYRIGHT - * - */ - -module ietf-network-annotation -{ - namespace "urn:ietf:params:xml:ns:yang:ietf-network"; - prefix "ietf-network-ann"; - - import tailf-common { - prefix tailf; - } - - import ietf-network { - prefix nd; - } - - tailf:annotate "/nd:network" { - tailf:callpoint rw_callpoint; - } - - tailf:annotate "/nd:network/nd:server-provided" { - tailf:callpoint rw_callpoint; - } -} diff --git a/models/yang/ietf-network.yang b/models/yang/ietf-network.yang index a059e94..9308544 100644 --- a/models/yang/ietf-network.yang +++ b/models/yang/ietf-network.yang @@ -13,10 +13,6 @@ module ietf-network { prefix inet; } - import rw-pb-ext { - prefix "rwpb"; - } - organization "TBD"; contact "WILL-BE-DEFINED-LATER"; diff --git a/models/yang/mano-rift-groupings.yang b/models/yang/mano-rift-groupings.yang new file mode 100644 index 0000000..7788724 --- /dev/null +++ b/models/yang/mano-rift-groupings.yang @@ -0,0 +1,95 @@ +/* + * + * Copyright 2016-2017 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + + module mano-rift-groupings +{ + namespace "urn:ietf:params:xml:ns:yang:nfvo:mano-rift-groupings"; + prefix "mano-rift"; + + import mano-types { + prefix "manotypes"; + } + + grouping custom-meta-data { + description "Grouping for instance-specific meta data"; + list custom-meta-data { + description + "List of meta-data to be associated with the instance"; + key "name"; + leaf name { + description "Name of the meta-data parameter"; + type string; + } + + leaf data-type { + description "Data-type the meta-data parameter"; + type manotypes:meta-data-type; + default "STRING"; + } + + leaf value { + description "Value of the meta-data parameter"; + type string; + } + + leaf destination { + description "Type of input parameter"; + type enumeration { + enum "CLOUD_INIT"; + enum "CLOUD_METADATA"; + } + default "CLOUD_METADATA"; + } + } + } + + grouping volume-info-additions { + leaf boot-volume { + description "This flag indicates if this is boot volume or not"; + type boolean; + } + + leaf boot-priority { + description "Boot priority associated with volume"; + type int32; + } + } + + grouping http-end-point-additions { + leaf data { + description + "This is the data to be sent with POST "; + type string; + } + } + + grouping ssh-key-generated { + container ssh-key-generated { + description "SSH key pair generated for this NS"; + leaf public-key { + description "Public key generated"; + type string; + } + leaf private-key-file { + description "Path to the private key file"; + type string; + } + } + } +} diff --git a/models/yang/mano-types.yang b/models/yang/mano-types.yang index 3c820e3..81022ad 100644 --- a/models/yang/mano-types.yang +++ b/models/yang/mano-types.yang @@ -1,7 +1,7 @@ /* * - * Copyright 2016 RIFT.IO Inc + * Copyright 2016-2017 RIFT.IO Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,6 +31,15 @@ module mano-types prefix "rwpb"; } + import rw-project { + prefix "rw-project"; + } + + revision 2017-02-08 { + description + "Update model to support projects."; + } + revision 2015-04-23 { description "Initial revision. This YANG file defines @@ -40,6 +49,12 @@ module mano-types "Derived from earlier versions of base YANG files"; } + typedef meta-data-type { + type enumeration { + enum STRING; + } + } + typedef package-type { description "Type of descriptor being on-boarded"; type enumeration { @@ -109,6 +124,7 @@ module mano-types "The value should be dimmed by the UI. Only applies to parameters with default values."; type boolean; + default false; } leaf hidden { @@ -116,6 +132,7 @@ module mano-types "The value should be hidden by the UI. Only applies to parameters with default values."; type boolean; + default false; } } @@ -146,28 +163,7 @@ module mano-types } } - grouping image-properties { - leaf image { - description - "Image name for the software image. - If the image name is found within the VNF package it will - be uploaded to all VIM accounts during onboarding process. - Otherwise, the image must be added to the VIM account with - the same name as entered here. - "; - type string; - } - - leaf image-checksum { - description - "Image md5sum for the software image. - The md5sum, if provided, along with the image name uniquely - identifies an image uploaded to the CAL. - "; - type string; - } - } - grouping initial-config { + grouping event-config { leaf seq { description "Sequence number for the configuration primitive."; @@ -199,6 +195,29 @@ module mano-types } } } + + grouping image-properties { + leaf image { + description + "Image name for the software image. + If the image name is found within the VNF package it will + be uploaded to all VIM accounts during onboarding process. + Otherwise, the image must be added to the VIM account with + the same name as entered here. + "; + type string; + } + + leaf image-checksum { + description + "Image md5sum for the software image. + The md5sum, if provided, along with the image name uniquely + identifies an image uploaded to the CAL. + "; + type string; + } + } + grouping vca-relationships { container vca-relationships { @@ -267,22 +286,29 @@ module mano-types list service-primitive { rwpb:msg-new ServicePrimitive; description - "List of service primitives supported by the + "List of config primitives supported by the configuration agent for this VNF or VDU."; 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; } + + leaf user-defined-script { + description + "A user defined script. If user defined script is defined, + the script will be executed using bash"; + type string; + } } list initial-config-primitive { @@ -290,7 +316,29 @@ module mano-types description "Initial set of configuration primitives."; key "seq"; - uses initial-config; + leaf seq { + description + "Sequence number for the configuration primitive."; + type uint64; + } + + 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 vca-configuration @@ -299,15 +347,15 @@ module mano-types 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; } } @@ -387,12 +435,12 @@ module mano-types description "Type of the widget, typically used by the UI."; type enumeration { - enum HISTOGRAM; - enum BAR; - enum GAUGE; - enum SLIDER; enum COUNTER; + enum GAUGE; enum TEXTBOX; + enum SLIDER; + enum HISTOGRAM; + enum BAR; } } @@ -600,6 +648,13 @@ module mano-types } } //grouping vm-flavor + grouping vm-flavor-name { + leaf vm-flavor-name { + description "flavor name to be used while creating vm using cloud account"; + type string; + } + } + grouping vswitch-epa { container vswitch-epa { leaf ovs-acceleration { @@ -957,26 +1012,112 @@ module mano-types type string; } - leaf overlay-type { + leaf segmentation_id { 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"; - type enumeration { - enum LOCAL; - enum FLAT; - enum VLAN; - enum VXLAN; - enum GRE; + "ID of segregated virtual networks"; + type uint32; + } + } + } + + grouping ns-service-primitive { + list service-primitive { + description + "Network service level service primitives."; + + key "name"; + + leaf name { + description + "Name of the service primitive."; + type string; + } + + list parameter { + description + "List of parameters for the service primitive."; + + key "name"; + uses manotypes:primitive-parameter; + } + + list parameter-group { + description + "Grouping of parameters which are logically grouped in UI"; + key "name"; + + leaf name { + description + "Name of the parameter group"; + type string; + } + + list parameter { + description + "List of parameters for the service primitive."; + key "name"; + uses manotypes:primitive-parameter; + } + + leaf mandatory { + description "Is this parameter group mandatory"; + type boolean; + default true; } } - leaf segmentation_id { + + list vnf-primitive-group { description - "ID of segregated virtual networks"; + "List of service primitives grouped by VNF."; + + key "member-vnf-index-ref"; + leaf member-vnf-index-ref { + description + "Reference to member-vnf within constituent-vnfds"; + type uint64; + } + + 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 resolved this will switched to use + leafref"; + + type string; + } + + leaf vnfd-name { + description + "Name of the VNFD"; + type string; + } + + list primitive { + key "index"; + + leaf index { + description "Index of this primitive"; type uint32; + } + + leaf name { + description "Name of the primitive in the VNF primitive "; + type string; + } + } + } + + leaf user-defined-script { + description + "A user defined script."; + type string; } } } @@ -1116,6 +1257,7 @@ module mano-types leaf widget-type { description "Defines the UI Display variant of measured counters."; type manotypes:widget-type; + default "COUNTER"; } leaf units { @@ -1356,7 +1498,7 @@ module mano-types } leaf default-value { - description "/nsd:nsd-catalog/nsd:nsd/nsd:vendor"; + description "Default Value for the Input Parameter"; type string; } } @@ -1799,6 +1941,56 @@ module mano-types } } + grouping cloud-config { + list key-pair { + key "name"; + description "Used to configure the list of public keys to be injected as part + of ns instantiation"; + + leaf name { + description "Name of this key pair"; + type string; + } + + leaf key { + description "Key associated with this key pair"; + type string; + } + } + + list user { + rwpb:msg-new CloudConfigUser; + key "name"; + description "List of users to be added through cloud-config"; + + leaf name { + description "Name of the user "; + type string; + } + + leaf user-info { + description "The user name's real name"; + type string; + } + + list key-pair { + key "name"; + description "Used to configure the list of public keys to be injected as part + of ns instantiation"; + + leaf name { + description "Name of this key pair"; + type string; + } + + leaf key { + description "Key associated with this key pair"; + type string; + } + } + } + } + grouping placement-group-info { description ""; @@ -1861,8 +2053,8 @@ module mano-types list dns-server { key "address"; leaf address { - description "List of DNS Servers associated with IP Profile"; - type inet:ip-address; + description "List of DNS Servers associated with IP Profile"; + type inet:ip-address; } } @@ -1972,7 +2164,6 @@ module mano-types case image { uses image-properties; } - } leaf device-bus { @@ -1994,6 +2185,16 @@ module mano-types enum lun; } } + } + grouping rpc-project-name { + leaf project-name { + default "default"; + description + "Project to which this belongs"; + type leafref { + path "/rw-project:project/rw-project:name"; + } + } } } diff --git a/models/yang/nsd-base.yang b/models/yang/nsd-base.yang new file mode 100644 index 0000000..6c852cb --- /dev/null +++ b/models/yang/nsd-base.yang @@ -0,0 +1,792 @@ + +/* + * + * Copyright 2017 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + +module nsd-base +{ + namespace "http://riftio.com/ns/riftware-1.0/nsd-base"; + prefix "nsd-base"; + + import rw-pb-ext { + prefix "rwpb"; + } + + import ietf-inet-types { + prefix "inet"; + } + + import mano-types { + prefix "manotypes"; + } + + revision 2017-02-28 { + description + "Initial revision. This YANG file defines + the Network Service Descriptor (NSD) + common groupings"; + reference + "Derived from earlier versions of base YANG files"; + } + + typedef scaling-trigger { + type enumeration { + enum pre-scale-in { + value 1; + } + enum post-scale-in { + value 2; + } + enum pre-scale-out { + value 3; + } + enum post-scale-out { + value 4; + } + } + } + + typedef scaling-policy-type { + type enumeration { + enum manual { + value 1; + } + enum automatic { + value 2; + } + } + } + + typedef scaling-criteria-operation { + type enumeration { + enum AND { + value 1; + } + enum OR { + value 2; + } + } + } + + grouping primitive-parameter { + leaf name { + description + "Name of the parameter."; + type string; + } + + leaf data-type { + description + "Data type associated with the name."; + type manotypes:parameter-data-type; + } + + leaf mandatory { + description "Is this field mandatory"; + type boolean; + default false; + } + + leaf default-value { + description "The default value for this field"; + type string; + } + + leaf parameter-pool { + description "NSD parameter pool name to use for this parameter"; + type string; + } + } + + grouping nsd-descriptor-common { + leaf id { + description "Identifier for the NSD."; + type string { + length 1..63; + } + } + + leaf name { + description "NSD name."; + mandatory true; + type string; + } + + leaf short-name { + description "Short name to appear as label in the UI"; + type string; + } + + leaf vendor { + description "Vendor of the NSD."; + type string; + } + + leaf logo { + description + "File path for the vendor specific logo. For example icons/mylogo.png. + The logo should be part of the network service"; + type string; + } + + leaf description { + description "Description of the NSD."; + type string; + } + + leaf version { + description "Version of the NSD"; + type string; + } + + list connection-point { + description + "List for external connection points. + Each NS has one or more external connection + points. As the name implies that external + connection points are used for connecting + the NS to other NS or to external networks. + Each NS exposes these connection points to + the orchestrator. The orchestrator can + construct network service chains by + connecting the connection points between + different NS."; + + key "name"; + leaf name { + description + "Name of the NS connection point."; + type string; + } + + leaf type { + description + "Type of the connection point."; + type manotypes:connection-point-type; + } + } + + list scaling-group-descriptor { + description + "scaling group descriptor within this network service. + The scaling group defines a group of VNFs, + and the ratio of VNFs in the network service + that is used as target for scaling action"; + + key "name"; + + leaf name { + description "Name of this scaling group."; + type string; + } + + list scaling-policy { + + key "name"; + + leaf name { + description + "Name of the scaling policy"; + type string; + } + + leaf scaling-type { + description + "Type of scaling"; + type scaling-policy-type; + } + + leaf enabled { + description + "Specifies if the scaling policy can be applied"; + type boolean; + default true; + } + + leaf scale-in-operation-type { + description + "Operation to be applied to check between scaling criterias to + check if the scale in threshold condition has been met. + Defaults to AND"; + type scaling-criteria-operation; + default AND; + } + + leaf scale-out-operation-type { + description + "Operation to be applied to check between scaling criterias to + check if the scale out threshold condition has been met. + Defauls to OR"; + type scaling-criteria-operation; + default OR; + } + + leaf threshold-time { + description + "The duration for which the criteria must hold true"; + type uint32; + mandatory true; + } + + leaf cooldown-time { + description + "The duration after a scaling-in/scaling-out action has been + triggered, for which there will be no further optional"; + type uint32; + mandatory true; + } + + list scaling-criteria { + description + "list of conditions to be met for generating scaling + requests"; + key "name"; + + leaf name { + type string; + } + + leaf scale-in-threshold { + description + "Value below which scale-in requests are generated"; + type uint64; + } + + leaf scale-out-threshold { + description + "Value above which scale-out requests are generated"; + type uint64; + } + + leaf ns-monitoring-param-ref { + description + "Reference to the NS level monitoring parameter + that is aggregated"; + type leafref { + path "../../../../monitoring-param/id"; + } + } + } + } + + list vnfd-member { + description "List of VNFs in this scaling group"; + key "member-vnf-index-ref"; + + leaf member-vnf-index-ref { + description "member VNF index of this member VNF"; + type leafref { + path "../../../constituent-vnfd/member-vnf-index"; + } + } + + leaf count { + description + "count of this member VNF within this scaling group. + The count allows to define the number of instances + when a scaling action targets this scaling group"; + type uint32; + default 1; + } + } + + leaf min-instance-count { + description + "Minimum instances of the scaling group which are allowed. + These instances are created by default when the network service + is instantiated."; + type uint32; + default 0; + } + + leaf max-instance-count { + description + "Maximum instances of this scaling group that are allowed + in a single network service. The network service scaling + will fail, when the number of service group instances + exceed the max-instance-count specified."; + type uint32; + default 10; + } + + list scaling-config-action { + description "List of scaling config actions"; + key "trigger"; + + leaf trigger { + description "scaling trigger"; + type scaling-trigger; + } + + leaf ns-service-primitive-name-ref { + description "Reference to the NS service primitive"; + type leafref { + path "../../../service-primitive/name"; + } + } + } + } + + + list vnffgd { + description + "List of VNF Forwarding Graph Descriptors (VNFFGD)."; + + key "id"; + + leaf id { + description + "Identifier for the VNFFGD."; + type string; + } + + leaf name { + description + "VNFFGD name."; + type string; + } + + leaf short-name { + description + "Short name to appear as label in the UI"; + type string; + } + + leaf vendor { + description "Provider of the VNFFGD."; + type string; + } + + leaf description { + description "Description of the VNFFGD."; + type string; + } + + leaf version { + description "Version of the VNFFGD"; + type string; + } + + list rsp { + description + "List of Rendered Service Paths (RSP)."; + + key "id"; + + leaf id { + description + "Identifier for the RSP."; + type string; + } + + leaf name { + description + "RSP name."; + type string; + } + + list vnfd-connection-point-ref { + description + "A list of references to connection points."; + key "member-vnf-index-ref"; + + leaf member-vnf-index-ref { + description "Reference to member-vnf within constituent-vnfds"; + type leafref { + path "../../../../constituent-vnfd/member-vnf-index"; + } + } + + leaf order { + type uint8; + description + "A number that denotes the order of a VNF in a chain"; + } + + 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"; + + 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 + 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 resolved this will switched to use + leafref"; + // TODO: Keeping as string as this needs to be + // diffenent lvel based of if it is nsd-catalog or + // in nsr. + // type leafref { + // path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd" + + // "[vnfd:id = current()/../vnfd-id-ref]/" + + // "vnfd:connection-point/vnfd:name"; + // } + type string; + } + } + } //rsp + + list classifier { + description + "List of classifier rules."; + + key "id"; + + leaf id { + description + "Identifier for the classifier rule."; + type string; + } + + leaf name { + description + "Name of the classifier."; + type string; + } + + leaf rsp-id-ref { + description + "A reference to the RSP."; + type leafref { + path "../../rsp/id"; + } + } + + leaf member-vnf-index-ref { + description "Reference to member-vnf within constituent-vnfds"; + type leafref { + path "../../../constituent-vnfd/member-vnf-index"; + } + } + + 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"; + + 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 + 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 resolved this will switched to use + leafref"; + // TODO: Keeping as string as this needs to be + // diffenent lvel based of if it is nsd-catalog or + // in nsr. + // type leafref { + // path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd" + + // "[vnfd:id = current()/../vnfd-id-ref]/" + + // "vnfd:connection-point/vnfd:name"; + // } + type string; + } + + list match-attributes { + description + "List of match attributes."; + + key "id"; + + leaf id { + description + "Identifier for the classifier match attribute rule."; + type string; + } + + leaf ip-proto { + description + "IP Protocol."; + type uint8; + } + + leaf source-ip-address { + description + "Source IP address."; + type inet:ip-address; + } + + leaf destination-ip-address { + description + "Destination IP address."; + type inet:ip-address; + } + + leaf source-port { + description + "Source port number."; + type inet:port-number; + } + + leaf destination-port { + description + "Destination port number."; + type inet:port-number; + } + //TODO: Add more match criteria + } //match-attributes + } // classifier + } // vnffgd + + uses manotypes:ip-profile-list; + + list initial-service-primitive { + rwpb:msg-new NsdInitialServicePrimitive; + description + "Initial set of service primitives for NSD."; + key "seq"; + + uses manotypes:event-config; + } + + list terminate-service-primitive { + rwpb:msg-new NsdTerminateServicePrimitive; + description + "Set of service primitives during + termination for NSD."; + key "seq"; + + uses manotypes:event-config; + } + + uses manotypes:input-parameter-xpath; + + list parameter-pool { + description + "Pool of parameter values which must be + pulled from during configuration"; + key "name"; + + leaf name { + description + "Name of the configuration value pool"; + type string; + } + + container range { + description + "Create a range of values to populate the pool with"; + + leaf start-value { + description + "Generated pool values start at this value"; + type uint32; + mandatory true; + } + + leaf end-value { + description + "Generated pool values stop at this value"; + type uint32; + mandatory true; + } + } + } + + list key-pair { + key "name"; + description "Used to configure the list of public keys to be injected as part + of ns instantiation"; + + leaf name { + description "Name of this key pair"; + type string; + } + + leaf key { + description "Key associated with this key pair"; + type string; + } + } + + list user { + key "name"; + description "List of users to be added through cloud-config"; + + leaf name { + description "Name of the user "; + type string; + } + + leaf user-info { + description "The user name's real name"; + type string; + } + + list key-pair { + key "name"; + description "Used to configure the list of public keys to be injected as part + of ns instantiation"; + + leaf name { + description "Name of this key pair"; + type string; + } + + leaf key { + description "Key associated with this key pair"; + type string; + } + } + } + } + + grouping nsd-vld-common { + /* Still having issues modelling this, + see the comments under vnfd-connection-point-ref + */ + description + "List of Virtual Link Descriptors."; + + leaf id { + description + "Identifier for the VLD."; + type string; + } + + leaf name { + description + "Virtual Link Descriptor (VLD) name."; + type string; + } + + leaf short-name { + description + "Short name to appear as label in the UI"; + type string; + } + + leaf vendor { + description "Provider of the VLD."; + type string; + } + + leaf description { + description "Description of the VLD."; + type string; + } + + leaf version { + description "Version of the VLD"; + type string; + } + + leaf type { + type manotypes:virtual-link-type; + } + + leaf root-bandwidth { + description + "For ELAN this is the aggregate bandwidth."; + type uint64; + } + + leaf leaf-bandwidth { + description + "For ELAN this is the bandwidth of branches."; + type uint64; + } + + // 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; + } + + leaf ipv4-nat-pool-name{ + type string; + description "IPV4 nat pool name"; + } + + choice init-params { + description "Extra parameters for VLD instantiation"; + + case vim-network-ref { + leaf vim-network-name { + description + "Name of network in VIM account. This is used to indicate + pre-provisioned network name in cloud account."; + type string; + } + } + + case vim-network-profile { + leaf ip-profile-ref { + description "Named reference to IP-profile object"; + type leafref { + path "../../ip-profiles/name"; + } + } + } + + } + } + + grouping monitoring-param-common { + description + "List of monitoring parameters from VNF's that should be + propogated up into NSR"; + + leaf id { + type string; + } + + leaf name { + type string; + } + + uses manotypes:monitoring-param-value; + uses manotypes:monitoring-param-ui-data; + uses manotypes:monitoring-param-aggregation; + } +} diff --git a/models/yang/nsd.yang b/models/yang/nsd.yang index 48fc484..4a88eac 100644 --- a/models/yang/nsd.yang +++ b/models/yang/nsd.yang @@ -1,7 +1,7 @@ /* * - * Copyright 2016 RIFT.IO Inc + * Copyright 2016-2017 RIFT.IO Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,22 +23,23 @@ module nsd namespace "urn:ietf:params:xml:ns:yang:nfvo:nsd"; prefix "nsd"; - import rw-pb-ext { - prefix "rwpb"; - } - import vnfd { prefix "vnfd"; } - import ietf-inet-types { - prefix "inet"; + import nsd-base { + prefix "nsd-base"; } import mano-types { prefix "manotypes"; } + revision 2017-02-28 { + description + "Update model to support projects."; + } + revision 2014-10-27 { description "Initial revision. This YANG file defines @@ -47,193 +48,45 @@ module nsd "Derived from earlier versions of base YANG files"; } - typedef scaling-trigger { - type enumeration { - enum pre-scale-in { - value 1; - } - enum post-scale-in { - value 2; - } - enum pre-scale-out { - value 3; - } - enum post-scale-out { - value 4; - } - } - } - - typedef scaling-policy-type { - type enumeration { - enum manual { - value 1; - } - enum automatic { - value 2; - } - } - } - - typedef scaling-criteria-operation { - type enumeration { - enum AND { - value 1; - } - enum OR { - value 2; - } - } - } - - grouping primitive-parameter { - leaf name { - description - "Name of the parameter."; - type string; - } - - leaf data-type { - description - "Data type associated with the name."; - type manotypes:parameter-data-type; - } - - leaf mandatory { - description "Is this field mandatory"; - type boolean; - default false; - } - - leaf default-value { - description "The default value for this field"; - type string; - } - - leaf parameter-pool { - description "NSD parameter pool name to use for this parameter"; - type string; - } - } - - grouping nsd-descriptor { - leaf id { - description "Identifier for the NSD."; - type string; - } - - leaf name { - description "NSD name."; - mandatory true; - type string; - } - - leaf short-name { - description "Short name to appear as label in the UI"; - type string; - } - - leaf vendor { - description "Vendor of the NSD."; - type string; - } - - leaf logo { + grouping nsd-constituent-vnfd { + list constituent-vnfd { description - "File path for the vendor-specific logo. For example, icons/mylogo.png. - The logo should be part of the network service"; - type string; - } + "List of VNFDs that are part of this + network service."; - leaf description { - description "Description of the NSD."; - type string; - } + key "member-vnf-index"; - leaf version { - description "Version of the NSD"; - type string; - } + leaf member-vnf-index { + description + "Identifier/index for the VNFD. This separate id + is required to ensure that multiple VNFs can be + part of single NS"; + type uint64; + } - list connection-point { - description - "List for external connection points. - Each network service (NS) has one or more external connection - points that connect the NS to other NSs or to external networks. - Each NS exposes connection points to the orchestrator, which can - construct network service chains by connecting the connection - points between different NSs."; - key "name"; - leaf name { + leaf vnfd-id-ref { description - "Name of the NS connection point."; - type string; + "Identifier for the VNFD."; + type leafref { + path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id"; + } } - leaf type { + leaf start-by-default { description - "Type of the connection point."; - type manotypes:connection-point-type; + "VNFD is started as part of the NS instantiation"; + type boolean; + default true; } } + } - /* Model Limitations, - see the comments under vnfd-connection-point-ref - */ + grouping nsd-vld { list vld { - description - "List of Virtual Link Descriptors (VLDs)."; key "id"; - leaf id { - description - "Identifier for the VLD."; - type string; - } - - leaf name { - description - "Virtual Link Descriptor (VLD) name."; - type string; - } - - leaf short-name { - description - "Short name to appear as label in the UI"; - type string; - } - - leaf vendor { - description "Provider of the VLD."; - type string; - } - - leaf description { - description "Description of the VLD."; - type string; - } - - leaf version { - description "Version of the VLD"; - type string; - } - - leaf type { - type manotypes:virtual-link-type; - } - - leaf root-bandwidth { - description - "For ELAN this is the aggregate bandwidth."; - type uint64; - } - - leaf leaf-bandwidth { - description - "For ELAN this is the bandwidth of branches."; - type uint64; - } + uses nsd-base:nsd-vld-common; list vnfd-connection-point-ref { description @@ -266,235 +119,30 @@ module nsd } } } - - // 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"; - - case vim-network-ref { - leaf vim-network-name { - description - "Name of network in VIM account. This is used to indicate - pre-provisioned network name in cloud account."; - type string; - } - } - - case vim-network-profile { - leaf ip-profile-ref { - description "Named reference to IP-profile object"; - type leafref { - path "../../ip-profiles/name"; - } - } - } - } } + } - list constituent-vnfd { + grouping nsd-vnf-dependency { + list vnf-dependency { description - "List of VNFDs that are part of this - network service."; - - key "member-vnf-index"; - - leaf member-vnf-index { - description - "Identifier/index for the VNFD. This separate id - is required so that multiple VNFs can be part of - single NS"; - type uint64; - } - - leaf vnfd-id-ref { - description - "Identifier for the VNFD."; + "List of VNF dependencies."; + key vnf-source-ref; + leaf vnf-source-ref { type leafref { path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id"; } } - - leaf start-by-default { - description - "VNFD is started as part of the NS instantiation"; - type boolean; - default true; - } - } - - list scaling-group-descriptor { - description - "Scaling group descriptor within this network service. - The scaling group defines a group of VNFs, - and the ratio of VNFs in the network service - that is used as target for scaling action"; - - key "name"; - - leaf name { - description "Name of this scaling group."; - type string; - } - - list scaling-policy { - - key "name"; - - leaf name { - description - "Name of the scaling policy"; - type string; - } - - leaf scaling-type { - description - "Type of scaling"; - type scaling-policy-type; - } - - leaf enabled { - description - "Specifies if the scaling policy can be applied"; - type boolean; - default true; - } - - leaf scale-in-operation-type { - description - "Operation to be applied to check between scaling criterias to - check if the scale in threshold condition has been met. - Defaults to AND"; - type scaling-criteria-operation; - default AND; - } - - leaf scale-out-operation-type { - description - "Operation to be applied to check between scaling criterias to - check if the scale out threshold condition has been met. - Defaults to OR"; - type scaling-criteria-operation; - default OR; - } - - leaf threshold-time { - description - "The duration for which the criteria must hold true"; - type uint32; - mandatory true; - } - - leaf cooldown-time { - description - "The duration after a scaling-in/scaling-out action has been - triggered, for which there will be no further scaling activity"; - type uint32; - mandatory true; - } - - list scaling-criteria { - description - "list of conditions to be met for generating scaling - requests"; - key "name"; - - leaf name { - description "Name of the scaling criteria"; - type string; - } - - leaf scale-in-threshold { - description - "Value below which scale-in requests are generated - (depends on monitoring parameters)"; - type uint64; - } - - leaf scale-out-threshold { - description - "Value above which scale-out requests are generated - (depends on monitoring parameters)"; - type uint64; - } - - leaf ns-monitoring-param-ref { - description - "Reference to the NS level monitoring parameter - that is aggregated"; - type leafref { - path "../../../../monitoring-param/id"; - } - } - } - } - - list vnfd-member { - description "List of VNFs in this scaling group"; - key "member-vnf-index-ref"; - - leaf member-vnf-index-ref { - description "Member VNF index of this member VNF"; - type leafref { - path "../../../constituent-vnfd/member-vnf-index"; - } - } - - leaf count { - description - "Count of this member VNF within this scaling group. - The count defines the number of instances when a - scaling action targets this scaling group."; - type uint32; - default 1; - } - } - - leaf min-instance-count { - description - "Minimum number of instances of the scaling group that - are allowed in a single network service. These instances - are created by default when the network service is - instantiated."; - type uint32; - default 0; - } - - leaf max-instance-count { + leaf vnf-depends-on-ref { description - "Maximum number of instances of this scaling group that - are allowed in a single network service. The network - service scaling fails when the number of service group - instances exceeds the max-instance-count specified."; - type uint32; - default 10; - } - - list scaling-config-action { - description "List of scaling config actions"; - key "trigger"; - - leaf trigger { - description "Scaling trigger"; - type scaling-trigger; - } - - leaf ns-config-primitive-name-ref { - description "Reference to the NS config name primitive"; - type leafref { - path "../../../service-primitive/name"; - } + "Reference to VNF that sorce VNF depends."; + type leafref { + path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id"; } } } + } + grouping nsd-placement-groups { list placement-groups { description "List of placement groups at NS level"; @@ -518,248 +166,21 @@ module nsd description "Identifier for the VNFD."; type leafref { - path "../../../constituent-vnfd" + + path "../../../constituent-vnfd" + "[member-vnf-index = current()/../member-vnf-index-ref]" + "/vnfd-id-ref"; } } } } + } - uses manotypes:ip-profile-list; - - list vnf-dependency { - description - "List of VNF dependencies."; - key vnf-source-ref; - leaf vnf-source-ref { - type leafref { - path "../../constituent-vnfd/vnfd-id-ref"; - } - } - leaf vnf-depends-on-ref { - description - "Reference to VNF on which the source VNF depends."; - type leafref { - path "../../constituent-vnfd/vnfd-id-ref"; - } - } - } - - list vnffgd { - description - "List of VNF Forwarding Graph Descriptors (VNFFGD)."; - - key "id"; - - leaf id { - description - "Identifier for the VNFFGD."; - type string; - } - - leaf name { - description - "VNFFGD name."; - type string; - } - - leaf short-name { - description - "Short name to appear as label in the UI"; - type string; - } - - leaf vendor { - description "Provider of the VNFFGD."; - type string; - } - - leaf description { - description "Description of the VNFFGD."; - type string; - } - - leaf version { - description "Version of the VNFFGD"; - type string; - } - - list rsp { - description - "List of Rendered Service Paths (RSP)."; - - key "id"; - - leaf id { - description - "Identifier for the RSP."; - type string; - } - - leaf name { - description - "RSP name."; - type string; - } - - list vnfd-connection-point-ref { - description - "A list of references to connection points."; - key "member-vnf-index-ref"; - - leaf member-vnf-index-ref { - description "Reference to member-vnf within constituent-vnfds"; - type leafref { - path "../../../../constituent-vnfd/member-vnf-index"; - } - } - - leaf order { - type uint8; - description - "A number that denotes the order of a VNF in a chain"; - } - - leaf vnfd-id-ref { - description - "A reference to a vnfd"; - 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"; - } - } - } - } //rsp - - list classifier { - description - "List of classifier rules."; - - key "id"; - - leaf id { - description - "Identifier for the classifier rule."; - type string; - } - - leaf name { - description - "Name of the classifier."; - type string; - } - - leaf rsp-id-ref { - description - "A reference to the RSP."; - type leafref { - path "../../rsp/id"; - } - } - - leaf member-vnf-index-ref { - description "Reference to member-vnf within constituent-vnfds"; - type leafref { - path "../../../constituent-vnfd/member-vnf-index"; - } - } - - leaf vnfd-id-ref { - description - "A reference to a VNFD"; - 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"; - } - } - - list match-attributes { - description - "List of match attributes."; - - key "id"; - - leaf id { - description - "Identifier for the classifier match attribute rule."; - type string; - } - - leaf ip-proto { - description - "Internet Protocol."; - type uint8; - } - - leaf source-ip-address { - description - "Source IP address."; - type inet:ip-address; - } - - leaf destination-ip-address { - description - "Destination IP address."; - type inet:ip-address; - } - - leaf source-port { - description - "Source port number."; - type inet:port-number; - } - - leaf destination-port { - description - "Destination port number."; - type inet:port-number; - } - } //match-attributes - } // classifier - } // vnffgd + grouping nsd-monitoring-param { list monitoring-param { - description - "List of monitoring parameters from VNFs that should be - propogated up into NSR"; - key "id"; - - leaf id { - description "Identifier for a monitoring parameter"; - type string; - } - - leaf name { - description "Name of the monitoring parameter"; - type string; - } + key id; - uses manotypes:monitoring-param-value; - uses manotypes:monitoring-param-ui-data; - uses manotypes:monitoring-param-aggregation; + uses nsd-base:monitoring-param-common; list vnfd-monitoring-param { description "A list of VNFD monitoring params"; @@ -794,42 +215,10 @@ module nsd } } } + } - uses manotypes:input-parameter-xpath; - - list parameter-pool { - description - "Pool of parameter values from which to choose during - configuration."; - key "name"; - - leaf name { - description - "Name of the configuration value pool"; - type string; - } - - container range { - description - "Create a range of values from which to populate the pool with"; - - leaf start-value { - description - "Generated pool values start at this value"; - type uint32; - mandatory true; - } - - leaf end-value { - description - "Generated pool values stop at this value"; - type uint32; - mandatory true; - } - } - } - - list service-primitive { + grouping nsd-service-primitive { + list service-primitive { description "Network service level service primitives."; @@ -905,72 +294,26 @@ module nsd type string; } } + } - list initial-config-primitive { - rwpb:msg-new NsdInitialConfigPrimitive; - description - "Initial set of configuration primitives for NSD."; - key "seq"; - - uses manotypes:initial-config; - } - - list key-pair { - key "name"; - description "Used to configure the list of public keys to be injected as part - of NS instantiation"; - - leaf name { - description "Name of this key pair"; - type string; - } - - leaf key { - description "Key associated with this key pair"; - type string; - } - } - - list user { - key "name"; - description "List of users to be added through cloud-config"; - - leaf name { - description "Name of the user "; - type string; - } + container nsd-catalog { - leaf user-info { - description "The user name's real name"; - type string; - } + list nsd { + key id; - list key-pair { - key "name"; - description "Used to configure the list of public keys to be injected as part - of NS instantiation"; + uses nsd-base:nsd-descriptor-common; - leaf name { - description "Name of this key pair"; - type string; - } + uses nsd-vld; - leaf key { - description "Key associated with this key pair"; - type string; - } - } - } - } + uses nsd-constituent-vnfd; + uses nsd-placement-groups; - container nsd-catalog { + uses nsd-vnf-dependency; - list nsd { - key "id"; + uses nsd-monitoring-param; - uses nsd-descriptor; + uses nsd-service-primitive; } } - } diff --git a/models/yang/nsr.tailf.yang b/models/yang/nsr.tailf.yang deleted file mode 100644 index b68872e..0000000 --- a/models/yang/nsr.tailf.yang +++ /dev/null @@ -1,52 +0,0 @@ - -/* - * - * Copyright 2016 RIFT.IO Inc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ - -module nsr-annotation -{ - namespace "http://riftio.com/ns/riftware-1.0/nsr-annotation"; - prefix "nsr-ann"; - - import tailf-common { - prefix tailf; - } - - import nsr { - prefix nsr; - } - - tailf:annotate "/nsr:ns-instance-opdata" { - tailf:callpoint rw_callpoint; - } - tailf:annotate "/nsr:exec-ns-service-primitive" { - tailf:actionpoint rw_actionpoint; - } - tailf:annotate "/nsr:exec-scale-out" { - tailf:actionpoint rw_actionpoint; - } - tailf:annotate "/nsr:exec-scale-in" { - tailf:actionpoint rw_actionpoint; - } - tailf:annotate "/nsr:get-ns-service-primitive-values" { - tailf:actionpoint rw_actionpoint; - } - tailf:annotate "/nsr:start-network-service" { - tailf:actionpoint rw_actionpoint; - } -} diff --git a/models/yang/nsr.yang b/models/yang/nsr.yang index 36e03a4..7597a6f 100644 --- a/models/yang/nsr.yang +++ b/models/yang/nsr.yang @@ -1,7 +1,7 @@ /* * - * Copyright 2016 RIFT.IO Inc + * Copyright 2016-2017 RIFT.IO Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,12 +31,16 @@ module nsr prefix "vlr"; } - import nsd { - prefix "nsd"; + import nsd-base { + prefix "nsd-base"; } - import vnfd { - prefix "vnfd"; + import project-nsd { + prefix "project-nsd"; + } + + import project-vnfd { + prefix "project-vnfd"; } import vnfr { @@ -55,8 +59,13 @@ module nsr prefix "manotypes"; } - import rw-sdn { - prefix "rwsdn"; + import rw-project { + prefix "rw-project"; + } + + revision 2017-02-08 { + description + "Update model to support projects."; } revision 2015-09-10 { @@ -74,6 +83,7 @@ module nsr enum config_not_needed; enum configured; enum failed; + enum terminate; } } @@ -95,16 +105,16 @@ module nsr leaf key-pair-ref { description "A reference to the key pair entry in the global key pair table"; type leafref { - path "/nsr:key-pair/nsr:name"; + path "../../../../key-pair/name"; } } } list user { key "name"; - - description "List of users to be added through cloud-config"; + description "Used to configure the list of public keys to be injected as part + of ns instantiation"; leaf name { - description "Name of the user "; + description "Name of this key pair"; type string; } leaf user-info { @@ -114,108 +124,128 @@ module nsr list ssh-authorized-key { key "key-pair-ref"; - description "Used to configure the list of public keys to be injected as part + description "Used to configure the list of public keys to be injected as part of ns instantiation"; leaf key-pair-ref { description "A reference to the key pair entry in the global key pair table"; type leafref { - path "/nsr:key-pair/nsr:name"; + path "../../../../../key-pair/name"; } } } } } - list key-pair { - key "name"; - description "Used to configure the list of public keys to be injected as part + augment "/rw-project:project" { + list key-pair { + key "name"; + description "Used to configure the list of public keys to be injected as part of ns instantiation"; + leaf name { + description "Name of this key pair"; + type string; + } + + leaf key { + description "Key associated with this key pair"; + type string; + } + } + } + + grouping event-service-primitive { + leaf seq { + description + "Sequence number for the service primitive."; + type uint64; + } + leaf name { - description "Name of this key pair"; + description + "Name of the service primitive."; type string; + mandatory "true"; } - leaf key { - description "Key associated with this key pair"; + leaf user-defined-script { + description + "A user defined script."; type string; } - } - rpc start-network-service { - description "Start the network service"; - input { + list parameter { + key "name"; leaf name { - mandatory true; - description "Name of the Network Service"; type string; } - leaf nsd-ref { - description "Reference to NSR ID ref"; - mandatory true; - type leafref { - path "/nsd:nsd-catalog/nsd:nsd/nsd:id"; - } - } - uses ns-instance-config-params; - } - output { - leaf nsr-id { - description "Automatically generated parameter"; - type yang:uuid; + leaf value { + type string; } } } + augment "/rw-project:project" { + container ns-instance-config { + list nsr { + key "id"; + unique "name"; - container ns-instance-config { + leaf id { + description "Identifier for the NSR."; + type yang:uuid; + } - list nsr { - key "id"; - unique "name"; + leaf name { + description "NSR name."; + type string; + } - leaf id { - description "Identifier for the NSR."; - type yang:uuid; - } + leaf short-name { + description "NSR short name."; + type string; + } - leaf name { - description "NSR name."; - type string; - } + leaf description { + description "NSR description."; + type string; + } - leaf short-name { - description "NSR short name."; - type string; - } + leaf admin-status { + description + "This is the administrative status of the NS instance"; - leaf description { - description "NSR description."; - type string; - } + type enumeration { + enum ENABLED; + enum DISABLED; + } + } - leaf admin-status { - description - "This is the administrative status of the NS instance"; + container nsd { + description "NS descriptor used to instantiate this NS"; - type enumeration { - enum ENABLED; - enum DISABLED; - } - } + uses nsd-base:nsd-descriptor-common; - container nsd { - description "NS descriptor used to instantiate this NS"; - uses nsd:nsd-descriptor; - } + uses project-nsd:nsr-nsd-vld; + + uses project-nsd:nsr-nsd-constituent-vnfd; + + uses project-nsd:nsr-nsd-placement-groups; + + uses project-nsd:nsr-nsd-vnf-dependency; - uses ns-instance-config-params; + uses project-nsd:nsr-nsd-monitoring-param; + + uses project-nsd:nsr-nsd-service-primitive; + } + uses ns-instance-config-params; + } } } - grouping ns-instance-config-params { + grouping ns-instance-config-params-common { uses manotypes:input-parameter; list scaling-group { @@ -224,7 +254,7 @@ module nsr leaf scaling-group-name-ref { description "name of the scaling group - leafref path ../../nsd/scaling-group-descriptor/name"; + leafref path ../nsd/scaling-group-descriptor/name"; type string; } @@ -241,48 +271,60 @@ module nsr list nsd-placement-group-maps { description "Mapping from mano-placement groups construct from NSD to cloud - platform placement group construct"; + platform placement group construct"; key "placement-group-ref"; leaf placement-group-ref { - description "Reference for NSD placement group - leafref path ../../nsd/placement-groups/name"; + description + "Reference for NSD placement group"; + // type leafref { + // path "../../nsd/placement-groups/name"; + // } type string; } uses manotypes:placement-group-input; } + } + + grouping ns-instance-config-params { + uses ns-instance-config-params-common; - list vnfd-placement-group-maps { + list vnfd-placement-group-maps { description - "Mapping from mano-placement groups construct from VNFD to cloud + "Mapping from mano-placement groups construct from VNFD to cloud platform placement group construct"; - key "placement-group-ref vnfd-id-ref"; + key "placement-group-ref vnfd-id-ref"; - leaf vnfd-id-ref { - description + leaf vnfd-id-ref { + description "A reference to a vnfd. This is a leafref to path: - ../../../../nsd:constituent-vnfd - + [nsr:id = current()/../nsd:id-ref] - + /nsd:vnfd-id-ref - NOTE: confd limitations prevent the use of xpath"; - type yang:uuid; - } + ../../../../project-nsd:constituent-vnfd + + [id = current()/../id-ref] + + /project-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 resolved this will switched to use + leafref"; + type yang:uuid; + } - leaf placement-group-ref { - description + leaf placement-group-ref { + description "A reference to VNFD placement group"; - type leafref { - path "/vnfd:vnfd-catalog/vnfd:vnfd[vnfd:id = current()/" + - "../nsr:vnfd-id-ref]/vnfd:placement-groups/vnfd:name"; + type leafref { + path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " + + "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name"; + } } + + uses manotypes:placement-group-input; } - uses manotypes:placement-group-input; - } - uses cloud-config; + uses cloud-config; } grouping vnffgr { @@ -298,18 +340,19 @@ module nsr leaf vnffgd-id-ref { description "VNFFG descriptor id reference"; type leafref { - path "/nsr:ns-instance-config/nsr:nsr" - + "[nsr:id=current()/../../ns-instance-config-ref]" - + "/nsr:nsd/nsr:vnffgd/nsr:id"; + path "../../../../ns-instance-config/nsr" + + "[id=current()/../../ns-instance-config-ref]" + + "/nsd/vnffgd/id"; } } leaf vnffgd-name-ref { description "VNFFG descriptor name reference"; type leafref { - path "/ns-instance-config/nsr" + path "../../../../ns-instance-config/nsr" + "[id=current()/../../ns-instance-config-ref]" - + "/nsd/vnffgd[nsr:id = current()/../vnffgd-id-ref]" + + "/nsd/vnffgd" + + "[id=current()/../vnffgd-id-ref]" + "/name"; } } @@ -318,9 +361,12 @@ module nsr description "The SDN account to use when requesting resources for this vnffgr"; - type leafref { - path "/rwsdn:sdn/rwsdn:account/rwsdn:name"; - } + type string; + } + + leaf cloud-account { + description "Cloud Account in which NSR is instantiated"; + type string; } leaf operational-status { @@ -358,11 +404,17 @@ module nsr type string; } + leaf rsp-id { + description + "Returned Identifier for the RSP."; + type yang:uuid; + } + leaf vnffgd-rsp-id-ref { description "Identifier for the VNFFG Descriptor RSP reference"; type leafref { - path "/ns-instance-config/nsr" + path "../../../../../ns-instance-config/nsr" + "[id=current()/../../../ns-instance-config-ref]" + "/nsd/vnffgd" + "[id=current()/../../vnffgd-id-ref]" @@ -374,11 +426,12 @@ module nsr description "Name for the VNFFG Descriptor RSP reference"; type leafref { - path "/ns-instance-config/nsr:nsr" + path "../../../../../ns-instance-config/nsr" + "[id=current()/../../../ns-instance-config-ref]" + "/nsd/vnffgd" + "[id=current()/../../vnffgd-id-ref]" - + "/rsp[id=current()/../vnffgd-rsp-id-ref]" + + "/rsp" + + "[id=current()/../vnffgd-rsp-id-ref]" + "/name"; } } @@ -422,22 +475,22 @@ module nsr description "A reference to a vnfr id"; type leafref { - path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id"; + path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id"; } } leaf vnfr-name-ref { description "A reference to a vnfr name"; type leafref { - path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name"; + path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name"; } } leaf vnfr-connection-point-ref { description "A reference to a vnfr connection point."; type leafref { - path "/vnfr:vnfr-catalog/vnfr:vnfr" - + "[vnfr:id = current()/../nsr:vnfr-id-ref]" + path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr" + + "[vnfr:id = current()/../vnfr-id-ref]" + "/vnfr:connection-point/vnfr:name"; } } @@ -504,11 +557,16 @@ module nsr "Name of the classifier."; type string; } + leaf-list classifier-id { + description + "Returned Identifier for the classifier rule."; + type yang:uuid; + } leaf rsp-id-ref { description "A reference to the RSP."; type leafref { - path "../../nsr:rsp/nsr:id"; + path "../../rsp/id"; } } leaf rsp-name { @@ -520,22 +578,22 @@ module nsr description "A reference to a vnfr id"; type leafref { - path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id"; + path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id"; } } leaf vnfr-name-ref { description "A reference to a vnfr name"; type leafref { - path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name"; + path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name"; } } leaf vnfr-connection-point-ref { description "A reference to a vnfr connection point."; type leafref { - path "/vnfr:vnfr-catalog/vnfr:vnfr" - + "[vnfr:id = current()/../nsr:vnfr-id-ref]" + path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr" + + "[vnfr:id = current()/../vnfr-id-ref]" + "/vnfr:connection-point/vnfr:name"; } } @@ -559,62 +617,66 @@ module nsr } } - container ns-instance-opdata { - config false; + augment "/rw-project:project" { + container ns-instance-opdata { + config false; - list nsr { - key "ns-instance-config-ref"; + list nsr { + key "ns-instance-config-ref"; - leaf ns-instance-config-ref { - type leafref { - path "/nsr:ns-instance-config/nsr:nsr/nsr:id"; + leaf ns-instance-config-ref { + type leafref { + path "../../../ns-instance-config/nsr/id"; + } + // type yang:uuid; } - } - leaf name-ref { - description "Network service name reference"; - type leafref { - path "/nsr:ns-instance-config/nsr:nsr/nsr:name"; + leaf name-ref { + description "Network service name reference"; + type leafref { + path "../../../ns-instance-config/nsr" + + "[id=current()/../ns-instance-config-ref]" + + "/name"; + } } - } - leaf nsd-ref { - description "Network service descriptor id reference"; - type leafref { - path "/ns-instance-config/nsr" - + "[id=current()/../ns-instance-config-ref]" - + "/nsd/id"; + leaf nsd-ref { + description "Network service descriptor id reference"; + type leafref { + path "../../../ns-instance-config/nsr" + + "[id=current()/../ns-instance-config-ref]" + + "/nsd/id"; + } } - } - leaf nsd-name-ref { - description "Network service descriptor name reference"; - type leafref { - path "/ns-instance-config/nsr" - + "[id=current()/../ns-instance-config-ref]" - + "/nsd/name"; + leaf nsd-name-ref { + description "Network service descriptor name reference"; + type leafref { + path "../../../ns-instance-config/nsr" + + "[id=current()/../ns-instance-config-ref]" + + "/nsd/name"; + } } - } - leaf create-time { - description - "Creation timestamp of this Network Service. + leaf create-time { + description + "Creation timestamp of this Network Service. The timestamp is expressed as seconds since unix epoch - 1970-01-01T00:00:00Z"; - type uint32; - } + type uint32; + } - leaf uptime { - description - "Active period of this Network Service. + leaf uptime { + description + "Active period of this Network Service. Uptime is expressed in seconds"; - type uint32; - } + type uint32; + } - list connection-point { - description + list connection-point { + description "List for external connection points. Each NS has one or more external connection points. As the name implies that external connection points @@ -624,101 +686,100 @@ module nsr construct network service chains by connecting the connection points between different NS."; - key "name"; - leaf name { - description + key "name"; + leaf name { + description "Name of the NS connection point."; - type string; - } + type string; + } - leaf type { - description + leaf type { + description "Type of the connection point."; - type manotypes:connection-point-type; + type manotypes:connection-point-type; + } } - } - list vlr { - key "vlr-ref"; - leaf vlr-ref { - description + list vlr { + key "vlr-ref"; + leaf vlr-ref { + description "Reference to a VLR record in the VLR catalog"; - type leafref { - path "/vlr:vlr-catalog/vlr:vlr/vlr:id"; + type leafref { + path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id"; + } } - } - list vnfr-connection-point-ref { - description - "A list of references to connection points."; - key "vnfr-id"; + list vnfr-connection-point-ref { + description + "A list of references to connection points."; + key "vnfr-id"; - leaf vnfr-id { - description "A reference to a vnfr"; - type leafref { - path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id"; + leaf vnfr-id { + description "A reference to a vnfr"; + type leafref { + path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id"; + } } - } - leaf connection-point { - description + leaf connection-point { + description "A reference to a connection point name in a vnfr"; - type leafref { - path "/vnfr:vnfr-catalog/vnfr:vnfr" - + "[vnfr:id = current()/../nsr:vnfr-id]" - + "/vnfr:connection-point/vnfr:name"; + type leafref { + path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr" + + "[vnfr:id = current()/../vnfr-id]" + + "/vnfr:connection-point/vnfr:name"; + } } } } - } - list constituent-vnfr-ref { - description + list constituent-vnfr-ref { + description "List of VNFRs that are part of this network service."; - key "vnfr-id"; + key "vnfr-id"; - leaf vnfr-id { - description - "Reference to the VNFR id - This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id - But due to confd bug (RIFT-9451), changing to string. - "; - type string; + leaf vnfr-id { + description + "Reference to the VNFR id + This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id + But due to confd bug (RIFT-9451), changing to string."; + type string; + } } - } - list scaling-group-record { - description "List of scaling group records"; - key "scaling-group-name-ref"; + list scaling-group-record { + description "List of scaling group records"; + key "scaling-group-name-ref"; - leaf scaling-group-name-ref { - description "name of the scaling group"; - type leafref { - path "/ns-instance-config/nsr" - + "[id=current()/../../ns-instance-config-ref]" - + "/nsd/scaling-group-descriptor/name"; + leaf scaling-group-name-ref { + description "name of the scaling group"; + type leafref { + path "../../../../ns-instance-config/nsr" + + "[id=current()/../../ns-instance-config-ref]" + + "/nsd/scaling-group-descriptor/name"; + } } - } - list instance { - description "Reference to scaling group instance record"; - key "instance-id"; - leaf instance-id { - description "Scaling group instance id"; - type uint16; - } + list instance { + description "Reference to scaling group instance record"; + key "instance-id"; + leaf instance-id { + description "Scaling group instance id"; + type uint16; + } - leaf is-default { - description "Flag indicating whether this instance was part of + leaf is-default { + description "Flag indicating whether this instance was part of default scaling group (and thus undeletable)"; - type boolean; - } + type boolean; + } - leaf op-status { - description - "The operational status of the NS instance + leaf op-status { + description + "The operational status of the NS instance init : The scaling group has just started. vnf-init-phase : The VNFs in the scaling group are being instantiated. running : The scaling group is in running state. @@ -728,58 +789,58 @@ module nsr failed : The scaling group instantiation failed. "; - type enumeration { - enum init; - enum vnf-init-phase; - enum running; - enum terminate; - enum vnf-terminate-phase; - enum terminated; - enum failed; + type enumeration { + enum init; + enum vnf-init-phase; + enum running; + enum terminate; + enum vnf-terminate-phase; + enum terminated; + enum failed; + } } - } - leaf config-status { - description - "The configuration status of the scaling group instance + leaf config-status { + description + "The configuration status of the scaling group instance configuring : At least one of the VNFs in this scaling group instance is in configuring state configured : All the VNFs in this scaling group instance are configured or config-not-needed state failed : Configuring this scaling group instance failed "; - type config-states; - } + type config-states; + } - leaf error-msg { - description - "Reason for failure in configuration of this scaling instance"; - type string; - } + leaf error-msg { + description + "Reason for failure in configuration of this scaling instance"; + type string; + } - leaf create-time { - description - "Creation timestamp of this scaling group record. + leaf create-time { + description + "Creation timestamp of this scaling group record. The timestamp is expressed as seconds since unix epoch - 1970-01-01T00:00:00Z"; type uint32; - } + } - leaf-list vnfrs { - description "Reference to VNFR within the scale instance"; - type leafref { - path "../../../constituent-vnfr-ref/vnfr-id"; + leaf-list vnfrs { + description "Reference to VNFR within the scale instance"; + type leafref { + path "../../../constituent-vnfr-ref/vnfr-id"; + } } } } - } - uses vnffgr; + uses vnffgr; - leaf operational-status { - description - "The operational status of the NS instance + leaf operational-status { + description + "The operational status of the NS instance init : The network service has just started. vl-init-phase : The VLs in the NS are being instantiated. vnf-init-phase : The VNFs in the NS are being instantiated. @@ -795,302 +856,286 @@ module nsr vl-terminate : The NS is terminating a VL "; - type enumeration { - enum init; - enum vl-init-phase; - enum vnf-init-phase; - enum running; - enum terminate; - enum vnf-terminate-phase; - enum vl-terminate-phase; - enum terminated; - enum failed; - enum scaling-out; - enum scaling-in; - enum vl-instantiate; - enum vl-terminate; + type enumeration { + enum init; + enum vl-init-phase; + enum vnf-init-phase; + enum running; + enum terminate; + enum vnf-terminate-phase; + enum vl-terminate-phase; + enum terminated; + enum failed; + enum scaling-out; + enum scaling-in; + enum vl-instantiate; + enum vl-terminate; + } } - } - leaf config-status { - description - "The configuration status of the NS instance + leaf config-status { + description + "The configuration status of the NS instance configuring: At least one of the VNFs in this instance is in configuring state configured: All the VNFs in this NS instance are configured or config-not-needed state "; - type config-states; - } - - list service-primitive { - description - "Network service level service primitives."; + type config-states; + } - key "name"; + list service-primitive { + description + "Network service level service primitives."; - leaf name { - description - "Name of the service primitive."; - type string; - } + key "name"; - list parameter { - description - "List of parameters for the service primitive."; + leaf name { + description + "Name of the service primitive."; + type string; + } - key "name"; - uses manotypes:primitive-parameter; - } + list parameter { + description + "List of parameters for the service primitive."; - uses manotypes:ui-primitive-group; + key "name"; + uses manotypes:primitive-parameter; + } - list vnf-primitive-group { - description - "List of service primitives grouped by VNF."; + uses manotypes:ui-primitive-group; - key "member-vnf-index-ref"; - leaf member-vnf-index-ref { + list vnf-primitive-group { description - "Reference to member-vnf within constituent-vnfds"; - type uint64; - } + "Reference to member-vnf within constituent-vnfds"; - 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: confd limitations prevent the use of xpath"; + key "member-vnf-index-ref"; + leaf member-vnf-index-ref { + description + "Reference to member-vnf within constituent-vnfds"; + type uint64; + } - 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"; - leaf vnfd-name { - description - "Name of the VNFD"; - type string; - } + type string; + } - list primitive { - key "index"; + leaf vnfd-name { + description + "Name of the VNFD"; + type string; + } - leaf index { - description "Index of this primitive"; - type uint32; - } + list primitive { + key "index"; - leaf name { - description "Name of the primitive in the VNF primitive "; - type string; - } - } - } + leaf index { + description "Index of this primitive"; + type uint32; + } - leaf user-defined-script { - description - "A user defined script."; - type string; - } - } + leaf name { + description "Name of the primitive in the VNF primitive "; + type string; + } + } + } - list initial-config-primitive { - rwpb:msg-new NsrInitialConfigPrimitive; - description - "Initial set of configuration primitives for NSD."; - key "seq"; - leaf seq { - description - "Sequence number for the configuration primitive."; - type uint64; + leaf user-defined-script { + description + "A user defined script."; + type string; + } } - leaf name { + list initial-service-primitive { + rwpb:msg-new NsrInitialServicePrimitive; description - "Name of the configuration primitive."; - type string; - mandatory "true"; + "Initial set of service primitives for NSD."; + key "seq"; + + uses event-service-primitive; } - leaf user-defined-script { + list terminate-service-primitive { + rwpb:msg-new NsrTerminateServicePrimitive; description - "A user defined script."; - type string; + "Set of service primitives to + execute during termination of NSD."; + key "seq"; + + uses event-service-primitive; } - list parameter { + list monitoring-param { description - "List of parameters for the initial config primitive"; - key "name"; - leaf name { - description "Name of the intitial config parameter"; + "List of NS level params."; + key "id"; + + uses manotypes:monitoring-param-value; + uses manotypes:monitoring-param-ui-data; + uses manotypes:monitoring-param-aggregation; + + leaf id { type string; } - leaf value { - description "Value associated with the initial config - parameter"; + leaf name { type string; } - } - } - - - list monitoring-param { - description - "List of NS level params."; - key "id"; - - uses manotypes:monitoring-param-value; - uses manotypes:monitoring-param-ui-data; - uses manotypes:monitoring-param-aggregation; - - leaf id { - type string; - } - - leaf name { - type string; - } - leaf nsd-mon-param-ref { - description "Reference to the NSD monitoring param descriptor + leaf nsd-mon-param-ref { + description "Reference to the NSD monitoring param descriptor that produced this result"; - type leafref { - path "/nsd:nsd-catalog/nsd:nsd[nsd:id = current()/" + - "../../nsr:nsd-ref]/nsd:monitoring-param/nsd:id"; + // TODO: Fix leafref + type leafref { + path "../../../../project-nsd:nsd-catalog/project-nsd:nsd" + + "[project-nsd:id = current()/../../nsd-ref]" + + "/project-nsd:monitoring-param/project-nsd:id"; + } } - } - list vnfr-mon-param-ref { - description "A list of VNFR monitoring params associated with this monp"; - key "vnfr-id-ref vnfr-mon-param-ref"; + list vnfr-mon-param-ref { + description "A list of VNFR monitoring params associated with this monp"; + key "vnfr-id-ref vnfr-mon-param-ref"; - leaf vnfr-id-ref { - description - "A reference to a vnfr. This is a + leaf vnfr-id-ref { + description + "A reference to a vnfr. This is a leafref to path: /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id"; - type yang:uuid; - } + type yang:uuid; + } - leaf vnfr-mon-param-ref { - description "A reference to the VNFR monitoring param"; - type leafref { - path "/vnfr:vnfr-catalog/vnfr:vnfr" - + "[vnfr:id = current()/../nsr:vnfr-id-ref]" - + "/vnfr:monitoring-param/vnfr:id"; + leaf vnfr-mon-param-ref { + description "A reference to the VNFR monitoring param"; + type leafref { + path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr" + + "[vnfr:id = current()/../vnfr-id-ref]" + + "/vnfr:monitoring-param/vnfr:id"; + } } } } - } - list config-agent-job { - key "job-id"; + list config-agent-job { + key "job-id"; - leaf job-id { - description "config agent job Identifier for the NS."; - type uint64; - } + leaf job-id { + description "config agent job Identifier for the NS."; + type uint64; + } - leaf job-name { - description "Config agent job name"; - type string; - } + leaf job-name { + description "Config agent job name"; + type string; + } - leaf job-status { - description + leaf job-status { + description "Job status to be set based on each VNF primitive execution, pending - if at least one VNF is in pending state and remaining VNFs are in success state. Success - if all VNF executions are in success state failure - if one of the VNF executions is failure"; - type enumeration { - enum pending; - enum success; - enum failure; + type enumeration { + enum pending; + enum success; + enum failure; + } } - } - leaf triggered-by { - description "The primitive is triggered from NS or VNF level"; - type trigger-type; - } + leaf triggered-by { + description "The primitive is triggered from NS or VNF level"; + type trigger-type; + } - leaf create-time { - description - "Creation timestamp of this Config Agent Job. + leaf create-time { + description + "Creation timestamp of this Config Agent Job. The timestamp is expressed as seconds since unix epoch - 1970-01-01T00:00:00Z"; - type uint32; - } - - leaf job-status-details { - description "Config agent job status details, in case of errors"; - type string; - } - - uses manotypes:primitive-parameter-value; + type uint32; + } - list parameter-group { - description - "List of NS Primitive parameter groups"; - key "name"; - leaf name { - description - "Name of the parameter."; + leaf job-status-details { + description "Config agent job status details, in case of errors"; type string; } uses manotypes:primitive-parameter-value; - } - list vnfr { - key "id"; - leaf id { - description "Identifier for the VNFR."; - type yang:uuid; - } - leaf vnf-job-status { + list parameter-group { description - "Job status to be set based on each VNF primitive execution, - pending - if at least one primitive is in pending state - and remaining primitives are in success state. - Success - if all primitive executions are in success state - failure - if one of the primitive executions is failure"; - type enumeration { - enum pending; - enum success; - enum failure; - } - } - - list primitive { + "List of NS Primitive parameter groups"; key "name"; leaf name { - description "the name of the primitive"; + description + "Name of the parameter."; type string; } uses manotypes:primitive-parameter-value; + } - leaf execution-id { - description "Execution id of the primitive"; - type string; + list vnfr { + key "id"; + leaf id { + description "Identifier for the VNFR."; + type yang:uuid; } - leaf execution-status { - description "status of the Execution"; + leaf vnf-job-status { + description + "Job status to be set based on each VNF primitive execution, + pending - if at least one primitive is in pending state + and remaining primitives are in success state. + Success - if all primitive executions are in success state + failure - if one of the primitive executions is failure"; type enumeration { enum pending; enum success; enum failure; } } - leaf execution-error-details { - description "Error details if execution-status is failure"; - type string; + + list primitive { + key "name"; + leaf name { + description "the name of the primitive"; + type string; + } + + uses manotypes:primitive-parameter-value; + + leaf execution-id { + description "Execution id of the primitive"; + type string; + } + leaf execution-status { + description "status of the Execution"; + type enumeration { + enum pending; + enum success; + enum failure; + } + } + leaf execution-error-details { + description "Error details if execution-status is failure"; + type string; + } } } } @@ -1098,22 +1143,30 @@ module nsr } } + grouping rpc-common { + uses manotypes:rpc-project-name; + + leaf nsr_id_ref { + description "Reference to NSR ID ref"; + type leafref { + path "/rw-project:project[rw-project:name=current()/.." + + "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr/nsr:id"; + } + mandatory true; + } + } + rpc get-ns-service-primitive-values { description "Get the service primitive parameter values"; - input { - leaf nsr_id_ref { - description "Reference to NSR ID ref"; - mandatory true; - type leafref { - path "/nsr:ns-instance-config/nsr:nsr/nsr:id"; - } - } + input { leaf name { description "Name of the NS service primitive group"; mandatory true; type string; } + + uses rpc-common; } output { @@ -1168,10 +1221,14 @@ module nsr 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: confd limitations prevent the use of xpath"; + ../../../../project-nsd:constituent-vnfd + + [project-nsd:id = current()/../project-nsd:id-ref] + + /project-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 resolved this will switched to use + leafref"; type string; } @@ -1215,12 +1272,7 @@ module nsr type string; } - leaf nsr_id_ref { - description "Reference to NSR ID ref"; - type leafref { - path "/nsr:ns-instance-config/nsr:nsr/nsr:id"; - } - } + uses rpc-common; leaf triggered-by { description "The primitive is triggered from NS or VNF level"; @@ -1297,12 +1349,7 @@ module nsr type string; } - leaf nsr_id_ref { - description "Reference to NSR ID ref"; - type leafref { - path "/nsr:ns-instance-config/nsr:nsr/nsr:id"; - } - } + uses rpc-common; leaf triggered-by { description "The primitive is triggered from NS or VNF level"; @@ -1397,22 +1444,29 @@ module nsr description "Executes scale out request"; input { - - leaf nsr-id-ref { - description "Reference to NSR ID ref"; - type leafref { - path "/nsr:ns-instance-config/nsr:nsr/nsr:id"; - } - } + uses rpc-common; leaf scaling-group-name-ref { description "name of the scaling group"; - type string; + type leafref { + path "/rw-project:project[rw-project:name=current()/.." + + "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" + + "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" + + "/nsr:scaling-group-descriptor/nsr:name"; + } + mandatory true; } leaf instance-id { description "id of the scaling group"; - type uint64; + type leafref { + path "/rw-project:project[rw-project:name=current()/.." + + "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" + + "[nsr:id=current()/../nsr:nsr_id_ref]" + + "/nsr:scaling-group[nsr:scaling-group-name-ref=current()/.." + + "/nsr:scaling-group-name-ref]/nsr:instance/nsr:id"; + } + mandatory true; } @@ -1429,25 +1483,25 @@ module nsr description "Executes scale out request"; input { - - leaf nsr-id-ref { - description "Reference to NSR ID ref"; - type leafref { - path "/nsr:ns-instance-config/nsr:nsr/nsr:id"; - } - } + uses rpc-common; leaf scaling-group-name-ref { description "name of the scaling group"; - type string; + type leafref { + path "/rw-project:project[rw-project:name=current()/.." + + "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" + + "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" + + "/nsr:scaling-group-descriptor/nsr:name"; + } + mandatory true; } leaf instance-id { description "id of the scaling group"; type uint64; } - } + output { leaf instance-id { description "id of the scaling group"; @@ -1456,4 +1510,109 @@ module nsr } } + rpc start-network-service { + description "Start the network service"; + input { + leaf name { + mandatory true; + description "Name of the Network Service"; + type string; + } + + uses manotypes:rpc-project-name; + + leaf nsd_id_ref { + description "Reference to NSD ID ref"; + type leafref { + path "/rw-project:project[rw-project:name=current()/.." + + "/project-name]/project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:id"; + } + } + uses ns-instance-config-params-common; + + list vnfd-placement-group-maps { + description + "Mapping from mano-placement groups construct from VNFD to cloud + platform placement group construct"; + + key "placement-group-ref vnfd-id-ref"; + + leaf vnfd-id-ref { + description + "A reference to a vnfd. This is a + leafref to path: + ../../../../project-nsd:constituent-vnfd + + [id = current()/../project-nsd:id-ref] + + /project-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 yang:uuid; + } + + leaf placement-group-ref { + description + "A reference to VNFD placement group"; + type leafref { + path "/rw-project:project[rw-project:name=current()/" + + "../../project-name]/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " + + "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name"; + } + } + + uses manotypes:placement-group-input; + + list ssh-authorized-key { + key "key-pair-ref"; + + description "List of authorized ssh keys as part of cloud-config"; + + leaf key-pair-ref { + description "A reference to the key pair entry in the global key pair table"; + type leafref { + path "/rw-project:project[rw-project:name=current()/../../../" + + "project-name]/key-pair/name"; + } + } + } + + list user { + key "name"; + + description "List of users to be added through cloud-config"; + leaf name { + description "Name of the user "; + type string; + } + leaf user-info { + description "The user name's real name"; + type string; + } + list ssh-authorized-key { + key "key-pair-ref"; + + description "Used to configure the list of public keys to be injected as part + of ns instantiation"; + + leaf key-pair-ref { + description "A reference to the key pair entry in the global key pair table"; + type leafref { + path "/rw-project:project[rw-project:name=current()/" + + "../../../../project-name]/key-pair/name"; + } + } + } + } + } + } + + output { + leaf nsr-id { + description "Automatically generated parameter"; + type yang:uuid; + } + } + } } diff --git a/models/yang/pnfd.yang b/models/yang/pnfd.yang deleted file mode 100644 index 2f9bcdf..0000000 --- a/models/yang/pnfd.yang +++ /dev/null @@ -1,104 +0,0 @@ - -/* - * - * Copyright 2016 RIFT.IO Inc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ - -module pnfd -{ - namespace "urn:ietf:params:xml:ns:yang:nfvo:pnfd"; - prefix "pnfd"; - - import rw-pb-ext { - prefix "rwpb"; - } - - import ietf-inet-types { - prefix "inet"; - } - - import ietf-yang-types { - prefix "yang"; - } - - import mano-types { - prefix "manotypes"; - } - - revision 2015-09-10 { - description - "Initial revision. This YANG file defines - the Physical Network Function Descriptor (PNFD)"; - reference - "Derived from earlier versions of base YANG files"; - } - - container pnfd-catalog { - - list pnfd { - key "id"; - - leaf id { - description "Identifier for the PNFD."; - type yang:uuid; - } - - leaf name { - description "PNFD name."; - type string; - } - - leaf short-name { - description "Short name to appear as label in the UI"; - type string; - } - - leaf vendor { - description "Vendor of the PNFD."; - type string; - } - - leaf description { - description "Description of the PNFD."; - type string; - } - - leaf version { - description "Version of the PNFD"; - type string; - } - - list connection-point { - description - "List for external connection points. Each PNF has one or more external - connection points."; - key "id"; - leaf id { - description - "Identifier for the external connection points"; - type uint64; - } - - leaf cp-type { - description - "Type of the connection point."; - type manotypes:connection-point-type; - } - } - } - } -} diff --git a/models/yang/project-nsd.yang b/models/yang/project-nsd.yang new file mode 100644 index 0000000..ae79d96 --- /dev/null +++ b/models/yang/project-nsd.yang @@ -0,0 +1,600 @@ + +/* + * + * Copyright 2017 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + +module project-nsd +{ + namespace "http://riftio.com/ns/riftware-1.0/project-nsd"; + prefix "project-nsd"; + + import mano-types { + prefix "manotypes"; + } + + import project-vnfd { + prefix "project-vnfd"; + } + + import nsd-base { + prefix "nsd-base"; + } + + import rw-project { + prefix "rw-project"; + } + + + revision 2017-02-28 { + description + "Initial revision. This YANG file defines + the Network Service Descriptor (NSD) + under projects"; + reference + "Derived from earlier versions of base YANG files"; + } + + + grouping nsd-constituent-vnfd { + list constituent-vnfd { + description + "List of VNFDs that are part of this + network service."; + + key "member-vnf-index"; + + leaf member-vnf-index { + description + "Identifier/index for the VNFD. This separate id + is required to ensure that multiple VNFs can be + part of single NS"; + type uint64; + } + + leaf vnfd-id-ref { + description + "Identifier for the VNFD."; + type leafref { + path "/rw-project:project[rw-project:name = current()/../../../../rw-project:name]" + + "/project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id"; + } + } + + leaf start-by-default { + description + "VNFD is started as part of the NS instantiation"; + type boolean; + default true; + } + } + } + + grouping nsr-nsd-constituent-vnfd { + list constituent-vnfd { + description + "List of VNFDs that are part of this + network service."; + + key "member-vnf-index"; + + leaf member-vnf-index { + description + "Identifier/index for the VNFD. This separate id + is required to ensure that multiple VNFs can be + part of single NS"; + type uint64; + } + + leaf vnfd-id-ref { + description + "Identifier for the VNFD."; + type leafref { + path "/rw-project:project[rw-project:name = current()/../../../../../rw-project:name]" + + "/project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id"; + } + } + + leaf start-by-default { + description + "VNFD is started as part of the NS instantiation"; + type boolean; + default true; + } + } + } + + grouping nsd-vld { + list vld { + + key "id"; + + uses nsd-base:nsd-vld-common; + + list vnfd-connection-point-ref { + description + "A list of references to connection points."; + key "member-vnf-index-ref vnfd-connection-point-ref"; + + leaf member-vnf-index-ref { + description "Reference to member-vnf within constituent-vnfds"; + type leafref { + path "../../../constituent-vnfd/member-vnf-index"; + } + } + + leaf vnfd-id-ref { + description + "A reference to a vnfd. This is a + leafref to path: + ../../constituent-vnfd + + [id = current()/../id-ref] + + /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 resolved 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 { + description "A reference to a connection point name"; + type leafref { + path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd" + + "[project-vnfd:id = current()/../vnfd-id-ref]/" + + "project-vnfd:connection-point/project-vnfd:name"; + } + } + } + } + } + + grouping nsr-nsd-vld { + list vld { + + key "id"; + + uses nsd-base:nsd-vld-common; + + list vnfd-connection-point-ref { + description + "A list of references to connection points."; + key "member-vnf-index-ref vnfd-connection-point-ref"; + + leaf member-vnf-index-ref { + description "Reference to member-vnf within constituent-vnfds"; + + type leafref { + path "../../../constituent-vnfd/member-vnf-index"; + } + } + + 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 resolved this will switched to use + leafref"; + type string; + } + + leaf vnfd-connection-point-ref { + description "A reference to a connection point name"; + type leafref { + path "../../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd" + + "[project-vnfd:id = current()/../vnfd-id-ref]/" + + "project-vnfd:connection-point/project-vnfd:name"; + } + } + } + } + } + + grouping nsd-vnf-dependency { + list vnf-dependency { + description + "List of VNF dependencies."; + key vnf-source-ref; + leaf vnf-source-ref { + type leafref { + path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id"; + } + } + leaf vnf-depends-on-ref { + description + "Reference to VNF that sorce VNF depends."; + type leafref { + path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id"; + } + } + } + } + + grouping nsr-nsd-vnf-dependency { + list vnf-dependency { + description + "List of VNF dependencies."; + key vnf-source-ref; + leaf vnf-source-ref { + type leafref { + path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id"; + } + } + leaf vnf-depends-on-ref { + description + "Reference to VNF that sorce VNF depends."; + type leafref { + path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id"; + } + } + } + } + + grouping nsd-placement-groups { + list placement-groups { + description "List of placement groups at NS level"; + + key "name"; + uses manotypes:placement-group-info; + + list member-vnfd { + description + "List of VNFDs that are part of this placement group"; + + key "member-vnf-index-ref"; + + leaf member-vnf-index-ref { + description "member VNF index of this member VNF"; + type leafref { + path "../../../constituent-vnfd/member-vnf-index"; + } + } + + leaf vnfd-id-ref { + description + "Identifier for the VNFD."; + type leafref { + path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id"; + } + } + } + } + } + + grouping nsr-nsd-placement-groups { + list placement-groups { + description "List of placement groups at NS level"; + + key "name"; + uses manotypes:placement-group-info; + + list member-vnfd { + description + "List of VNFDs that are part of this placement group"; + + key "member-vnf-index-ref"; + + leaf member-vnf-index-ref { + description "member VNF index of this member VNF"; + type leafref { + path "../../../constituent-vnfd/member-vnf-index"; + } + } + + leaf vnfd-id-ref { + description + "Identifier for the VNFD."; + type leafref { + path "../../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id"; + } + } + } + } + } + + grouping nsd-monitoring-param { + + list monitoring-param { + key "id"; + + uses nsd-base:monitoring-param-common; + + list vnfd-monitoring-param { + description "A list of VNFD monitoring params"; + key "member-vnf-index-ref vnfd-monitoring-param-ref"; + + 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 resolved this will switched to use + leafref"; + + type leafref { + path "../../../constituent-vnfd" + + "[member-vnf-index = current()/../member-vnf-index-ref]" + + "/vnfd-id-ref"; + } + } + + leaf vnfd-monitoring-param-ref { + description "A reference to the VNFD monitoring param"; + type leafref { + path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd" + + "[project-vnfd:id = current()/../vnfd-id-ref]" + + "/project-vnfd:monitoring-param/project-vnfd:id"; + } + } + + leaf member-vnf-index-ref { + description + "Optional reference to member-vnf within constituent-vnfds"; + type leafref { + path "../../../constituent-vnfd/member-vnf-index"; + } + } + } + } + } + + grouping nsr-nsd-monitoring-param { + list monitoring-param { + key "id"; + + uses nsd-base:monitoring-param-common; + + list vnfd-monitoring-param { + description "A list of VNFD monitoring params"; + key "member-vnf-index-ref vnfd-monitoring-param-ref"; + + 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 resolved this will switched to use + leafref"; + + type string; + } + + leaf vnfd-monitoring-param-ref { + description "A reference to the VNFD monitoring param"; + type leafref { + path "../../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd" + + "[project-vnfd:id = current()/../vnfd-id-ref]" + + "/project-vnfd:monitoring-param/project-vnfd:id"; + } + } + + leaf member-vnf-index-ref { + description + "Optional reference to member-vnf within constituent-vnfds"; + type leafref { + path "../../../constituent-vnfd/member-vnf-index"; + } + } + } + } + } + + grouping nsd-service-primitive { + list service-primitive { + description + "Network service level service primitives."; + + key "name"; + + leaf name { + description + "Name of the service primitive."; + type string; + } + + list parameter { + description + "List of parameters for the service primitive."; + + key "name"; + uses manotypes:primitive-parameter; + } + + uses manotypes:ui-primitive-group; + + list vnf-primitive-group { + description + "List of service primitives grouped by VNF."; + + key "member-vnf-index-ref"; + leaf member-vnf-index-ref { + description + "Reference to member-vnf within constituent-vnfds"; + type leafref { + path "../../../constituent-vnfd/member-vnf-index"; + } + } + + leaf vnfd-id-ref { + description + "A reference to a vnfd. This is a leafref"; + + type leafref { + path "../../../constituent-vnfd" + + "[member-vnf-index = current()/../member-vnf-index-ref]" + "/vnfd-id-ref"; + } + } + + leaf vnfd-name { + description + "Name of the VNFD"; + type leafref { + path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd" + + "[project-vnfd:id = current()/../vnfd-id-ref]" + + "/project-vnfd:name"; + } + } + + list primitive { + key "index"; + + leaf index { + description "Index of this primitive"; + type uint32; + } + + leaf name { + description "Name of the primitive in the VNF primitive "; + type string; + } + } + } + + leaf user-defined-script { + description + "A user defined script."; + type string; + } + } + } + + grouping nsr-nsd-service-primitive { + list service-primitive { + description + "Network service level service primitives."; + + key "name"; + + leaf name { + description + "Name of the service primitive."; + type string; + } + + list parameter { + description + "List of parameters for the service primitive."; + + key "name"; + uses manotypes:primitive-parameter; + } + + uses manotypes:ui-primitive-group; + + list vnf-primitive-group { + description + "List of service primitives grouped by VNF."; + + key "member-vnf-index-ref"; + leaf member-vnf-index-ref { + description + "Reference to member-vnf within constituent-vnfds"; + type leafref { + path "../../../constituent-vnfd/member-vnf-index"; + } + } + + leaf vnfd-id-ref { + description + "A reference to a vnfd. This is a leafref"; + + type leafref { + path "../../../constituent-vnfd" + + "[member-vnf-index = current()/../member-vnf-index-ref]" + "/vnfd-id-ref"; + } + } + + leaf vnfd-name { + description + "Name of the VNFD"; + type leafref { + path "../../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd" + + "[project-vnfd:id = current()/../vnfd-id-ref]" + + "/project-vnfd:name"; + } + } + + list primitive { + key "index"; + + leaf index { + description "Index of this primitive"; + type uint32; + } + + leaf name { + description "Name of the primitive in the VNF primitive "; + type string; + } + } + } + + leaf user-defined-script { + description + "A user defined script."; + type string; + } + } + } + + grouping nsd-descriptor { + uses nsd-base:nsd-descriptor-common; + + uses nsd-vld; + + uses nsd-constituent-vnfd; + + uses nsd-placement-groups; + + uses nsd-vnf-dependency; + + uses nsd-monitoring-param; + + uses nsd-service-primitive; + } + + augment "/rw-project:project" { + container nsd-catalog { + + list nsd { + key id; + + uses nsd-descriptor; + } + } + } +} diff --git a/models/yang/project-vnfd.yang b/models/yang/project-vnfd.yang new file mode 100644 index 0000000..5342436 --- /dev/null +++ b/models/yang/project-vnfd.yang @@ -0,0 +1,57 @@ + +/* + * + * Copyright 2017 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + +module project-vnfd +{ + namespace "http://riftio.com/ns/riftware-1.0/project-vnfd"; + prefix "project-vnfd"; + + import rw-project { + prefix "rw-project"; + } + + import vnfd-base { + prefix "vnfd-base"; + } + + revision 2017-02-28 { + description + "Initial revision. This YANG file defines + the Virtual Network Function (VNF) descriptor + under a project"; + reference + "Derived from earlier versions of base YANG files"; + } + + augment /rw-project:project { + container vnfd-catalog { + description + "Virtual Network Function Descriptor (VNFD)."; + + list vnfd { + key "id"; + + uses vnfd-base:vnfd-descriptor; + } + } + } +} + +// vim: sw=2 diff --git a/models/yang/rw-nsd.yang b/models/yang/rw-nsd.yang deleted file mode 100644 index 4475928..0000000 --- a/models/yang/rw-nsd.yang +++ /dev/null @@ -1,57 +0,0 @@ - -/* - * - * Copyright 2016 RIFT.IO Inc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ - -module rw-nsd -{ - namespace "http://riftio.com/ns/riftware-1.0/rw-nsd"; - prefix "rw-nsd"; - - import nsd { - prefix "nsd"; - } - - import ietf-yang-types { - prefix "yang"; - } - - import mano-types { - prefix "manotypes"; - } - - revision 2015-09-10 { - description - "Initial revision. This YANG file augments - the base MANO NSD"; - reference - "Derived from earlier versions of base YANG files"; - } - - augment /nsd:nsd-catalog/nsd:nsd { - uses manotypes:control-param; - uses manotypes:action-param; - leaf meta { - description - "Any meta-data needed by the UI"; - type string; - } - } -} - -// vim: sw=2 diff --git a/models/yang/rw-nsr.tailf.yang b/models/yang/rw-nsr.tailf.yang deleted file mode 100644 index 3b7588a..0000000 --- a/models/yang/rw-nsr.tailf.yang +++ /dev/null @@ -1,45 +0,0 @@ - -/* - * - * Copyright 2016 RIFT.IO Inc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ - -module rw-nsr-annotation -{ - namespace "http://riftio.com/ns/riftware-1.0/rw-nsr-annotation"; - prefix "rw-nsr-ann"; - - import tailf-common { - prefix tailf; - } - - import rw-nsr { - prefix rw-nsr; - } - - import nsr { - prefix nsr; - } - - tailf:annotate "/nsr:ns-instance-opdata/nsr:nsr/rw-nsr:operational-events" { - tailf:callpoint rw_callpoint; - } - - tailf:annotate "/nsr:ns-instance-opdata/rw-nsr:nsd-ref-count" { - tailf:callpoint rw_callpoint; - } -} diff --git a/models/yang/rw-nsr.yang b/models/yang/rw-nsr.yang deleted file mode 100644 index 472332e..0000000 --- a/models/yang/rw-nsr.yang +++ /dev/null @@ -1,436 +0,0 @@ - -/* - * - * Copyright 2016 RIFT.IO Inc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ - -module rw-nsr -{ - namespace "http://riftio.com/ns/riftware-1.0/rw-nsr"; - prefix "rw-nsr"; - - import mano-types { - prefix "manotypes"; - } - - import nsr { - prefix "nsr"; - } - - import nsd { - prefix "nsd"; - } - - import rw-cloud { - prefix "rw-cloud"; - } - - import rw-config-agent { - prefix "rw-config-agent"; - } - - import rw-sdn { - prefix "rw-sdn"; - } - - import ietf-yang-types { - prefix "yang"; - } - - revision 2015-09-10 { - description - "Initial revision. This YANG file augments - the base MANO VNFD"; - reference - "Derived from earlier versions of base YANG files"; - } - - grouping operational-events { - list operational-events { - key "id"; - description - "Recent operational events for this network service. - Though the model does not impose any restrictions on the numbe of events, - the max operational events will be limited to the most recent 10"; - - leaf id { - description "The id of the instance"; - type uint64; - } - - leaf timestamp { - description - "The timestamp of this event expressed as seconds since - unix epoch - 1970-01-01T00:00:00Z"; - type uint32; - } - leaf event { - description "Short description of the event"; - type string; - } - leaf description { - description - "The description of this event"; - type string; - } - leaf details { - description - "The detailed description of this event (in case of errors)"; - type string; - } - } - } - - - grouping rw-ns-instance-config { - leaf cloud-account { - description - "The configured cloud account which the NSR is instantiated within. - All VDU's, Virtual Links, and provider networks will be requested - using the cloud-account's associated CAL instance"; - type leafref { - path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; - } - } - - leaf om-datacenter { - description - "Openmano datacenter name to use when instantiating - the network service. This is only used when openmano - is selected as the cloud account. This should be superceded - by multiple cloud accounts when that becomes available."; - type string; - } - - list vnf-cloud-account-map { - description - "Mapping VNF to Cloud Account where VNF will be instantiated"; - - key "member-vnf-index-ref"; - leaf member-vnf-index-ref { - type uint64; - } - - leaf cloud-account { - description - "The configured cloud account where VNF is instantiated within. - All VDU's, Virtual Links, and provider networks will be requested - using the cloud-account's associated CAL instance"; - type leafref { - path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; - } - } - - leaf om-datacenter { - description - "Openmano datacenter name to use when instantiating - the network service. This is only used when openmano - is selected as the cloud account. This should be superceded - by multiple cloud accounts when that becomes available."; - type string; - } - - leaf config-agent-account { - description - "The configured config agent account to use for instantiating this VNF. - The configuration for this VNF will be driven using the specified config - agent account"; - type leafref { - path "/rw-config-agent:config-agent/rw-config-agent:account/rw-config-agent:name"; - } - } - } - - list vl-cloud-account-map { - description - "Mapping VL to Cloud Account where VL will be instantiated"; - - key "vld-id-ref"; - - leaf vld-id-ref { - description - "A reference to a vld. - leafref path ../../nsd/vld/id"; - type string; - } - - leaf-list cloud-accounts { - description - "The configured list of cloud accounts where VL is instantiated. - All VDU's, Virtual Links, and provider networks will be requested - using the cloud-account's associated CAL instance"; - type leafref { - path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; - } - } - - leaf-list om-datacenters { - description - "Openmano datacenter names to use when instantiating - the VLs. This is only used when openmano - is selected as the cloud account. This should be superceded - by multiple cloud accounts when that becomes available."; - type string; - } - } - } - - - augment /nsr:ns-instance-config/nsr:nsr { - uses rw-ns-instance-config; - } - - augment /nsr:start-network-service/nsr:input{ - uses rw-ns-instance-config; - } - - augment /nsr:ns-instance-opdata/nsr:nsr { - uses manotypes:action-param; - uses manotypes:control-param; - - leaf sdn-account { - description - "The SDN account associted with the cloud account using which an - NS was instantiated."; - type leafref { - path "/rw-sdn:sdn/rw-sdn:account/rw-sdn:name"; - } - } - - leaf config-status-details { - description - "The configuration status error details of the NS instance, in case of any errors"; - type string; - } - - container nfvi-metrics { - container vm { - leaf label { - description - "Label to show in UI"; - type string; - default "VM"; - } - - leaf active-vm { - description - "The number of active VMs."; - type uint64; - } - - leaf inactive-vm { - description - "The number of inactive VMs."; - type uint64; - } - } - - uses manotypes:nfvi-metrics; - } - - container epa-param { - container ovs-acceleration { - leaf label { - description - "Label to show in UI for the param"; - type string; - default "OVS ACCELERATION"; - } - - leaf vm { - description - "Number of VMs with the EPA attribute"; - type uint64; - } - - leaf unit { - description - "Unit label to show in the UI"; - type string; - default "vms"; - } - } - - container ovs-offload { - leaf label { - description - "Label to show in UI for the param"; - type string; - default "OVS OFFLOAD"; - } - - leaf vm { - description - "Number of VMs with the EPA attribute"; - type uint64; - } - - leaf unit { - description - "Unit label to show in the UI"; - type string; - default "vms"; - } - - } - - container ddio { - leaf label { - description - "Label to show in UI for the param"; - type string; - default "DDIO"; - } - - leaf vm { - description - "Number of VMs with the EPA attribute"; - type uint64; - } - - leaf unit { - description - "Unit label to show in the UI"; - type string; - default "vms"; - } - - } - - container cat { - leaf label { - description - "Label to show in UI for the param"; - type string; - default "CAT"; - } - - leaf vm { - description - "Number of VMs with the EPA attribute"; - type uint64; - } - - leaf unit { - description - "Unit label to show in the UI"; - type string; - default "vms"; - } - } - - container cmt { - leaf label { - description - "Label to show in UI for the param"; - type string; - default "CMT"; - } - - leaf vm { - description - "Number of VMs with the EPA attribute"; - type uint64; - } - - leaf unit { - description - "Unit label to show in the UI"; - type string; - default "vms"; - } - - } - } - uses operational-events; - } - - - augment /nsr:ns-instance-opdata/nsr:nsr/nsr:vlr { - leaf assigned-subnet { - description "Subnet added for the VL"; - type string; - } - leaf cloud-account { - description - "The configured cloud account in which the VL is instantiated within."; - type leafref { - path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; - } - } - leaf om-datacenter { - description - "Openmano datacenter name to use when instantiating - the network service. This is only used when openmano - is selected as the cloud account. This should be superceded - by multiple cloud accounts when that becomes available."; - type string; - } - } - - augment /nsr:ns-instance-opdata/nsr:nsr/nsr:constituent-vnfr-ref { - leaf cloud-account { - description - "The configured cloud account in which the VNF is instantiated within. - All VDU's, Virtual Links, and provider networks will be requested - using the cloud-account's associated CAL instance"; - type leafref { - path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; - } - } - leaf om-datacenter { - description - "Openmano datacenter name to use when instantiating - the network service. This is only used when openmano - is selected as the cloud account. This should be superceded - by multiple cloud accounts when that becomes available."; - type string; - } - } - - augment /nsr:ns-instance-config { - leaf nfvi-polling-period { - description - "Defines the period (secons) that the NFVI metrics are polled at"; - type uint64; - default 4; - } - } - - notification nsm-notification { - description "Notification for NSM Events. - The timestamp of this event is automatically expressed - in human readble format - 1970-01-01T00:00:00Z"; - - leaf event { - description "Short name of the event"; - type string; - } - - leaf description { - description "The description of this event"; - type string; - } - - leaf details { - description "The detailed description of this event, in case of errors"; - type string; - } - } -} - -// vim: sw=2 diff --git a/models/yang/rw-pb-ext.yang b/models/yang/rw-pb-ext.yang new file mode 100644 index 0000000..1b90153 --- /dev/null +++ b/models/yang/rw-pb-ext.yang @@ -0,0 +1,358 @@ +/* STANDARD_RIFT_IO_COPYRIGHT */ + +/** + * @file rw-pb-ext.yang + * @author Tim Mortsolf, Anil Gunturu, Tom Seidenberg + * @date 2013/03/21 + * @brief RiftWare yang to protobuf conversion extensions + */ + +module rw-pb-ext +{ + namespace "http://riftio.com/ns/riftware-1.0/rw-pb-ext"; + prefix "rwpb"; + + revision 2014-03-28 { + description + "Initial revision."; + reference + "RIFT yang extensions for converting yang files to Google + Protocol Buffers (protobuf) using rift protoc-c extensions."; + } + + extension msg-new { + argument "typename"; + description + "Generate an equivalent, top-level, protobuf message for this + container, list, rpc input, rpc output, or notification. The + argument is the name of the protobuf message type. Allowed + values are valid C identifiers. + + The protobuf definition will only be generated when processing + the same module that defines the yang object - a duplicate will + not be generated when importing reusing a yang object via uses, + or when importing the module."; + } + + extension msg-name { + argument "typename"; + description + "Change the name of an embedded protobuf message type for this + container or list. Allowed values are valid C identifiers. + + In lieu of this extension, embedded protobuf message typenames + are based on the fieldname, and further mangled by removing + underscores and CamelCased at underscore boundaries. This + extension allows the automatic mangling procedure to be + overridden. + + This extension is incompatible with msg-new, which already + defines the typename for top-level messages. Use this extension + solely for embedded messages."; + } + + extension msg-flat { + argument "selection"; + description + "Set the protobuf message rw_msgopts flat option on a container + or list statement. Allowed values are 'true', 'false', and + 'auto'. The default is 'false' for top-level messages, and + 'auto' for embedded messages. If 'auto' is specified, the + behavior is the same as the enclosing container or list. + + Unless overridden, this extension effectively applies to all + enclosed descendent container and list statements. Flatness will + be required by the protobuf compilation step."; + } + + extension msg-tag-base { + argument "value"; + description + "Specify a base tag value for a container, list, grouping, or + uses statement. Field tags may be specified relative to this + base. Allowed values are positive + decimal integers."; + // ATTN: would really like to specify field-relative in uses! + } + +/* + extension msg-tag-reserve { + argument "value"; + description + "Reserve space in the tag numbering for future expansion of the + enclosing grouping, container, or choice. Must be a positive + decimal integer. Choose carefully, as you cannot increase the + value at a later time."; + } +*/ + + extension msg-proto-max-size { + argument "value"; + description + "Specify the maximum size of this message in the C structure or + so in bytes. Allowed values are positive decimal integers."; + } + + extension msg-typedef { + argument "typename"; + description + "Create a prototbuf-c message typedef for the original, base + definition of the container, list, grouping, rpc input, rpc + output, or notification. Allowed values are valid C identifiers. + + typename will be appended to the mangeled protobuf package name + and an underscore, to ensure name uniqueness across the global + schema. + + The typedef will only be generated when processing + the same module that defines the yang object - a duplicate will + not be generated when importing reusing a yang object via uses, + or when importing the module."; + } + + extension field-name { + argument "fieldname"; + description + "Change the name of the element to fieldname, when converting the + object to protobuf. Allowed values are valid C identifiers. + + In lieu of this extension, element names will be used as-is, if + possible, or mangled to fit in the C identifier character space + (invalid C identifier characters will be replaced with + underscore). This extension allows the automatic mangling + procedure to be overridden."; + } + + extension field-inline { + argument "selection"; + description + "Set the protobuf field 'inline' option on a container, list, + leaf-list, or leaf statement. Allowed values are 'true', + 'false', and 'auto'. If 'auto' is specified, the behavior is + controlled by the enclosing container or list's protobuf-msg-flat + setting. + + When applied to a container or list statement, this extension is + inherited by all enclosed objects, unless overridden."; + } + + extension field-inline-max { + argument "limit"; + description + "Set the protobuf field 'inline_max' option for list and + leaf-list statements. Allowed values are a positive decimal + integer, 'yang', or 'none'. Example limits: + + '64' + 'yang' + 'none' + + If 'none' is specified, then the inline_max protobuf extension + will not be used. + + If 'yang' is specified, then the number of elements specified in + the yang 'max-elements' statement is used. If there is no + 'max-elements' statement, the behavior defaults to 'none'. + + If a decimal integer is specified, that number is used as the + maximum length. + + If this extension is not specified, the behavior defaults to + 'yang'. Descendant list and leaf-list objects do not inherit + this extension."; + } + + extension field-string-max { + argument "limit"; + description + "Set the protobuf field 'string_max' option for a leaf or + leaf-list of type string, binary, leafref, identityref, or + instance-identifier. Allowed values are a positive decimal + integer, 'yang', or 'none'. An optional encoding specifier may + also be specified, as octet or utf8, which specifies how + characters are counted. If specified, the encoding must come + first. Example limits: + + 'octet 64' + 'utf8 20' + 'utf8 yang' + 'utf8' + '128' + 'none' + + If 'none' is specified, then the string_max protobuf extension + will not be used. 'none' cannot be combined with 'octet' or + 'utf8'. + + If 'yang' is specified, the yang type must be string or binary. + If the yang type includes the length statement, then the + statements maximum length is used as the length. Otherwise, + behavior defaults to 'none'. + + If a decimal integer is specified, that number is used as the + length. + + The encoding specifiers are used to determine the actual number + of bytes used in the protobuf extension. If the 'octet' + specifier is used, then the maximum length is used literally as + the byte length. If the 'utf8' specified is used, then the + maximum length is considered to be in terms of worst-case UTF-8 + characters, in which case the protobuf byte length will actually + be 4 times the specified length. + + For string and binary types, the default encoding is 'octet'. + For the remaining types, the default encoding is 'utf8', + reflecting those types fundemental description as XML entities + assumed to be encoded in UTF-8. + + If this extension is not specified, then the default is 'yang' + for string and binary, and 'none' for the other types. This + extension cannot be specified on aggregate objects, and so it + cannot be inherited."; + } + + extension field-tag { + argument "value"; + description + "Set the protobuf field tag. Allowed values are a positive + decimal integer, 'auto', a base-relative addition expression, or + a field-relative addition expression. + + If a decimal integer is specified, then the tag is set to the + specified number. You should avoid using this form in a + grouping, because you may not be able to guarantee uniqueness + across all the uses of the group. However, the syntax will be + allowed. + + A base-relative addition expression allows the tag of a field to + be defined in terms of the base tag of an enclosing grouping, + container, list, or uses statement. The expression has the form + '+NUMBER', where NUMBER is the value to add to the base to derive + the current field's tag. + + A field-relative addition expression allows the tag of one field + to be defined in terms of another field. The expression has the + form 'NAME+NUMBER', where NAME is the name of the other field, + and NUMBER is the value to add to the other fields tag to derive + the current field's tag. + + If this extension is not specified, the default behavior is + 'auto'."; + } + + extension field-type { + argument "type"; + description + "Override the default protobuf field type mapping for a leaf or + leaf-list type, and use the specified protobuf type instead. + + Allowed values are any of the Protobuf scalar types, as + restricted by the yang leaf type: + + +---------------------------+-------------------------------+ + | (pseudo) yang leaf type | (pseudo) protobuf scalar type | + |---------------------------+-------------------------------+ + | int8, int16, int32 | int32, sint32, sfixed32, auto | + +---------------------------+-------------------------------+ + | int64 | int64, sint64, sfixed64, auto | + +---------------------------+-------------------------------+ + | uint8, uint16, uint32 | uint32, fixed32, auto | + +---------------------------+-------------------------------+ + | uint64 | uint64, fixed64, auto | + +---------------------------+-------------------------------+ + | decimal | uint64, sint64, int64, | + | | fixed64, sfixed64, | + | | float, double, auto | + +---------------------------+-------------------------------+ + | empty, boolean | bool, auto | + +---------------------------+-------------------------------+ + | string, leafref, | string, auto | + | identityref, | | + | instance-identifier, | | + | anyxml | | + +---------------------------+-------------------------------+ + | bits, binary | bytes, auto | + +---------------------------+-------------------------------+ + + If 'auto' is specified, the default conversion will be used. The + protobuf pseudo-type utf8 is equivalent to string, except that + length limits will be adjusted in protobuf extentions to allow + the string to be composed entirely of the maximum sized UTF-8 + multibyte characters (byte length is 4 times larger than the + character length)."; + } + + extension field-c-type { + argument "type"; + description + "Override the default protoc-c C-language type mapping for a leaf + or leaf-list type, and use the specified C type instead."; + } + + /* ATTN: Stop using this extension? */ + extension package-name { + argument "pkgname"; + description + "Specifies the name of the package name in the generated .proto + file on a module statement The argument is the name of the + package-name. Allowed values are valid C identifiers When + package-name is not specified the generated package name defaults + to the Yang module name"; + } + + extension application-request-point { + description + "This extension is used temporarily until the config and data portions + are split into different namespaces and keyspecs. This allows + applications to provide data at a keyspec, and request config at a + different level"; + } + + extension enum-name { + argument "enumname"; + description + "Use the specified name for the enum enumerator in the .proto + instead of the default mangled name of the yang identifer. + If there is a name conflict with other enum name either specified + explicitly or generated one, the yangpbc conversion will fail. + Allowed values are valid C identifiers."; + } + + extension enum-type { + argument "enumtypename"; + description + "Use the specified name for the enum type in the .proto instead + of the default mangled name of the yang identifier. If there is + a name conflict with another enum type, either auto-generated or + explicitly specified one, the yangpbc conversion will fail. + Allowed values are valid C identifiers."; + } + + extension file-pbc-include { + argument "pathstring"; + description + "A module level extension to specify the include files for pb-c.h + when any rift specific c-types are used. This extension can + occur multiple times as a child of module statement. The value + should be a valid path string."; + } + + extension field-merge-behavior { + argument "value"; + description + "An extension for controlling the merge done for listy types + during upacking of protobuf. It can take 3 different value: + + 1) default: The default is whatever protobuf-c does today + (for keyed lists, the default is equivalent to by-keys). + + 2) by-keys: allowed on keyed lists (and leaf-lists): merge + elements with matching key. + + 3) none: allowed on keyed lists (and leaf-lists): do not + attempt to merge elements. This must ONLY be used when it + is known or expected that the proto message would contain + large number of list items."; + } + +} // rw-pb-ext diff --git a/models/yang/rw-project.yang b/models/yang/rw-project.yang new file mode 100644 index 0000000..4c9d5cb --- /dev/null +++ b/models/yang/rw-project.yang @@ -0,0 +1,63 @@ +/* + * Copyright 2016 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +module rw-project +{ + namespace "http://riftio.com/ns/riftware-1.0/rw-project"; + prefix "rw-project"; + + description + "This yang module defines project-based tenancy for RIFT.ware. + Authorization for project access is defined in terms of RIFT.ware's + Role-Based Access Control (RBAC) model."; + + revision 2015-09-10 { + description + "Initial revision. This YANG file defines the model for + RIFT.ware project management for multi-tenancy"; + reference + "RIFT.io MANO Tenancy Design Specification"; + } + + list project { + description + "Configuration and state for individual projects. RIFT.ware + applications and projects are expected to augment this list in + order to add configuration for projects that is specific to the + product or application. As such, this list contains minimal + data defined in this yang module. + + When augmenting this element, other yang modules should prefer to + define containers with the same name as the augmenting module. + (Augmenting RIFT.ware modules should prefer to augment without + the rw prefix [for new features], or should prefer to augment the + augmented container of an existing augment, to ease future + adoption and/or standardization.)"; + + key "name"; + leaf name { + description "Name of the project."; + type string { + length "1..255"; + } + } + + leaf description { + description "Information about project"; + type string; + } + } +} diff --git a/models/yang/rw-topology.yang b/models/yang/rw-topology.yang deleted file mode 100644 index ff1f2ba..0000000 --- a/models/yang/rw-topology.yang +++ /dev/null @@ -1,126 +0,0 @@ - -/* - * - * Copyright 2016 RIFT.IO Inc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ - -module rw-topology { - namespace "http://riftio.com/ns/riftware-1.0/rw-topology"; - prefix rw-topology; - - import ietf-inet-types {prefix inet;} - import ietf-network {prefix nw;} - import ietf-network-topology {prefix nt;} - import ietf-l2-topology {prefix l2t;} - - revision "2015-10-20" { - description "Initial revision of IP level addressing for L2 host topology"; - } - - grouping ip-address-group { - description "IP addresses if present for L2 termination points"; - container ip-attributes { - description "L2 termination points containing IP addresses"; - list ip-addresses { - key ip; - leaf ip { - type inet:ip-address; - description "IPv4 or IPv6 address"; - } - } - } - } // grouping ip-address-group - - - grouping rw-network-attributes { - description "RW Topology scope attributes"; - container rw-network-attributes { - description "Containing RW network attributes"; - leaf name { - type string; - description "Name of the RW Topology network"; - } - leaf sdn-account-name { - type string; - description "Name of the SDN account from which topology is got"; - } - } - } - - grouping rw-node-attributes { - description "RW node attributes"; - container rw-node-attributes { - description "Containing RW node attributes"; - leaf name { - type string; - description "Node name"; - } - leaf ovs-bridge-name { - type string; - description "Name of OVS bridge"; - } - } - } - - grouping rw-link-attributes { - description "RW link attributes"; - container rw-link-attributes { - description "Containing RW link attributes"; - leaf name { - type string; - description "Link name"; - } - } - } - - grouping rw-termination-point-attributes { - description "RW termination point attributes"; - container rw-termination-point-attributes { - description "Containing RW TP attributes"; - leaf description { - type string; - description "Port description"; - } - uses ip-address-group; - } - } - - augment "/nw:network" { - description - "Configuration parameters for the RW network - as a whole"; - uses rw-network-attributes; - } - - augment "/nw:network/nw:node" { - description - "Configuration parameters for RW at the node - level"; - uses rw-node-attributes; - } - - augment "/nw:network/nt:link" { - description "Augment RW topology link information"; - uses rw-link-attributes; - } - - augment "/nw:network/nw:node/nt:termination-point" { - description - "Augment RW topology termination point configuration"; - uses rw-termination-point-attributes; - } -} diff --git a/models/yang/rw-vlr.yang b/models/yang/rw-vlr.yang deleted file mode 100644 index 755bb81..0000000 --- a/models/yang/rw-vlr.yang +++ /dev/null @@ -1,87 +0,0 @@ - -/* - * - * Copyright 2016 RIFT.IO Inc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ - -module rw-vlr -{ - namespace "http://riftio.com/ns/riftware-1.0/rw-vlr"; - prefix "rw-vlr"; - - import mano-types { - prefix "manotypes"; - } - - import vlr { - prefix "vlr"; - } - - import rw-cloud { - prefix "rw-cloud"; - } - - import ietf-yang-types { - prefix "yang"; - } - - revision 2015-09-30 { - description - "Initial revision. This YANG file augments - the base MANO VNFD"; - reference - "Derived from earlier versions of base YANG files"; - } - - augment /vlr:vlr-catalog/vlr:vlr { - leaf cloud-account { - description - "The cloud account to use when requesting resources for - this vlr"; - type leafref { - path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; - } - } - leaf om-datacenter { - description - "Openmano datacenter name to use when instantiating - the network service. This is only used when openmano - is selected as the cloud account. This should be superceded - by multiple cloud accounts when that becomes available."; - type string; - } - - - leaf network_pool { - description "The network pool the resource was allocated from."; - type string; - } - - leaf assigned-subnet { - description "Subnet added for the VL"; - type string; - } - - leaf operational-status-details { - description - "The error message in case of a failed VLR operational status"; - type string; - } - } -} - -// vim: sw=2 diff --git a/models/yang/rw-vnfd.yang b/models/yang/rw-vnfd.yang deleted file mode 100644 index 29eb852..0000000 --- a/models/yang/rw-vnfd.yang +++ /dev/null @@ -1,117 +0,0 @@ - -/* - * - * Copyright 2016 RIFT.IO Inc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ - -module rw-vnfd -{ - namespace "http://riftio.com/ns/riftware-1.0/rw-vnfd"; - prefix "rw-vnfd"; - - import vnfd { - prefix "vnfd"; - } - - import rwvcs-types { - prefix "rwvcstypes"; - } - - import rw-pb-ext { prefix "rwpb"; } - - import ietf-yang-types { - prefix "yang"; - } - - import mano-types { - prefix "manotypes"; - } - - revision 2015-09-10 { - description - "Initial revision. This YANG file augments - the base MANO VNFD"; - reference - "Derived from earlier versions of base YANG files"; - } - - augment /vnfd:vnfd-catalog/vnfd:vnfd { - uses manotypes:control-param; - uses manotypes:action-param; - leaf meta { - description - "Any meta-data needed by the UI"; - type string; - } - list component { - description - "This section defines the RIFT.ware - virtual components"; - key "component-name"; - rwpb:msg-new VcsComponent; - rwpb:application-request-point; - - leaf component-name { - description ""; - type string; - } - - leaf component-type { - description ""; - type rwvcstypes:component_type; - mandatory true; - } - - choice component { - case rwvcs-rwcollection { - uses rwvcstypes:rwvcs-rwcollection; - } - case rwvcs-rwvm { - uses rwvcstypes:rwvcs-rwvm; - } - case rwvcs-rwproc { - uses rwvcstypes:rwvcs-rwproc; - } - case native-proc { - uses rwvcstypes:native-proc; - } - case rwvcs-rwtasklet { - uses rwvcstypes:rwvcs-rwtasklet; - } - } - } // list component - } - - augment /vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vdu { - leaf vcs-component-ref { - description - "This defines the software components using the - RIFT.ware Virtual Component System (VCS). This - also allows specifying a state machine during - the VM startup. - NOTE: This is an significant addition to MANO, - since MANO doesn't clearly specify a method to - identify various software components in a VM. - Also using a state machine is not something that - is well described in MANO."; - type leafref { - path "/vnfd:vnfd-catalog/vnfd:vnfd/rw-vnfd:component/rw-vnfd:component-name"; - } - } - } -} -// vim: sw=2 diff --git a/models/yang/rw-vnfr.tailf.yang b/models/yang/rw-vnfr.tailf.yang deleted file mode 100644 index 6090fcf..0000000 --- a/models/yang/rw-vnfr.tailf.yang +++ /dev/null @@ -1,50 +0,0 @@ - -/* - * - * Copyright 2016 RIFT.IO Inc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ - -module rw-vnfr-annotation -{ - namespace "http://riftio.com/ns/riftware-1.0/rw-vnfr-annotation"; - prefix "rw-vnfr-ann"; - - import tailf-common { - prefix tailf; - } - - import rw-vnfr { - prefix rw-vnfr; - } - - import vnfr { - prefix vnfr; - } - - tailf:annotate "/vnfr:vnfr-catalog/rw-vnfr:vnfd-ref-count" { - tailf:callpoint rw_callpoint; - } - - tailf:annotate "/vnfr:vnfr-catalog/vnfr:vnfr/rw-vnfr:operational-events" { - tailf:callpoint rw_callpoint; - } - - tailf:annotate "/rw-vnfr:vnfr-console" { - tailf:callpoint rw_callpoint; - } - -} diff --git a/models/yang/rw-vnfr.yang b/models/yang/rw-vnfr.yang deleted file mode 100644 index be8acb4..0000000 --- a/models/yang/rw-vnfr.yang +++ /dev/null @@ -1,324 +0,0 @@ - -/* - * - * Copyright 2016 RIFT.IO Inc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ - -module rw-vnfr -{ - namespace "http://riftio.com/ns/riftware-1.0/rw-vnfr"; - prefix "rw-vnfr"; - - import mano-types { - prefix "manotypes"; - } - - import rw-pb-ext { prefix "rwpb"; } - - import vnfr { - prefix "vnfr"; - } - - import vnfd { - prefix "vnfd"; - } - - import rw-cloud { - prefix "rw-cloud"; - } - - import rwvcs-types { - prefix "rwvcstypes"; - } - - import ietf-yang-types { - prefix "yang"; - } - - import ietf-inet-types { - prefix "inet"; - } - - revision 2015-09-10 { - description - "Initial revision. This YANG file augments - the base MANO VNFD"; - reference - "Derived from earlier versions of base YANG files"; - } - - grouping vnfr-operational-events { - list operational-events { - key "id"; - description - "Recent operational events for VNFR - Though the model does not impose any restrictions on the numbe of events, - the max operational events will be limited to the most recent 10"; - - leaf id { - description "The id of the instance"; - type uint64; - } - - leaf timestamp { - description - "The timestamp of this event expressed as seconds since - unix epoch - 1970-01-01T00:00:00Z"; - type uint32; - } - leaf event { - description "The event"; - type enumeration { - rwpb:enum-type "VnfrOperationalEvent"; - enum instantiate-rcvd; - enum vl-inited; - enum vnf-inited; - enum running; - enum terminate-rcvd; - enum vnf-terminated; - enum vl-terminated; - enum terminated; - } - } - leaf description { - description - "The description of this event"; - type string; - } - } - } - - grouping vdur-operational-events { - list operational-events { - key "id"; - description - "Recent operational events for VDUR - Though the model does not impose any restrictions on the numbe of events, - the max operational events will be limited to the most recent 10"; - - leaf id { - description "The id of the instance"; - type uint64; - } - - leaf timestamp { - description - "The timestamp of this event expressed as seconds since - unix epoch - 1970-01-01T00:00:00Z"; - type uint32; - } - leaf event { - description "The event"; - type enumeration { - rwpb:enum-type "VdurOperationalEvent"; - enum instantiate-rcvd; - enum vm-allocation-requested; - enum running; - enum terminate-rcvd; - enum vm-terminate-requested; - enum terminated; - } - } - leaf description { - description - "The description of this event"; - type string; - } - } - } - - augment /vnfr:vnfr-catalog/vnfr:vnfr { - uses manotypes:action-param; - uses manotypes:control-param; - - leaf cloud-account { - description - "The cloud account to use when requesting resources for - this vnf"; - type leafref { - path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; - } - } - - leaf om-datacenter { - description - "Openmano datacenter name to use when instantiating - the network service. This is only used when openmano - is selected as the cloud account. This should be superceded - by multiple cloud accounts when that becomes available."; - type string; - } - - container nfvi-metrics { - container vm { - leaf label { - description - "Label to show in UI"; - type string; - default "VM"; - } - - leaf active-vm { - description - "The number of active VMs."; - type uint64; - } - - leaf inactive-vm { - description - "The number of inactive VMs."; - type uint64; - } - } - - uses manotypes:nfvi-metrics; - } - - list component { - description - "This section defines the RIFT.ware - virtual components"; - key "component-name"; - rwpb:msg-new VcsComponentOp; - rwpb:application-request-point; - - leaf component-name { - description ""; - type string; - } - - leaf component-type { - description ""; - type rwvcstypes:component_type; - mandatory true; - } - - choice component { - case rwvcs-rwcollection { - uses rwvcstypes:rwvcs-rwcollection; - } - case rwvcs-rwvm { - uses rwvcstypes:rwvcs-rwvm; - } - case rwvcs-rwproc { - uses rwvcstypes:rwvcs-rwproc; - } - case native-proc { - uses rwvcstypes:native-proc; - } - case rwvcs-rwtasklet { - uses rwvcstypes:rwvcs-rwtasklet; - } - } - } // list component - - uses vnfr-operational-events; - - leaf operational-status-details { - description - "The error message in case of a failed VNFR operational status"; - type string; - } - } - - augment /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vdur { - leaf vm-pool { - description - "The pool from which this vm was allocated from"; - type string; - } - - container nfvi-metrics { - uses manotypes:nfvi-metrics; - } - - leaf vcs-component-ref { - description - "This defines the software components using the - RIFT.ware Virtual Component System (VCS). This - also allows specifying a state machine during - the VM startup. - NOTE: This is an significant addition to MANO, - since MANO doesn't clearly specify a method to - identify various software components in a VM. - Also using a state machine is not something that - is well described in MANO."; - type leafref { - path "/vnfr:vnfr-catalog/vnfr:vnfr/rw-vnfr:component/rw-vnfr:component-name"; - } - } - - uses vdur-operational-events; - - leaf operational-status-details { - description - "The error message in case of a failed VDU operational status"; - type string; - } - } - grouping vnfd-ref-count { - list vnfd-ref-count { - key "vnfd-id-ref"; - description "This table maintains the number of VNFRs used by each VNFD"; - - leaf vnfd-id-ref { - description "Reference to VNFD"; - type leafref { - path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id"; - } - } - leaf instance-ref-count { - description - "Reference count for the number of VNFRs refering this VNFD. - Every VNF Record instantiated using this descriptor takes - a reference on the VNFD and releases the reference when the - virtual network service is terminated. This desciptor cannot - be deleted when this counter is non zero"; - type uint64; - } - } - } - augment /vnfr:vnfr-catalog { - uses vnfd-ref-count; - } - - container vnfr-console { - config false; - list vnfr { - key "id"; - leaf id { - description "Identifier for the VNFR."; - type yang:uuid; - } - list vdur { - description "List of Virtual Deployment Units"; - key "id"; - leaf id { - description "Unique id for the VDU"; - type yang:uuid; - } - leaf console-url { - description "Console URL for this VDU, if available"; - type inet:uri; - } - } - } - } - -} - -// vim: sw=2 diff --git a/models/yang/vlr.tailf.yang b/models/yang/vlr.tailf.yang deleted file mode 100644 index 4bed1d2..0000000 --- a/models/yang/vlr.tailf.yang +++ /dev/null @@ -1,37 +0,0 @@ - -/* - * - * Copyright 2016 RIFT.IO Inc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ - -module vlr-annotation -{ - namespace "http://riftio.com/ns/riftware-1.0/vlr-annotation"; - prefix "vlr-ann"; - - import tailf-common { - prefix tailf; - } - - import vlr { - prefix vlr; - } - - tailf:annotate "/vlr:vlr-catalog" { - tailf:callpoint rw_callpoint; - } -} diff --git a/models/yang/vlr.yang b/models/yang/vlr.yang index b079dff..616bad0 100644 --- a/models/yang/vlr.yang +++ b/models/yang/vlr.yang @@ -1,7 +1,7 @@ /* * - * Copyright 2016 RIFT.IO Inc + * Copyright 2016-2017 RIFT.IO Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,10 +27,6 @@ module vlr prefix "rwpb"; } - import ietf-inet-types { - prefix "inet"; - } - import ietf-yang-types { prefix "yang"; } @@ -39,6 +35,14 @@ module vlr prefix "manotypes"; } + import rw-project { + prefix "rw-project"; + } + + revision 2017-02-08 { + description + "Update model to support projects."; + } revision 2015-09-10 { description @@ -48,125 +52,127 @@ module vlr "Derived from earlier versions of base YANG files"; } - container vlr-catalog { - config false; + augment "/rw-project:project" { + container vlr-catalog { + config false; - list vlr { - key "id"; - unique "name"; + list vlr { + key "id"; + unique "name"; - leaf id { - description "Identifier for the VLR."; - type yang:uuid; - } + leaf id { + description "Identifier for the VLR."; + type yang:uuid; + } - leaf name { - description "VLR name."; - type string; - } + leaf name { + description "VLR name."; + type string; + } - leaf nsr-id-ref { - description + leaf nsr-id-ref { + description "NS instance identifier. - This is a leafref /nsr:ns-instance-config/nsr:nsr/nsr:id"; - type yang:uuid; - } + This is a leafref /rw-project:project/nsr:ns-instance-config/nsr:nsr/nsr:id"; + type yang:uuid; + } - leaf vld-ref { - description - "Reference to VLD - /nsr:ns-instance-config/nsr:nsr[nsr:id=../nsr-id-ref]/nsd/vld:vld/vld:id"; - type string; - } + leaf vld-ref { + description + "Reference to VLD + /rw-project:project/nsr:ns-instance-config/nsr:nsr[nsr:id=../nsr-id-ref] + /nsd/vld:vld/vld:id"; + type string; + } - leaf res-id { - description "Identifier for resmgr id mapping"; - type yang:uuid; - } + leaf res-id { + description "Identifier for resmgr id mapping"; + type yang:uuid; + } - leaf short-name { - description "Short name to appear as label in the UI"; - type string; - } + leaf short-name { + description "Short name to appear as label in the UI"; + type string; + } - leaf vendor { - description "Provider of the VLR."; - type string; - } + leaf vendor { + description "Provider of the VLR."; + type string; + } - leaf description { - description "Description of the VLR."; - type string; - } + leaf description { + description "Description of the VLR."; + type string; + } - leaf version { - description "Version of the VLR"; - type string; - } + leaf version { + description "Version of the VLR"; + type string; + } - leaf type { - type manotypes:virtual-link-type; - } + leaf type { + type manotypes:virtual-link-type; + } - leaf root-bandwidth { - description + leaf root-bandwidth { + description "For ELAN this is the aggregate bandwidth."; - type uint64; - } + type uint64; + } - leaf leaf-bandwidth { - description + leaf leaf-bandwidth { + description "For ELAN this is the bandwidth of branches."; - type uint64; - } + type uint64; + } - leaf create-time { - description - "Creation timestamp of this Virtual Link. + leaf create-time { + description + "Creation timestamp of this Virtual Link. The timestamp is expressed as seconds since unix epoch - 1970-01-01T00:00:00Z"; - type uint32; - } + type uint32; + } - leaf uptime { - description - "Active period of this Virtual Link. + leaf uptime { + description + "Active period of this Virtual Link. Uptime is expressed in seconds"; - type uint32; - } + type uint32; + } - leaf network-id { - description + leaf network-id { + description "Identifier for the allocated network resource."; - type string; - } + type string; + } - leaf vim-network-name { - description + leaf vim-network-name { + description "Name of network in VIM account. This is used to indicate pre-provisioned network name in cloud account."; - type string; - } + type string; + } - // replicate for pnfd container here + // replicate for pnfd container here - uses manotypes:provider-network; - uses manotypes:ip-profile-info; + uses manotypes:provider-network; + uses manotypes:ip-profile-info; - leaf status { - description + leaf status { + description "Status of the virtual link record."; - type enumeration { - enum LINK_UP; - enum DEGRADED; - enum LINK_DOWN; + type enumeration { + enum LINK_UP; + enum DEGRADED; + enum LINK_DOWN; + } } - } - leaf operational-status { - description - "The operational status of the Virtual Link + leaf operational-status { + description + "The operational status of the Virtual Link init : The VL is in init stat. vl-alloc-pending : The VL alloc is pending in VIM running : The VL is up and running in VM @@ -175,14 +181,15 @@ module vlr failed : The VL instantiation failed in VIM. "; - type enumeration { - rwpb:enum-type "VlOperationalStatus"; - enum init; - enum vl-alloc-pending; - enum running; - enum vl-terminate-pending; - enum terminated; - enum failed; + type enumeration { + rwpb:enum-type "VlOperationalStatus"; + enum init; + enum vl-alloc-pending; + enum running; + enum vl-terminate-pending; + enum terminated; + enum failed; + } } } } diff --git a/models/yang/vnfd-base.yang b/models/yang/vnfd-base.yang new file mode 100644 index 0000000..5d76290 --- /dev/null +++ b/models/yang/vnfd-base.yang @@ -0,0 +1,540 @@ + +/* + * + * Copyright 2017 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + +module vnfd-base +{ + namespace "http://riftio.com/ns/riftware-1.0/vnfd-base"; + prefix "vnfd-base"; + + import mano-types { + prefix "manotypes"; + } + + import ietf-inet-types { + prefix "inet"; + } + + revision 2017-02-28 { + description + "Initial revision. This YANG file defines + the common types for Virtual Network Function + (VNF) descriptor"; + reference + "Derived from earlier versions of base YANG files"; + } + + grouping common-connection-point { + leaf name { + description "Name of the connection point"; + type string; + } + + leaf id { + description "Identifier for the internal connection points"; + type string; + } + + leaf short-name { + description "Short name to appear as label in the UI"; + type string; + } + + leaf type { + description "Type of the connection point."; + type manotypes:connection-point-type; + } + + leaf port-security-enabled { + description "Enables the port security for the port"; + type boolean; + } + } + + typedef interface-type { + type enumeration { + enum INTERNAL; + enum EXTERNAL; + } + } + + grouping virtual-interface { + container virtual-interface { + description + "Container for the virtual interface properties"; + + leaf type { + description + "Specifies the type of virtual interface + between VM and host. + VIRTIO : Use the traditional VIRTIO interface. + PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface. + SR-IOV : Use SR-IOV interface. + E1000 : Emulate E1000 interface. + RTL8139 : Emulate RTL8139 interface. + PCNET : Emulate PCNET interface. + OM-MGMT : Used to specify openmano mgmt external-connection type"; + + type enumeration { + enum OM-MGMT; + enum PCI-PASSTHROUGH; + enum SR-IOV; + enum VIRTIO; + enum E1000; + enum RTL8139; + enum PCNET; + } + default "VIRTIO"; + } + + leaf vpci { + description + "Specifies the virtual PCI address. Expressed in + the following format dddd:dd:dd.d. For example + 0000:00:12.0. This information can be used to + pass as metadata during the VM creation."; + type string; + } + + leaf bandwidth { + description + "Aggregate bandwidth of the NIC."; + type uint64; + } + } + } + + grouping vnfd-descriptor { + leaf id { + description "Identifier for the VNFD."; + type string { + length "1..63"; + } + } + + leaf name { + description "VNFD name."; + mandatory true; + type string; + } + + leaf short-name { + description "Short name to appear as label in the UI"; + type string; + } + + leaf vendor { + description "Vendor of the VNFD."; + type string; + } + + leaf logo { + description + "Vendor logo for the Virtual Network Function"; + type string; + } + + leaf description { + description "Description of the VNFD."; + type string; + } + + leaf version { + description "Version of the VNFD"; + type string; + } + + uses manotypes:vca-configuration; + + container mgmt-interface { + description + "Interface over which the VNF is managed."; + + choice endpoint-type { + description + "Indicates the type of management endpoint."; + + case ip { + description + "Specifies the static IP address for managing the VNF."; + leaf ip-address { + type inet:ip-address; + } + } + + case vdu-id { + description + "Use the default management interface on this VDU."; + leaf vdu-id { + type leafref { + path "../../vdu/id"; + } + } + } + + case cp { + description + "Use the ip address associated with this connection point."; + leaf cp { + type leafref { + path "../../connection-point/name"; + } + } + } + } + + leaf port { + description + "Port for the management interface."; + type inet:port-number; + } + + container dashboard-params { + description "Parameters for the VNF dashboard"; + + leaf path { + description "The HTTP path for the dashboard"; + type string; + } + + leaf https { + description "Pick HTTPS instead of HTTP , Default is false"; + type boolean; + } + + leaf port { + description "The HTTP port for the dashboard"; + type inet:port-number; + } + } + } + + list internal-vld { + key "id"; + description + "List of Internal Virtual Link Descriptors (VLD). + The internal VLD describes the basic topology of + the connectivity such as E-LAN, E-Line, E-Tree. + between internal VNF components of the system."; + + leaf id { + description "Identifier for the VLD"; + type string; + } + + leaf name { + description "Name of the internal VLD"; + type string; + } + + leaf short-name { + description "Short name to appear as label in the UI"; + type string; + } + + leaf description { + type string; + } + + leaf type { + type manotypes:virtual-link-type; + } + + leaf root-bandwidth { + description + "For ELAN this is the aggregate bandwidth."; + type uint64; + } + + leaf leaf-bandwidth { + description + "For ELAN this is the bandwidth of branches."; + type uint64; + } + + list internal-connection-point { + key "id-ref"; + description "List of internal connection points in this VLD"; + leaf id-ref { + description "reference to the internal connection point id"; + type leafref { + path "../../../vdu/internal-connection-point/id"; + } + } + } + + uses manotypes:provider-network; + choice init-params { + description "Extra parameters for VLD instantiation"; + + case vim-network-ref { + leaf vim-network-name { + description + "Name of network in VIM account. This is used to indicate + pre-provisioned network name in cloud account."; + type string; + } + } + + case vim-network-profile { + leaf ip-profile-ref { + description "Named reference to IP-profile object"; + type string; + } + } + + } + } + + uses manotypes:ip-profile-list; + + list connection-point { + key "name"; + description + "List for external connection points. Each VNF has one + or more external connection points that connect the VNF + to other VNFs or to external networks. Each VNF exposes + connection points to the orchestrator, which can construct + network services by connecting the connection points + between different VNFs. The NFVO will use VLDs and VNFFGs + at the network service level to construct network services."; + + uses common-connection-point; + } + + list vdu { + description "List of Virtual Deployment Units"; + key "id"; + + leaf id { + description "Unique id for the VDU"; + type string; + } + + leaf name { + description "Unique name for the VDU"; + type string; + } + + leaf description { + description "Description of the VDU."; + type string; + } + + leaf count { + description "Number of instances of VDU"; + type uint64; + } + + leaf mgmt-vpci { + description + "Specifies the virtual PCI address. Expressed in + the following format dddd:dd:dd.d. For example + 0000:00:12.0. This information can be used to + pass as metadata during the VM creation."; + type string; + } + + uses manotypes:vm-flavor; + uses manotypes:guest-epa; + uses manotypes:vswitch-epa; + uses manotypes:hypervisor-epa; + uses manotypes:host-epa; + + list alarm { + key "alarm-id"; + + uses manotypes:alarm; + } + + uses manotypes:image-properties; + + choice cloud-init-input { + description + "Indicates how the contents of cloud-init script are provided. + There are 2 choices - inline or in a file"; + + case inline { + leaf cloud-init { + description + "Contents of cloud-init script, provided inline, in cloud-config format"; + type string; + } + } + + case filename { + leaf cloud-init-file { + description + "Name of file with contents of cloud-init script in cloud-config format"; + type string; + } + } + } + + uses manotypes:supplemental-boot-data; + + list internal-connection-point { + key "id"; + description + "List for internal connection points. Each VNFC + has zero or more internal connection points. + Internal connection points are used for connecting + the VNF with components internal to the VNF. If a VNF + has only one VNFC, it may not have any internal + connection points."; + + uses common-connection-point; + + leaf internal-vld-ref { + type leafref { + path "../../../internal-vld/id"; + } + } + } + + list interface { + description + "List of Interfaces (external and internal) 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; + } + + leaf position { + description + "Explicit Position of the interface within the list"; + type uint32; + } + + leaf type { + description + "Type of the Interface"; + type interface-type; + + 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"; + } + } + } + } + + uses virtual-interface; + } + + + list volumes { + key "name"; + + leaf name { + description "Name of the disk-volumes, e.g. vda, vdb etc"; + type string; + } + + uses manotypes:volume-info; + } + } + + list vdu-dependency { + description + "List of VDU dependencies."; + + key vdu-source-ref; + leaf vdu-source-ref { + type leafref { + path "../../vdu/id"; + } + } + + leaf vdu-depends-on-ref { + description + "Reference to the VDU on which + the source VDU depends."; + type leafref { + path "../../vdu/id"; + } + } + } + + leaf service-function-chain { + description "Type of node in Service Function Chaining Architecture"; + + type enumeration { + enum UNAWARE; + enum CLASSIFIER; + enum SF; + enum SFF; + } + default "UNAWARE"; + } + + leaf service-function-type { + description + "Type of Service Function. + NOTE: This needs to map with Service Function Type in ODL to + support VNFFG. Service Function Type is mandatory param in ODL + SFC. This is temporarily set to string for ease of use"; + type string; + } + + uses manotypes:monitoring-param; + + list placement-groups { + description "List of placement groups at VNF level"; + + key "name"; + uses manotypes:placement-group-info; + + list member-vdus { + + description + "List of VDUs that are part of this placement group"; + key "member-vdu-ref"; + + leaf member-vdu-ref { + type leafref { + path "../../../vdu/id"; + } + } + } + } + } +} + +// vim: sw=2 diff --git a/models/yang/vnfd.yang b/models/yang/vnfd.yang index 60fc757..d1c9df6 100644 --- a/models/yang/vnfd.yang +++ b/models/yang/vnfd.yang @@ -1,7 +1,7 @@ /* * - * Copyright 2016 RIFT.IO Inc + * Copyright 2016-2017 RIFT.IO Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,12 +23,13 @@ module vnfd namespace "urn:ietf:params:xml:ns:yang:nfvo:vnfd"; prefix "vnfd"; - import mano-types { - prefix "manotypes"; + import vnfd-base { + prefix "vnfd-base"; } - import ietf-inet-types { - prefix "inet"; + revision 2017-02-28 { + description + "Update model to support projects."; } revision 2015-09-10 { @@ -38,497 +39,15 @@ module vnfd reference "Derived from earlier versions of base YANG files"; } - - grouping common-connection-point { - leaf name { - description "Name of the connection point"; - type string; - } - - leaf id { - description "Identifier for the internal connection points"; - type string; - } - - leaf short-name { - description "Short name to appear as label in the UI"; - type string; - } - - leaf type { - description "Type of the connection point."; - type manotypes:connection-point-type; - } - leaf port-security-enabled { - description "Enables the port security for the port"; - type boolean; - } - } - - grouping virtual-interface { - container virtual-interface { - description - "Container for the virtual interface properties"; - - leaf type { - description - "Specifies the type of virtual interface - between VM and host. - VIRTIO : Use the traditional VIRTIO interface. - PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface. - SR-IOV : Use SR-IOV interface. - E1000 : Emulate E1000 interface. - RTL8139 : Emulate RTL8139 interface. - PCNET : Emulate PCNET interface. - OM-MGMT : Used to specify openmano mgmt external-connection type"; - - type enumeration { - enum OM-MGMT; - enum PCI-PASSTHROUGH; - enum SR-IOV; - enum VIRTIO; - enum E1000; - enum RTL8139; - enum PCNET; - } - default "VIRTIO"; - } - - leaf vpci { - description - "Specifies the virtual PCI address. Expressed in - the following format dddd:dd:dd.d. For example - 0000:00:12.0. This information can be used to - pass as metadata during the VM creation."; - type string; - } - - leaf bandwidth { - description - "Aggregate bandwidth of the NIC."; - type uint64; - } - } - } - - grouping vnfd-descriptor { - leaf id { - description "Identifier for the VNFD."; - type string; - } - - leaf name { - description "VNFD name."; - mandatory true; - type string; - } - - leaf short-name { - description "Short name to appear as label in the UI"; - type string; - } - - leaf vendor { - description "Vendor of the VNFD."; - type string; - } - - leaf logo { - description - "Vendor logo for the Virtual Network Function"; - type string; - } - - leaf description { - description "Description of the VNFD."; - type string; - } - - leaf version { - description "Version of the VNFD"; - type string; - } - - container vnf-configuration { - uses manotypes:vca-configuration; - } - - container mgmt-interface { - description - "Interface over which the VNF is managed."; - - choice endpoint-type { - description - "Indicates the type of management endpoint."; - - case ip { - description - "Specifies the static IP address for managing the VNF."; - leaf ip-address { - type inet:ip-address; - } - } - - case vdu-id { - description - "Use the default management interface on this VDU."; - leaf vdu-id { - type leafref { - path "../../vdu/id"; - } - } - } - - case cp { - description - "Use the ip address associated with this connection point."; - leaf cp { - type leafref { - path "../../connection-point/name"; - } - } - } - } - - leaf port { - description - "Port for the management interface."; - type inet:port-number; - } - - container dashboard-params { - description "Parameters for the VNF dashboard"; - - leaf path { - description "The HTTP path for the dashboard"; - type string; - } - - leaf https { - description "Pick HTTPS instead of HTTP , Default is false"; - type boolean; - } - - leaf port { - description "The HTTP port for the dashboard"; - type inet:port-number; - } - } - } - - list internal-vld { - key "id"; - description - "List of Internal Virtual Link Descriptors (VLD). - The internal VLD describes the basic topology of - the connectivity such as E-LAN, E-Line, E-Tree. - between internal VNF components of the system."; - - leaf id { - description "Identifier for the VLD"; - type string; - } - - leaf name { - description "Name of the internal VLD"; - type string; - } - - leaf short-name { - description "Short name to appear as label in the UI"; - type string; - } - - leaf description { - description "Description of internal VLD."; - type string; - } - - leaf type { - type manotypes:virtual-link-type; - } - - leaf root-bandwidth { - description - "For ELAN this is the aggregate bandwidth."; - type uint64; - } - - leaf leaf-bandwidth { - description - "For ELAN this is the bandwidth of branches."; - type uint64; - } - - list internal-connection-point { - key "id-ref"; - description "List of internal connection points in this VLD"; - leaf id-ref { - description "reference to the internal connection point id"; - type leafref { - path "../../../vdu/internal-connection-point/id"; - } - } - } - uses manotypes:provider-network; - choice init-params { - description "Extra parameters for VLD instantiation"; - - case vim-network-ref { - leaf vim-network-name { - description - "Name of network in VIM account. This is used to indicate - pre-provisioned network name in cloud account."; - type string; - } - } - - case vim-network-profile { - leaf ip-profile-ref { - description "Named reference to IP-profile object"; - type leafref { - path "../../ip-profiles/name"; - } - } - } - } - } - - uses manotypes:ip-profile-list; - - list connection-point { - key "name"; - description - "List for external connection points. Each VNF has one - or more external connection points that connect the VNF - to other VNFs or to external networks. Each VNF exposes - connection points to the orchestrator, which can construct - network services by connecting the connection points - between different VNFs. The NFVO will use VLDs and VNFFGs - at the network service level to construct network services."; - - uses common-connection-point; - } - - list vdu { - description "List of Virtual Deployment Units"; - key "id"; - - leaf id { - description "Unique id for the VDU"; - type string; - } - - leaf name { - description "Unique name for the VDU"; - type string; - } - - leaf description { - description "Description of the VDU."; - type string; - } - - leaf count { - description "Number of instances of VDU"; - type uint64; - } - - leaf mgmt-vpci { - description - "Specifies the virtual PCI address. Expressed in - the following format dddd:dd:dd.d. For example - 0000:00:12.0. This information can be used to - pass as metadata during the VM creation."; - type string; - } - - uses manotypes:vm-flavor; - uses manotypes:guest-epa; - 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. - There are 2 choices - inline or in a file"; - - case inline { - leaf cloud-init { - description - "Contents of cloud-init script, provided inline, in cloud-config format"; - type string; - } - } - - case filename { - leaf cloud-init-file { - description - "Name of file with contents of cloud-init script in cloud-config format"; - type string; - } - } - } - - uses manotypes:supplemental-boot-data; - - list internal-connection-point { - key "id"; - description - "List for internal connection points. Each VNFC - has zero or more internal connection points. - Internal connection points are used for connecting - the VNF with components internal to the VNF. If a VNF - has only one VNFC, it may not have any internal - connection points."; - - uses common-connection-point; - } - - list internal-interface { - description - "List of internal interfaces for the VNF"; - key name; - - leaf name { - description - "Name of internal interface. Note that this - name has only local significance to the VDU."; - type string; - } - - leaf vdu-internal-connection-point-ref { - type leafref { - path "../../internal-connection-point/id"; - } - } - uses virtual-interface; - } - - list external-interface { - description - "List of external interfaces for the VNF. - The external interfaces enable sending - traffic to and from VNF."; - key name; - - leaf name { - description - "Name of the external interface. Note that - this name has only local significance to - the VDU."; - type string; - } - - leaf vnfd-connection-point-ref { - description - "Name of the external connection point."; - type leafref { - path "../../../connection-point/name"; - } - } - uses virtual-interface; - } - - list volumes { - key "name"; - - leaf name { - description "Name of the disk-volumes, e.g. vda, vdb etc"; - type string; - } - - uses manotypes:volume-info; - } - } - - list vdu-dependency { - description - "List of VDU dependencies."; - - key vdu-source-ref; - leaf vdu-source-ref { - type leafref { - path "../../vdu/id"; - } - } - - leaf vdu-depends-on-ref { - description - "Reference to the VDU on which - the source VDU depends."; - type leafref { - path "../../vdu/id"; - } - } - } - - leaf service-function-chain { - description "Type of node in Service Function Chaining Architecture"; - - type enumeration { - enum UNAWARE; - enum CLASSIFIER; - enum SF; - enum SFF; - } - default "UNAWARE"; - } - - leaf service-function-type { - description - "Type of Service Function. - NOTE: This needs to map with Service Function Type in ODL to - support VNFFG. Service Function Type is mandatory param in ODL - SFC. This is temporarily set to string for ease of use"; - type string; - } - - uses manotypes:monitoring-param; - - list placement-groups { - description "List of placement groups at VNF level"; - - key "name"; - uses manotypes:placement-group-info; - - list member-vdus { - - description - "List of VDUs that are part of this placement group"; - key "member-vdu-ref"; - - leaf member-vdu-ref { - type leafref { - path "../../../vdu/id"; - } - } - } - } - } - container vnfd-catalog { description - "Virtual Network Function Descriptor (VNFD)."; + "Virtual Network Function Descriptor (VNFD)."; list vnfd { key "id"; - uses vnfd-descriptor; - } + uses vnfd-base:vnfd-descriptor; + } } } diff --git a/models/yang/vnffgd.yang b/models/yang/vnffgd.yang new file mode 100644 index 0000000..652ee81 --- /dev/null +++ b/models/yang/vnffgd.yang @@ -0,0 +1,82 @@ + +/* + * + * Copyright 2016-2017 RIFT.IO Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + +module vnffgd +{ + namespace "urn:ietf:params:xml:ns:yang:nfvo:vnffgd"; + prefix "vnffgd"; + + import ietf-yang-types { + prefix "yang"; + } + + import rw-project { + prefix "rw-project"; + } + + revision 2017-02-08 { + description + "Update model to support projects."; + } + + revision 2014-10-27 { + description + "Initial revision. This YANG file defines + the VNF Forwarding Graph Descriptor (VNFFGD)"; + reference + "Derived from earlier versions of base YANG files"; + } + + augment "/rw-project:project" { + container vnffgd-catalog { + + list vnffgd { + key "id"; + + leaf name { + description "VNF Forwarding Graph Descriptor name."; + type string; + } + + leaf id { + description "Identifier for the VNFFGD."; + type yang:uuid; + } + + leaf provider { + description "Provider of the VNFFGD."; + type string; + } + + leaf description { + description "Description of the VNFFGD."; + type string; + } + + leaf version { + description "Version of the VNFFGD"; + type string; + } + + //TODO: Add more content here + } + } + } +} diff --git a/models/yang/vnfr.tailf.yang b/models/yang/vnfr.tailf.yang deleted file mode 100644 index 150dc9a..0000000 --- a/models/yang/vnfr.tailf.yang +++ /dev/null @@ -1,45 +0,0 @@ - -/* - * - * Copyright 2016 RIFT.IO Inc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ - -module vnfr-annotation -{ - namespace "http://riftio.com/ns/riftware-1.0/vnfr-annotation"; - prefix "vnfr-ann"; - - import tailf-common { - prefix tailf; - } - - import vnfr { - prefix vnfr; - } - - tailf:annotate "/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/yang/vnfr.yang b/models/yang/vnfr.yang index 773cc95..d47c6a7 100644 --- a/models/yang/vnfr.yang +++ b/models/yang/vnfr.yang @@ -1,7 +1,7 @@ /* * - * Copyright 2016 RIFT.IO Inc + * Copyright 2016-2017 RIFT.IO Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,12 +31,16 @@ module vnfr prefix "rwpb"; } - import vnfd { - prefix "vnfd"; + import vnfd-base { + prefix "vnfd-base"; } - import nsd { - prefix "nsd"; + import project-vnfd { + prefix "project-vnfd"; + } + + import project-nsd { + prefix "project-nsd"; } import vlr { @@ -51,6 +55,15 @@ module vnfr prefix "inet"; } + import rw-project { + prefix "rw-project"; + } + + revision 2017-02-28 { + description + "Update model to support projects."; + } + revision 2015-09-10 { description "Initial revision. This YANG file defines @@ -133,120 +146,166 @@ module vnfr } } - container vnfr-catalog { - config false; - list vnfr { - description - "Virtual Network Function Record (VNFR)."; - key "id"; - unique "name"; + grouping associated-virtual-cps { + list virtual-cps { + key "name"; + uses vnfd-base:common-connection-point; - leaf id { - description "Identifier for the VNFR."; - type yang:uuid; + leaf ip-address { + description + "IP address assigned to the virtual connection point"; + type inet:ip-address; } - leaf nsr-id-ref { + leaf mac-address { description + "MAC address assigned to the virtual connection point"; + type string; + } + + leaf connection-point-id { + description "VIM identifier for connection point"; + type string; + } + } + } + + augment "/rw-project:project" { + container vnfr-catalog { + config false; + list vnfr { + description + "Virtual Network Function Record (VNFR)."; + key "id"; + unique "name"; + + leaf id { + description "Identifier for the VNFR."; + type yang:uuid; + } + + leaf nsr-id-ref { + description "NS instance identifier. This is a leafref /nsr:ns-instance-config/nsr:nsr/nsr:id"; - type yang:uuid; - } + type yang:uuid; + } - leaf member-vnf-index-ref { - description "Reference to member VNF index in Network service."; - type leafref { - path "/nsd:nsd-catalog/nsd:nsd/nsd:constituent-vnfd/nsd:member-vnf-index"; + leaf member-vnf-index-ref { + description "Reference to member VNF index in Network service."; + type leafref { + path "../../../project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:constituent-vnfd/project-nsd:member-vnf-index"; + } } - } - leaf dashboard-url { - description "Dashboard URL"; - type inet:uri; - } + leaf dashboard-url { + description "Dashboard URL"; + type inet:uri; + } - leaf name { - description "VNFR name."; - type string; - } + leaf name { + description "VNFR name."; + type string; + } - leaf short-name { - description "VNFR short name."; - type string; - } + leaf short-name { + description "VNFR short name."; + type string; + } - leaf vendor { - description "Vendor of the VNFR."; - type string; - } + leaf vendor { + description "Vendor of the VNFR."; + type string; + } - leaf description { - description "Description of the VNFR."; - type string; - } + leaf description { + description "Description of the VNFR."; + type string; + } - leaf version { - description "Version of the VNFR"; - type string; - } + leaf version { + description "Version of the VNFR"; + type string; + } - leaf create-time { - description - "Creation timestamp of this Virtual Network + leaf create-time { + description + "Creation timestamp of this Virtual Network Function. The timestamp is expressed as seconds since unix epoch - 1970-01-01T00:00:00Z"; - type uint32; - } + type uint32; + } - leaf uptime { - description - "Active period of this Virtual Network Function. + leaf uptime { + description + "Active period of this Virtual Network Function. Uptime is expressed in seconds"; - type uint32; - } + type uint32; + } - container vnfd { - description "VNF descriptor used to instantiate this VNF"; - uses vnfd:vnfd-descriptor; - } + container vnfd { + description "VNF descriptor used to instantiate this VNF"; + uses vnfd-base:vnfd-descriptor; + } - // Use parameters provided here to configure this VNF + leaf vnfd-ref { + description "Reference to VNFD"; + type leafref { + path "../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id"; + } + } + + // Use parameters provided here to configure this VNF container vnf-configuration { uses manotypes:vca-configuration; } - // Mainly used by Mon-params & dashboard url - container mgmt-interface { - leaf ip-address { - type inet:ip-address; - } - leaf port { - type inet:port-number; - } - } + // Mainly used by Mon-params & dashboard url + container mgmt-interface { + leaf ip-address { + type inet:ip-address; + } - list internal-vlr { - key "vlr-ref"; + leaf port { + type inet:port-number; + } - leaf vlr-ref { - description "Reference to a VLR record in the VLR catalog"; - type leafref { - path "/vlr:vlr-catalog/vlr:vlr/vlr:id"; + container ssh-key { + description "SSH key pair used for this VNF"; + leaf public-key { + description "Public key configured on this VNF"; + type string; + } + + leaf private-key-file { + description "Path to the private key file"; + type string; + } } } - leaf-list internal-connection-point-ref { - type leafref { - path "../../vdur/internal-connection-point/id"; + list internal-vlr { + key "vlr-ref"; + + leaf vlr-ref { + description "Reference to a VLR record in the VLR catalog"; + type leafref { + path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id"; + } + } + + leaf-list internal-connection-point-ref { + type leafref { + path "../../vdur/internal-connection-point/id"; + } } } - } - list connection-point { - key "name"; - description + list connection-point { + key "name"; + description "List for external connection points. Each VNF has one or more external connection points. As the name implies that external connection points are used for @@ -257,133 +316,126 @@ module vnfr different VNFs. The NFVO will use VLDs and VNFFGs at the network service level to construct network services."; - uses vnfd:common-connection-point; + uses vnfd-base:common-connection-point; - leaf vlr-ref { - description + leaf vlr-ref { + description "Reference to the VLR associated with this connection point"; - type leafref { - path "/vlr:vlr-catalog/vlr:vlr/vlr:id"; + type leafref { + path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id"; + } } - } - leaf ip-address { - description + leaf ip-address { + description "IP address assigned to the external connection point"; - type inet:ip-address; - } - leaf mac-address { - description + type inet:ip-address; + } + leaf mac-address { + description "MAC address assigned to the external connection point"; - // type inet:mac-address; - type string; - } - leaf connection-point-id { - rwpb:field-inline "true"; - rwpb:field-string-max 64; - type string; - } - } + // type inet:mac-address; + type string; + } - list vdur { - description "List of Virtual Deployment Units"; - key "id"; - unique "name"; + leaf connection-point-id { + type string; + } - leaf id { - description "Unique id for the VDU"; - type yang:uuid; + uses associated-virtual-cps; } - leaf name { - description "name of the instantiated VDUR"; - type string; - } + list vdur { + description "List of Virtual Deployment Units"; + key "id"; + unique "name"; - leaf unique-short-name { - description "Short Unique name of the VDU - This will be of the format NSR name-ShortnedString-VDUname - NSR name and VDU name shall be constrained to 10 characters"; - rwpb:field-inline "true"; - rwpb:field-string-max 64; - type string; - } + leaf id { + description "Unique id for the VDU"; + type yang:uuid; + } - leaf vdu-id-ref { - type leafref { - path "../../vnfd/vdu/id"; + leaf name { + description "name of the instantiated VDUR"; + type string; } - } - leaf vim-id { - description "Allocated VM resource id"; - type string; - } + leaf unique-short-name { + description "Short Unique name of the VDU + This will be of the format NSR name-ShortnedString-VDUname + NSR name and VDU name shall be constrained to 10 characters"; + rwpb:field-inline "true"; + rwpb:field-string-max 64; + type string; + } - leaf flavor-id { - description "VIM assigned flavor id"; - type string; - } + leaf vdu-id-ref { + type leafref { + path "../../vnfd/vdu/id"; + } + } - leaf image-id { - description "VIM assigned image id"; - type string; - } + leaf vim-id { + description "Allocated VM resource id"; + type string; + } - leaf management-ip { - description "Management IP address"; - type inet:ip-address; - } + leaf flavor-id { + description "VIM assigned flavor id"; + type string; + } - leaf vm-management-ip { - description "VM Private Management IP address"; - type inet:ip-address; - } + leaf image-id { + description "VIM assigned image id"; + type string; + } - leaf console-url { - description "Console URL for this VDU, if available"; - type inet:uri; - } + leaf management-ip { + description "Management IP address"; + type inet:ip-address; + } - uses manotypes:vm-flavor; - uses manotypes:guest-epa; - uses manotypes:vswitch-epa; - uses manotypes:hypervisor-epa; - uses manotypes:host-epa; + leaf vm-management-ip { + description "VM Private Management IP address"; + type inet:ip-address; + } + + leaf console-url { + description "Console URL for this VDU, if available"; + type inet:uri; + } - uses manotypes:supplemental-boot-data; + uses manotypes:vm-flavor; + uses manotypes:guest-epa; + uses manotypes:vswitch-epa; + uses manotypes:hypervisor-epa; + uses manotypes:host-epa; + + uses manotypes:supplemental-boot-data; container vdu-configuration { uses manotypes:vca-configuration; } - list volumes { - key "name"; - - leaf name { - description "Name of the disk-volumes, e.g. vda, vdb etc"; - type string; - } - - leaf volume-id { - description "VIM assigned volume id"; - type string; - } + list volumes { + key "name"; - uses manotypes:volume-info; - } + leaf name { + description "Name of the disk-volumes, e.g. vda, vdb etc"; + type string; + } - list alarms { - description - "A list of the alarms that have been created for this VDU"; + leaf volume-id { + description "VIM assigned volume id"; + type string; + } - key "alarm-id"; - uses manotypes:alarm; - } + uses manotypes:volume-info; + } - list internal-connection-point { - key "id"; - description + list internal-connection-point { + key "id"; + description "List for internal connection points. Each VNFC has zero or more internal connection points. Internal connection points are used for connecting @@ -391,64 +443,76 @@ module vnfr has only one VNFC, it may not have any internal connection points."; - uses vnfd:common-connection-point; + uses vnfd-base:common-connection-point; - leaf ip-address { - description + leaf ip-address { + description "IP address assigned to the internal connection point"; - type inet:ip-address; - } - leaf mac-address { - description + type inet:ip-address; + } + leaf mac-address { + description "MAC address assigned to the internal connection point"; - // type inet:mac-address; - type string; + // type inet:mac-address; + type string; + } + + leaf connection-point-id { + type string; + } + + uses associated-virtual-cps; } - } - list internal-interface { + list interface { description - "List of internal interfaces for the VNF"; + "List of interfaces (internal and external) for the VNF"; key name; leaf name { description - "Name of internal interface. Note that this - name has only local significance to the VDU."; + "Name of the interface. Note that this + name has only local significance to the VDU."; type string; } - leaf vdur-internal-connection-point-ref { - type leafref { - path "../../internal-connection-point/id"; - } - } - uses virtual-interface; - } - - list external-interface { - description - "List of external interfaces for the VNF. - The external interfaces enable sending - traffic to and from VNF."; - key name; - - leaf name { + leaf position { description - "Name of the external interface. Note that - this name has only local significance."; - type string; + "Explicit Position of the interface within the list"; + type uint32; } - leaf vnfd-connection-point-ref { + leaf type { description - "Name of the external connection point."; - type leafref { - path "../../../connection-point/name"; + "Type of the Interface"; + + type vnfd-base:interface-type; + + 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"; + } + } } } uses virtual-interface; } + leaf operational-status { description "The operational status of the VDU @@ -462,112 +526,82 @@ module vnfr failed : The VDU instantiation failed. "; + type enumeration { + rwpb:enum-type "VduOperationalStatus"; + enum init; + enum vm-init-phase; + enum vm-alloc-pending; + enum running; + enum terminate; + enum vl-terminate-phase; + enum terminated; + enum failed; + } + } + + uses placement-group-info; + } + + uses manotypes:monitoring-param; + + leaf operational-status { + description + "The operational status of the VNFR instance + pre-init : The VNF before Input Param Substitution. + init : The VNF has just started. + vl-init-phase : The internal VLs in the VNF are being instantiated. + vm-init-phase : The VMs for VDUs in the VNF are being instantiated. + running : The VNF is in running state. + terminate : The VNF is being terminated. + vm-terminate-phase : The VMs in the VNF are being terminated. + vl-terminate-phase : The internal VLs in the VNF are being terminated. + terminated : The VNF is in the terminated state. + failed : The VNF instantiation failed + "; + type enumeration { - rwpb:enum-type "VduOperationalStatus"; + rwpb:enum-type "VnfrOperationalStatus"; + enum pre-init; enum init; + enum vl-init-phase; enum vm-init-phase; - enum vm-alloc-pending; enum running; enum terminate; + enum vm-terminate-phase; enum vl-terminate-phase; enum terminated; enum failed; } } - uses placement-group-info; - } - - uses manotypes:monitoring-param; - leaf operational-status { - description - "The operational status of the VNFR instance - init : The VNF has just started. - vl-init-phase : The internal VLs in the VNF are being instantiated. - vm-init-phase : The VMs for VDUs in the VNF are being instantiated. - running : The VNF is in running state. - terminate : The VNF is being terminated. - vm-terminate-phase : The VMs in the VNF are being terminated. - vl-terminate-phase : The internal VLs in the VNF are being terminated. - terminated : The VNF is in the terminated state. - failed : The VNF instantiation failed - "; - - type enumeration { - rwpb:enum-type "VnfrOperationalStatus"; - enum init; - enum vl-init-phase; - enum vm-init-phase; - enum running; - enum terminate; - enum vm-terminate-phase; - enum vl-terminate-phase; - enum terminated; - enum failed; - } - } - leaf config-status { - description - "The configuration status of the NS instance + leaf config-status { + description + "The configuration status of the NS instance configuring: At least one of the VNFs in this instance is in configuring state configured: All the VNFs in this NS instance are configured or config-not-needed state "; - type enumeration { - enum configuring { - value 1; - } - enum configured { - value 2; - } - enum failed { - value 3; - } - enum config-not-needed { - value 4; + type enumeration { + enum configuring { + value 1; + } + enum configured { + value 2; + } + enum failed { + value 3; + } + enum config-not-needed { + value 4; + } } } - } - uses placement-group-info; - } - } - - rpc create-alarm { - description "Create an alert for a running VDU"; - input { - leaf cloud-account { - mandatory true; - type string; - } - - 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 { - leaf cloud-account { - mandatory true; - type string; - } + uses placement-group-info; - leaf alarm-id { - mandatory true; - type string; + container cloud-config { + rwpb:msg-new VnfrCloudConfig; + uses manotypes:cloud-config; + } } } }