From: Tomás Villaseca Date: Wed, 19 Feb 2020 18:38:39 +0000 (-0300) Subject: Add interfaces augment X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F21%2F8621%2F16;p=osm%2FIM.git Add interfaces augment Change-Id: Ia1a6f83cd84fb8b52645de184133981d196cd9f1 Signed-off-by: Tomás Villaseca --- diff --git a/augments/common-augments.yang b/augments/common-augments.yang index 50a16d0..bcb7d47 100644 --- a/augments/common-augments.yang +++ b/augments/common-augments.yang @@ -458,4 +458,52 @@ module common-augments { type uint32; } } -} + + 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. + PARAVIRT : Use the default paravirtualized interface for the VIM (virtio, vmxnet3, etc.). + VIRTIO : Deprecated! 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 : Deprecated! Use PARAVIRT instead and set the VNF management interface at vnfd:mgmt-interface:cp"; + + type enumeration { + enum PARAVIRT; + enum OM-MGMT; + enum PCI-PASSTHROUGH; + enum SR-IOV; + enum VIRTIO; + enum E1000; + enum RTL8139; + enum PCNET; + } + default "PARAVIRT"; + } + + 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; + } + } + } +} \ No newline at end of file diff --git a/augments/interface.yang b/augments/interface.yang new file mode 100644 index 0000000..a33eed1 --- /dev/null +++ b/augments/interface.yang @@ -0,0 +1,58 @@ +/* + 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 interface { + yang-version 1.1; + namespace "urn:etsi:osm:yang:augments:interface"; + prefix "interface"; + + import etsi-nfv-vnfd { + prefix vnfd; + } + + import common-augments { + prefix common; + } + + grouping extended-interface { + description + "List of Interfaces (external and internal) for the VNF"; + + leaf position { + description + "Explicit Position of the interface within the list"; + type uint32; + } + + leaf mac-address { + description + "MAC address of the interface. + Some VNFs require a specific MAC address to be configured + in the interface. While this is not recommended at all in + NFV environments, this parameter exists to allow those + scenarios. + This parameter will be likely deprecated in the future."; + type string; + } + + uses common:virtual-interface; + } + + augment "/vnfd:vnfd/vnfd:vdu/vnfd:int-cpd/vnfd:virtual-network-interface-requirement" { + uses extended-interface; + } +} \ No newline at end of file