Add Day-0 configuration by using cloud-init 53/8453/5
authorTomás Villaseca <tvillaseca@whitestack.com>
Thu, 26 Dec 2019 16:24:52 +0000 (13:24 -0300)
committerTomás Villaseca <tvillaseca@whitestack.com>
Mon, 20 Jan 2020 15:14:26 +0000 (12:14 -0300)
Change-Id: I7314e411f0d566e539d80cd9894a7ef2dda087d2
Signed-off-by: Tomás Villaseca <tvillaseca@whitestack.com>
augments/cloud-init.yang [new file with mode: 0644]

diff --git a/augments/cloud-init.yang b/augments/cloud-init.yang
new file mode 100644 (file)
index 0000000..bec9ac0
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+  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 cloud-init {
+    yang-version 1.1;
+    namespace "urn:etsi:osm:yang:nsd:augments:cloud-init";
+    prefix "cloud-init";
+
+    import etsi-nfv-vnfd {
+        prefix vnfd;
+    }
+
+    grouping extended-cloud-init {
+        choice cloud-init-input {
+            description
+                "Indicates how the contents of cloud-init script are provided.
+                There are 2 choices - inline or in a file";
+
+            case inline {
+                leaf cloud-init {
+                description
+                    "Contents of cloud-init script, provided inline, in cloud-config format";
+                type string;
+                }
+            }
+
+            case filename {
+                leaf cloud-init-file {
+                description
+                    "Name of file with contents of cloud-init script in cloud-config format";
+                    type string;
+                }
+            }
+        }
+    }
+        
+    augment "/vnfd:vnfd/vnfd:vdu" {
+        uses extended-cloud-init;
+    }
+}
\ No newline at end of file