From ead9b8e0f14f54c15eeab577c1785bc40edd9852 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tom=C3=A1s=20Villaseca?= Date: Mon, 23 Dec 2019 18:34:37 -0300 Subject: [PATCH] Add IP Profiles augment at NS level MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: Ib95ae3a6b77e6cb1f6b686f66e20ec9ce07fc3d9 Signed-off-by: Tomás Villaseca --- augments/ip-profiles.yang | 218 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 augments/ip-profiles.yang diff --git a/augments/ip-profiles.yang b/augments/ip-profiles.yang new file mode 100644 index 0000000..661bb3e --- /dev/null +++ b/augments/ip-profiles.yang @@ -0,0 +1,218 @@ +/* + Copyright 2019 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 ip-profiles { + yang-version 1.1; + namespace "urn:etsi:osm:yang:nsd:augments:ip-profiles"; + prefix "ip-profiles"; + + import etsi-nfv-nsd { + prefix nsd; + } + + import ietf-inet-types { + prefix inet; + } + + import etsi-nfv-descriptors { + prefix nfv; + } + + grouping extended-vld-protocol-data{ + container virtual-link-protocol-data { + leaf associated-layer-protocol { + type identityref { + base nfv:layer-protocol; + } + description + "One of the values of the attribute layerProtocol of + the ConnectivityType IE."; + reference + "GS NFV IFA011: Section 7.1.8.13, + VirtualLinkProtocolData information element."; + } + + container l2-protocol-data { + when "(../associated-layer-protocol = 'Ethernet') or " + + "(../associated-layer-protocol = 'MPLS') or " + + "(../associated-layer-protocol = 'ODU2') or " + + "(../associated-layer-protocol = 'Pseudo-Wire')"; + + leaf name { + type string; + description + "Network name associated with this L2 protocol."; + reference + "GS NFV IFA011: Section 7.1.8.14, + L2ProtocolData information element."; + } + + leaf network-type { + type enumeration { + enum flat; + enum vlan; + enum vxlan; + enum gre; + } + description + "Specifies the network type for this L2 protocol. + Possible values: FLAT, VLAN, VXLAN, GRE."; + reference + "GS NFV IFA011: Section 7.1.8.14, + L2ProtocolData information element."; + } + + leaf vlan-transparent { + type boolean; + description + "Specifies whether to support VLAN transparency for + this L2 protocol or not."; + reference + "GS NFV IFA011: Section 7.1.8.14, + L2ProtocolData information element."; + } + + leaf mtu { + type uint16; + description + "Specifies the maximum transmission unit (MTU) value + for this L2 protocol."; + reference + "GS NFV IFA011: Section 7.1.8.14, + L2ProtocolData information element."; + } + description + "Specifies the L2 protocol data for this virtual link. + Shall be present when the associatedLayerProtocol + attribute indicates a L2 protocol and shall be absent + otherwise."; + reference + "GS NFV IFA011: Section 7.1.8.13, + VirtualLinkProtocolData information element."; + } + + container l3-protocol-data { + when "(../associated-layer-protocol = 'IPv4') or " + + "(../associated-layer-protocol = 'IPv6')"; + + leaf name { + type string; + description + "Network name associated with this L3 protocol."; + reference + "GS NFV IFA011: Section 7.1.8.15, + L3ProtocolData information element."; + } + + leaf ip-version { + type enumeration { + enum ipv4; + enum ipv6; + } + default "ipv4"; + description + "Specifies IP version of this L3 protocol. + Value: + • IPV4. + • IPV6."; + reference + "GS NFV IFA011: Section 7.1.8.15, + L3ProtocolData information element."; + } + + leaf cidr { + type string; + description + "Specifies the CIDR (Classless InterDomain Routing) + of this L3 protocol."; + reference + "GS NFV IFA011: Section 7.1.8.15, + L3ProtocolData information element."; + } + + leaf-list ip-allocation-pools { + type string; + description + "Specifies the allocation pools with start and end + IP addresses for this L3 protocol."; + reference + "GS NFV IFA011: Section 7.1.8.15, + L3ProtocolData information element."; + } + + leaf gateway-ip { + type inet:ip-address; + description + "Specifies the gateway IP address for this L3 + protocol."; + reference + "GS NFV IFA011: Section 7.1.8.15, + L3ProtocolData information element."; + } + + leaf dhcp-enabled { + type boolean; + default "true"; + description + "Indicates whether DHCP (Dynamic Host Configuration + Protocol) is enabled or disabled for this L3 + protocol."; + reference + "GS NFV IFA011: Section 7.1.8.15, + L3ProtocolData information element."; + } + + leaf ipv6-address-mode { + when "../ip-version = 'ipv6'"; + type enumeration { + enum slaac; + enum dhcpv6-stateful; + enum dhcpv6-stateless; + } + description + "Specifies IPv6 address mode. Possible values: + • SLAAC. + • DHCPV6-STATEFUL. + • DHCPV6-STATELESS. + May be present when the value of the ipVersion + attribute is 'IPV6' and shall be absent otherwise."; + reference + "GS NFV IFA011: Section 7.1.8.15, + L3ProtocolData information element."; + } + description + "Specifies the L3 protocol data for this virtual link. + Shall be present when the associatedLayerProtocol + attribute indicates a L3 protocol and shall be absent + otherwise."; + reference + "GS NFV IFA011: Section 7.1.8.13, + VirtualLinkProtocolData information element."; + } + description + "Specifies the protocol data for a VL instantiated + according to this profile. Cardinality 0 is used when + no protocol data needs to be specified."; + reference + "GS NFV IFA011: Section 7.1.8.4, VirtualLinkProfile + information element."; + } + } + + augment "/nsd:nsd/nsd:nsd/nsd:df/nsd:virtual-link-profile" { + uses extended-vld-protocol-data; + } +} \ No newline at end of file -- 2.25.1