blob: 0cad70154b894f93230d441ba95b0ea03821047e [file] [log] [blame]
Tomás Villaseca758b63c2020-02-13 17:41:10 -03001/*
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
18module kdu {
19 yang-version 1.1;
20 namespace "urn:etsi:osm:yang:augments:kdu";
21 prefix "kdu";
22
23 import etsi-nfv-vnfd {
24 prefix vnfd;
25 }
26
27 import common-augments {
28 prefix common;
29 }
30
31 grouping extended-ext-cpd {
32 leaf k8s-cluster-net {
33 description
34 "Reference to the K8s cluster network
35 to which CPs instantiated from this external CP
36 Descriptor (CPD) connect.";
37 type leafref {
38 path "/vnfd:vnfd/kdu:k8s-cluster/kdu:nets/kdu:id";
39 }
40 }
41 }
42
43 grouping extended-kdu-configuration {
44 list kdu-configuration {
45 key "id";
46 leaf id {
47 description
48 "Internal identifier for the KDU configuration";
49 type string;
50 }
51 uses common:vnfc-configuration;
52 uses common:vdu-config-access;
53
54 leaf-list blacklist-config-primitive {
55 description
56 "List of blacklisted config primitives from the list of
57 default kdu config primitives";
58
59 type enumeration {
60 enum upgrade;
61 enum rollback;
62 }
63 }
64 }
65 }
66
Tomás Villaseca4efd2a52020-05-15 01:56:44 -040067 grouping extended-kdu-model {
68 list kdu-model {
69 key "id";
70
71 leaf id {
72 description
73 "Internal identifier for the KDU model";
74 type string;
75 }
76
77 leaf kdu-model-type {
78 description
79 "Indicates the KDU model, either as a helm-chart or as a juju-bundle.";
80
81 type enumeration {
82 enum helm-chart;
83 enum juju-bundle;
84 }
85 }
86
87 leaf kdu-model-locator {
88 description
89 "Indicates the KDU model location, either as a path to a folder in the
90 package or as a URL where to fetch the model.";
91
92 type string;
93 }
94 }
95 }
96
Tomás Villaseca758b63c2020-02-13 17:41:10 -030097 grouping extended-kdu {
98 list kdu {
99 description
100 "List of K8s Deployment Units";
101 key "name";
102
103 leaf name {
104 description
105 "Unique name for the KDU";
106 type string;
107 }
108
109 leaf description {
110 description
111 "Description of the KDU.";
112 type string;
113 }
Tomás Villaseca758b63c2020-02-13 17:41:10 -0300114 }
115
116 container k8s-cluster {
117 leaf-list version {
118 description
119 "List of supported K8s versions.
120 The cluster where the KDUs will be deployed will have to match
121 one of these versions.";
122
123 type string;
124 }
125
126 leaf-list cni {
127 description
128 "List of supported CNI plugins.
129 The cluster where the KDUs will be deployed will have to use
130 one of these CNI plugins.";
131
132 type enumeration {
133 enum calico;
134 enum flannel;
135 enum multus;
136 }
137 }
138
139 list nets {
140 description
141 "List of required networks in the K8s cluster.
142 The cluster where the KDUs will be deployed will have to use
143 one of these CNI plugins.";
144
145 key "id";
146
147 leaf id {
148 description
149 "Internal identifier for the K8s cluster network in this VNF";
150 type string;
151 }
152 }
153 }
154 }
155
156 augment "/vnfd:vnfd" {
157 uses extended-kdu;
158 uses extended-kdu-configuration;
Tomás Villaseca4efd2a52020-05-15 01:56:44 -0400159 uses extended-kdu-model;
Tomás Villaseca758b63c2020-02-13 17:41:10 -0300160 }
161
162 augment "/vnfd:vnfd/vnfd:ext-cpd/vnfd:cp-connection" {
163 uses extended-ext-cpd;
164 }
165}