feat(configurations): now VNF/VDU/KDU configurations are in the same place, compatibl...
[osm/IM.git] / models / augments / ip-profiles.yang
1 /*
2   Copyright 2019 Whitestack LLC
3
4   Licensed under the Apache License, Version 2.0 (the "License");
5   you may not use this file except in compliance with the License.
6   You may obtain a copy of the License at
7
8     http://www.apache.org/licenses/LICENSE-2.0
9
10   Unless required by applicable law or agreed to in writing, software
11   distributed under the License is distributed on an "AS IS" BASIS,
12   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13   implied.
14   See the License for the specific language governing permissions and
15   limitations under the License.
16 */
17 module ip-profiles {
18     yang-version 1.1;
19     namespace "urn:etsi:osm:yang:augments:ip-profiles";
20     prefix "ip-profiles";
21
22     import etsi-nfv-nsd {
23         prefix nsd;
24     }
25
26     import ietf-inet-types {
27         prefix inet;
28     }
29
30     import etsi-nfv-descriptors {
31         prefix nfv;
32     }
33
34     grouping extended-vld-protocol-data{
35         container virtual-link-protocol-data {
36           leaf associated-layer-protocol {
37             type identityref {
38               base nfv:layer-protocol;
39             }
40             description
41               "One of the values of the attribute layerProtocol of
42                the ConnectivityType IE.";
43             reference
44               "GS NFV IFA011: Section 7.1.8.13,
45                VirtualLinkProtocolData information element.";
46           }
47
48           container l2-protocol-data {
49             when "(../associated-layer-protocol = 'Ethernet') or " +
50                  "(../associated-layer-protocol = 'MPLS') or " +
51                  "(../associated-layer-protocol = 'ODU2') or " +
52                  "(../associated-layer-protocol = 'Pseudo-Wire')";
53
54             leaf name {
55               type string;
56               description
57                 "Network name associated with this L2 protocol.";
58               reference
59                 "GS NFV IFA011: Section 7.1.8.14,
60                  L2ProtocolData information element.";
61             }
62
63             leaf network-type {
64               type enumeration {
65                 enum flat;
66                 enum vlan;
67                 enum vxlan;
68                 enum gre;
69               }
70               description
71                 "Specifies the network type for this L2 protocol.
72                  Possible values: FLAT, VLAN, VXLAN, GRE.";
73               reference
74                 "GS NFV IFA011: Section 7.1.8.14,
75                  L2ProtocolData information element.";
76             }
77
78             leaf vlan-transparent {
79               type boolean;
80               description
81                 "Specifies whether to support VLAN transparency for
82                  this L2 protocol or not.";
83               reference
84                 "GS NFV IFA011: Section 7.1.8.14,
85                  L2ProtocolData information element.";
86             }
87
88             leaf mtu {
89               type uint16;
90               description
91                 "Specifies the maximum transmission unit (MTU) value
92                  for this L2 protocol.";
93               reference
94                 "GS NFV IFA011: Section 7.1.8.14,
95                  L2ProtocolData information element.";
96             }
97             description
98               "Specifies the L2 protocol data for this virtual link.
99                Shall be present when the associatedLayerProtocol
100                attribute indicates a L2 protocol and shall be absent
101                otherwise.";
102             reference
103               "GS NFV IFA011: Section 7.1.8.13,
104                VirtualLinkProtocolData information element.";
105           }
106
107           container l3-protocol-data {
108             when "(../associated-layer-protocol = 'IPv4') or " +
109                  "(../associated-layer-protocol = 'IPv6')";
110
111             leaf name {
112               type string;
113               description
114                 "Network name associated with this L3 protocol.";
115               reference
116                 "GS NFV IFA011: Section 7.1.8.15,
117                  L3ProtocolData information element.";
118             }
119
120             leaf ip-version {
121               type enumeration {
122                 enum ipv4;
123                 enum ipv6;
124               }
125               default "ipv4";
126               description
127                 "Specifies IP version of this L3 protocol.
128                  Value:
129                  • IPV4.
130                  • IPV6.";
131               reference
132                 "GS NFV IFA011: Section 7.1.8.15,
133                  L3ProtocolData information element.";
134             }
135
136             leaf cidr {
137               type string;
138               description
139                 "Specifies the CIDR (Classless InterDomain Routing)
140                  of this L3 protocol.";
141               reference
142                 "GS NFV IFA011: Section 7.1.8.15,
143                  L3ProtocolData information element.";
144             }
145
146             leaf-list ip-allocation-pools {
147               type string;
148               description
149                 "Specifies the allocation pools with start and end
150                  IP addresses for this L3 protocol.";
151               reference
152                 "GS NFV IFA011: Section 7.1.8.15,
153                  L3ProtocolData information element.";
154             }
155
156             leaf gateway-ip {
157               type inet:ip-address;
158               description
159                 "Specifies the gateway IP address for this L3
160                  protocol.";
161               reference
162                 "GS NFV IFA011: Section 7.1.8.15,
163                  L3ProtocolData information element.";
164             }
165
166             leaf dhcp-enabled {
167               type boolean;
168               default "true";
169               description
170                 "Indicates whether DHCP (Dynamic Host Configuration
171                  Protocol) is enabled or disabled for this L3
172                  protocol.";
173               reference
174                 "GS NFV IFA011: Section 7.1.8.15,
175                  L3ProtocolData information element.";
176             }
177
178             leaf ipv6-address-mode {
179               when "../ip-version = 'ipv6'";
180               type enumeration {
181                 enum slaac;
182                 enum dhcpv6-stateful;
183                 enum dhcpv6-stateless;
184               }
185               description
186                 "Specifies IPv6 address mode. Possible values:
187                  • SLAAC.
188                  • DHCPV6-STATEFUL.
189                  • DHCPV6-STATELESS.
190                  May be present when the value of the ipVersion
191                  attribute is 'IPV6' and shall be absent otherwise.";
192               reference
193                 "GS NFV IFA011: Section 7.1.8.15,
194                  L3ProtocolData information element.";
195             }
196             description
197               "Specifies the L3 protocol data for this virtual link.
198                Shall be present when the associatedLayerProtocol
199                attribute indicates a L3 protocol and shall be absent
200                otherwise.";
201             reference
202               "GS NFV IFA011: Section 7.1.8.13,
203                VirtualLinkProtocolData information element.";
204           }
205           description
206             "Specifies the protocol data for a VL instantiated
207              according to this profile. Cardinality 0 is used when
208              no protocol data needs to be specified.";
209           reference
210             "GS NFV IFA011: Section 7.1.8.4, VirtualLinkProfile
211              information element.";
212         }
213     }
214         
215     augment "/nsd:nsd/nsd:nsd/nsd:df/nsd:virtual-link-profile" {
216         uses extended-vld-protocol-data;
217     }
218 }