From f3b777470d46ef54e146b9cf74a513abc93e897d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tom=C3=A1s=20Villaseca?= Date: Sat, 22 Feb 2020 15:08:21 -0300 Subject: [PATCH] Add final augments for VNFD MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: Ia7155d890bcd58db61c7f121e163d85ec52c7939 Signed-off-by: Tomás Villaseca --- augments/day1-2.yang | 18 +++++- augments/various.yang | 124 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 139 insertions(+), 3 deletions(-) create mode 100644 augments/various.yang diff --git a/augments/day1-2.yang b/augments/day1-2.yang index 78029e1..ccdc49a 100644 --- a/augments/day1-2.yang +++ b/augments/day1-2.yang @@ -29,7 +29,13 @@ module day1-2 { } grouping extended-vnf-configuration { - container vnf-configuration { + list vnf-configuration { + key "id"; + leaf id { + description + "Internal identifier for the VNF configuration"; + type string; + } uses common:vnfc-configuration; uses common:vnfc-relations; uses common:vdu-config-access; @@ -37,7 +43,13 @@ module day1-2 { } grouping extended-vdu-configuration { - container vdu-configuration { + list vdu-configuration { + key "id"; + leaf id { + description + "Internal identifier for the VDU configuration"; + type string; + } uses common:vnfc-configuration; uses common:vdu-config-access; } @@ -47,7 +59,7 @@ module day1-2 { uses extended-vnf-configuration; } - augment "/vnfd:vnfd/vnfd:vdu" { + augment "/vnfd:vnfd" { uses extended-vdu-configuration; } } \ No newline at end of file diff --git a/augments/various.yang b/augments/various.yang new file mode 100644 index 0000000..e1981a0 --- /dev/null +++ b/augments/various.yang @@ -0,0 +1,124 @@ +/* + Copyright 2020 Whitestack LLC + + 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 various { + yang-version 1.1; + namespace "urn:etsi:osm:yang:augments:various"; + prefix "various"; + + import etsi-nfv-vnfd { + prefix vnfd; + } + + import common-augments { + prefix common; + } + + grouping extended-vld { + container provider-network { + description + "Container for the provider network."; + leaf physical-network { + description + "Name of the physical network on which the provider + network is built."; + type string; + } + + leaf segmentation_id { + description + "ID of segregated virtual networks"; + type uint32; + } + } + } + + grouping extended-security-group { + leaf security-group { + description + "Name of the security group"; + type string; + } + } + + grouping extended-cpd { + leaf port-security-enabled { + description + "Enables the port security for the port."; + type boolean; + default true; + } + } + + grouping extended-vdu { + leaf pdu-type { + description + "Type of PDU. If this field exists, the deployment unit must be + understood as a PDU, not as a VDU. This field is used to identify + the category of PDU instances to be used at instantiation time. For + the instantiation to be successful, there must be available + PDU instances of this type in the selected datacenter."; + type string; + } + + container supplemental-boot-data { + leaf boot-data-drive { + description + "Some VIMs implement additional drives to host config-files or meta-data"; + type boolean; + default false; + } + } + } + + grouping extended-device-bus { + leaf device-bus { + description + "Type of disk-bus on which this disk is exposed to guest"; + type enumeration { + enum ide; + enum usb; + enum virtio; + enum scsi; + } + } + } + + augment "/vnfd:vnfd/vnfd:int-virtual-link-desc" { + uses extended-vld; + } + + augment "/vnfd:vnfd/vnfd:df/vnfd:virtual-link-profile/vnfd:virtual-link-protocol-data/vnfd:l3-protocol-data" { + uses extended-security-group; + } + + augment "/vnfd:vnfd/vnfd:ext-cpd" { + uses extended-cpd; + } + + augment "/vnfd:vnfd/vnfd:vdu/vnfd:int-cpd" { + uses extended-cpd; + } + + augment "/vnfd:vnfd/vnfd:vdu" { + uses extended-vdu; + } + + augment "/vnfd:vnfd/vnfd:virtual-storage-desc" { + uses extended-device-bus; + } +} \ No newline at end of file -- 2.17.1