Add final augments for VNFD
[osm/IM.git] / augments / various.yang
1 /*
2   Copyright 2020 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
18 module various {
19     yang-version 1.1;
20     namespace "urn:etsi:osm:yang:augments:various";
21     prefix "various";
22
23     import etsi-nfv-vnfd {
24         prefix vnfd;
25     }
26
27     import common-augments {
28         prefix common;
29     }
30
31     grouping extended-vld {
32         container provider-network {
33             description
34               "Container for the provider network.";
35             leaf physical-network {
36                 description
37                   "Name of the physical network on which the provider
38                    network is built.";
39                 type string;
40             }
41
42             leaf segmentation_id {
43                 description
44                   "ID of segregated virtual networks";
45                 type uint32;
46             }
47         }
48     }
49
50     grouping extended-security-group {
51         leaf security-group {
52             description
53               "Name of the security group";
54             type string;
55         }
56     }
57
58     grouping extended-cpd {
59         leaf port-security-enabled {
60             description
61               "Enables the port security for the port.";
62             type boolean;
63             default true;
64         }
65     }
66
67     grouping extended-vdu {
68         leaf pdu-type {
69             description
70               "Type of PDU. If this field exists, the deployment unit must be
71                understood as a PDU, not as a VDU. This field is used to identify
72                the category of PDU instances to be used at instantiation time. For
73                the instantiation to be successful, there must be available
74                PDU instances of this type in the selected datacenter.";
75             type string;
76         }
77
78         container supplemental-boot-data {
79             leaf boot-data-drive {
80                 description
81                   "Some VIMs implement additional drives to host config-files or meta-data";
82                 type boolean;
83                 default false;
84             }
85         }
86     }
87
88     grouping extended-device-bus {
89         leaf device-bus {
90             description
91               "Type of disk-bus on which this disk is exposed to guest";
92             type enumeration {
93                 enum ide;
94                 enum usb;
95                 enum virtio;
96                 enum scsi;
97             }
98         }
99     }
100
101     augment "/vnfd:vnfd/vnfd:int-virtual-link-desc" {
102         uses extended-vld;
103     }
104
105     augment "/vnfd:vnfd/vnfd:df/vnfd:virtual-link-profile/vnfd:virtual-link-protocol-data/vnfd:l3-protocol-data" {
106         uses extended-security-group;
107     }
108
109     augment "/vnfd:vnfd/vnfd:ext-cpd" {
110         uses extended-cpd;
111     }
112
113     augment "/vnfd:vnfd/vnfd:vdu/vnfd:int-cpd" {
114         uses extended-cpd;
115     }
116
117     augment "/vnfd:vnfd/vnfd:vdu" {
118         uses extended-vdu;
119     }
120
121     augment "/vnfd:vnfd/vnfd:virtual-storage-desc" {
122         uses extended-device-bus;
123     }
124 }