diff --git a/.gitmodules b/.gitmodules index 95b1569af06b8b02b6acbb41cde02f44e935e78d..228d7ccb55a376b1d573d2b4611f0190130d3cb2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -37,3 +37,9 @@ [submodule "charm-packages/vnf_relations_vnf/charms/simple_provides/mod/operator"] path = charm-packages/vnf_relations_vnf/charms/simple_provides/mod/operator url = https://github.com/canonical/operator +[submodule "charm-packages/ns_relations_requires_vnf/charms/simple_requires/mod/operator"] + path = charm-packages/ns_relations_requires_vnf/charms/simple_requires/mod/operator + url = https://github.com/canonical/operator +[submodule "charm-packages/ns_relations_provides_vnf/charms/simple_provides/mod/operator"] + path = charm-packages/ns_relations_provides_vnf/charms/simple_provides/mod/operator + url = https://github.com/canonical/operator diff --git a/charm-packages/ns_relations_ns/icons/osm.png b/charm-packages/ns_relations_ns/icons/osm.png new file mode 100644 index 0000000000000000000000000000000000000000..62012d2a2b491bdcd536d62c3c3c863c0d8c1b33 Binary files /dev/null and b/charm-packages/ns_relations_ns/icons/osm.png differ diff --git a/charm-packages/ns_relations_ns/ns_relations_nsd.yaml b/charm-packages/ns_relations_ns/ns_relations_nsd.yaml new file mode 100755 index 0000000000000000000000000000000000000000..da9ca734e77b2fb89dcc74ff9c5b66003c04222a --- /dev/null +++ b/charm-packages/ns_relations_ns/ns_relations_nsd.yaml @@ -0,0 +1,36 @@ +nsd:nsd-catalog: + nsd: + - id: ns_relations-ns + name: ns_relations-ns + short-name: ns_relations-ns + description: NS with 2 VNFs with cloudinit connected by datanet and mgmtnet VLs + version: '1.0' + logo: osm.png + constituent-vnfd: + - vnfd-id-ref: ns_relations_provides-vnf + member-vnf-index: '1' + - vnfd-id-ref: ns_relations_requires-vnf + member-vnf-index: '2' + vld: + - id: mgmtnet + name: mgmtnet + short-name: mgmtnet + type: ELAN + mgmt-network: 'true' + vim-network-name: osm-ext + vnfd-connection-point-ref: + - vnfd-id-ref: ns_relations_provides-vnf + member-vnf-index-ref: '1' + vnfd-connection-point-ref: provides-mgmt + - vnfd-id-ref: ns_relations_requires-vnf + member-vnf-index-ref: '2' + vnfd-connection-point-ref: requires-mgmt + + ns-configuration: + relation: + - name: relation + entities: + - id: simple_provides + endpoint: interface + - id: simple_requires + endpoint: interface \ No newline at end of file diff --git a/charm-packages/ns_relations_provides_vnf/charms/simple_provides/actions.yaml b/charm-packages/ns_relations_provides_vnf/charms/simple_provides/actions.yaml new file mode 100644 index 0000000000000000000000000000000000000000..53a706b4eba7347764c4711b7077146e72241de4 --- /dev/null +++ b/charm-packages/ns_relations_provides_vnf/charms/simple_provides/actions.yaml @@ -0,0 +1,25 @@ +## +# Copyright 2020 Canonical Ltd. +# All rights reserved. +# +# 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. +## +touch: + description: "Touch a file on the VNF." + params: + filename: + description: "The name of the file to touch." + type: string + default: "" + required: + - filename diff --git a/charm-packages/ns_relations_provides_vnf/charms/simple_provides/config.yaml b/charm-packages/ns_relations_provides_vnf/charms/simple_provides/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2be62318c6ce27156e4af585494b36d0c2b802f8 --- /dev/null +++ b/charm-packages/ns_relations_provides_vnf/charms/simple_provides/config.yaml @@ -0,0 +1,17 @@ +## +# Copyright 2020 Canonical Ltd. +# All rights reserved. +# +# 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. +## +options: {} \ No newline at end of file diff --git a/charm-packages/ns_relations_provides_vnf/charms/simple_provides/hooks/install b/charm-packages/ns_relations_provides_vnf/charms/simple_provides/hooks/install new file mode 120000 index 0000000000000000000000000000000000000000..25b1f68fa39d58d33c08ca420c3d439d19be0c55 --- /dev/null +++ b/charm-packages/ns_relations_provides_vnf/charms/simple_provides/hooks/install @@ -0,0 +1 @@ +../src/charm.py \ No newline at end of file diff --git a/charm-packages/ns_relations_provides_vnf/charms/simple_provides/hooks/start b/charm-packages/ns_relations_provides_vnf/charms/simple_provides/hooks/start new file mode 120000 index 0000000000000000000000000000000000000000..25b1f68fa39d58d33c08ca420c3d439d19be0c55 --- /dev/null +++ b/charm-packages/ns_relations_provides_vnf/charms/simple_provides/hooks/start @@ -0,0 +1 @@ +../src/charm.py \ No newline at end of file diff --git a/charm-packages/ns_relations_provides_vnf/charms/simple_provides/hooks/upgrade-charm b/charm-packages/ns_relations_provides_vnf/charms/simple_provides/hooks/upgrade-charm new file mode 120000 index 0000000000000000000000000000000000000000..25b1f68fa39d58d33c08ca420c3d439d19be0c55 --- /dev/null +++ b/charm-packages/ns_relations_provides_vnf/charms/simple_provides/hooks/upgrade-charm @@ -0,0 +1 @@ +../src/charm.py \ No newline at end of file diff --git a/charm-packages/ns_relations_provides_vnf/charms/simple_provides/lib/ops b/charm-packages/ns_relations_provides_vnf/charms/simple_provides/lib/ops new file mode 120000 index 0000000000000000000000000000000000000000..d93419320c2e0d3133a0bc8059e2f259bf5bb213 --- /dev/null +++ b/charm-packages/ns_relations_provides_vnf/charms/simple_provides/lib/ops @@ -0,0 +1 @@ +../mod/operator/ops \ No newline at end of file diff --git a/charm-packages/ns_relations_provides_vnf/charms/simple_provides/metadata.yaml b/charm-packages/ns_relations_provides_vnf/charms/simple_provides/metadata.yaml new file mode 100644 index 0000000000000000000000000000000000000000..db97d146a1734356dc46ec8bd549b4d1154aa418 --- /dev/null +++ b/charm-packages/ns_relations_provides_vnf/charms/simple_provides/metadata.yaml @@ -0,0 +1,28 @@ +## +# Copyright 2020 Canonical Ltd. +# All rights reserved. +# +# 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. +## + +name: simple-native-provides +summary: A simple native charm +description: | + Simple native charm +series: + - bionic + - xenial + - focal +provides: + interface: + interface: interface \ No newline at end of file diff --git a/charm-packages/ns_relations_provides_vnf/charms/simple_provides/mod/operator b/charm-packages/ns_relations_provides_vnf/charms/simple_provides/mod/operator new file mode 160000 index 0000000000000000000000000000000000000000..a84ce8776b368a8b2bccdb173716e342db9a6b36 --- /dev/null +++ b/charm-packages/ns_relations_provides_vnf/charms/simple_provides/mod/operator @@ -0,0 +1 @@ +Subproject commit a84ce8776b368a8b2bccdb173716e342db9a6b36 diff --git a/charm-packages/ns_relations_provides_vnf/charms/simple_provides/src/charm.py b/charm-packages/ns_relations_provides_vnf/charms/simple_provides/src/charm.py new file mode 100755 index 0000000000000000000000000000000000000000..b15f847604d7ea6af2d4d1467cce6c7d1e64bf7e --- /dev/null +++ b/charm-packages/ns_relations_provides_vnf/charms/simple_provides/src/charm.py @@ -0,0 +1,75 @@ +#!/usr/bin/env python3 +## +# Copyright 2020 Canonical Ltd. +# All rights reserved. +# +# 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. +## + +import sys +import subprocess + +sys.path.append("lib") + +from ops.charm import CharmBase +from ops.main import main +from ops.model import ActiveStatus + +class MyNativeCharm(CharmBase): + + def __init__(self, framework, key): + super().__init__(framework, key) + + # Listen to charm events + self.framework.observe(self.on.config_changed, self.on_config_changed) + self.framework.observe(self.on.install, self.on_install) + self.framework.observe(self.on.start, self.on_start) + + # Listen to the touch action event + self.framework.observe(self.on.touch_action, self.on_touch_action) + + # Listen to relation changed + self.framework.observe( + self.on.interface_relation_changed, self.on_interface_relation_changed + ) + def on_config_changed(self, event): + """Handle changes in configuration""" + self.model.unit.status = ActiveStatus() + + def on_install(self, event): + """Called when the charm is being installed""" + self.model.unit.status = ActiveStatus() + + def on_start(self, event): + """Called when the charm is being started""" + self.model.unit.status = ActiveStatus() + + def on_touch_action(self, event): + """Touch a file.""" + filename = event.params["filename"] + try: + subprocess.run(["touch", filename], check=True) + event.set_results({"created": True, "filename": filename}) + except subprocess.CalledProcessError as e: + event.fail("Action failed: {}".format(e)) + self.model.unit.status = ActiveStatus() + + def on_interface_relation_changed(self, event): + parameter = "Hello" + event.relation.data[self.model.unit]["parameter"] = parameter + self.model.unit.status = ActiveStatus("Parameter sent: {}".format(parameter)) + + +if __name__ == "__main__": + main(MyNativeCharm) + diff --git a/charm-packages/ns_relations_provides_vnf/cloud_init/cloud-config.txt b/charm-packages/ns_relations_provides_vnf/cloud_init/cloud-config.txt new file mode 100755 index 0000000000000000000000000000000000000000..36c8d1bf2cdebbc4e50d1e8348003f64f419cd0b --- /dev/null +++ b/charm-packages/ns_relations_provides_vnf/cloud_init/cloud-config.txt @@ -0,0 +1,12 @@ +#cloud-config +password: osm4u +chpasswd: { expire: False } +ssh_pwauth: True + +write_files: +- content: | + # My new helloworld file + + owner: root:root + permissions: '0644' + path: /root/helloworld.txt diff --git a/charm-packages/ns_relations_provides_vnf/icons/osm.png b/charm-packages/ns_relations_provides_vnf/icons/osm.png new file mode 100644 index 0000000000000000000000000000000000000000..62012d2a2b491bdcd536d62c3c3c863c0d8c1b33 Binary files /dev/null and b/charm-packages/ns_relations_provides_vnf/icons/osm.png differ diff --git a/charm-packages/ns_relations_provides_vnf/ns_relations_provides_vnfd.yaml b/charm-packages/ns_relations_provides_vnf/ns_relations_provides_vnfd.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ff47fe87f66ed79141e623fff8d2f0d7b7a549dd --- /dev/null +++ b/charm-packages/ns_relations_provides_vnf/ns_relations_provides_vnfd.yaml @@ -0,0 +1,53 @@ +vnfd:vnfd-catalog: + vnfd: + - id: ns_relations_provides-vnf + name: ns_relations_provides-vnf + short-name: ns_relations_provides-vnf + version: 1.0 + description: A VNF consisting of 1 VDU connected to two external VL, and one for data and another one for management + logo: osm.png + connection-point: + - id: provides-mgmt + name: provides-mgmt + short-name: provides-mgmt + type: VPORT + mgmt-interface: + cp: provides-mgmt + vdu: + - id: simple_provides + name: simple_provides + image: ubuntu18.04 + count: 1 + vm-flavor: + vcpu-count: 1 + memory-mb: 1024 + storage-gb: 10 + interface: + - name: simple_provides-eth0 + position: 1 + type: EXTERNAL + virtual-interface: + type: PARAVIRT + external-connection-point-ref: provides-mgmt + cloud-init-file: cloud-config.txt + vnf-configuration: + juju: + charm: simple_provides + proxy: false + config-access: + ssh-access: + required: True + default-user: ubuntu + initial-config-primitive: + - seq: 1 + name: touch + parameter: + - name: filename + data-type: STRING + value: '/home/ubuntu/first-touch' + config-primitive: + - name: touch + parameter: + - name: filename + data-type: STRING + default-value: '/home/ubuntu/touched' diff --git a/charm-packages/ns_relations_requires_vnf/charms/simple_requires/actions.yaml b/charm-packages/ns_relations_requires_vnf/charms/simple_requires/actions.yaml new file mode 100644 index 0000000000000000000000000000000000000000..53a706b4eba7347764c4711b7077146e72241de4 --- /dev/null +++ b/charm-packages/ns_relations_requires_vnf/charms/simple_requires/actions.yaml @@ -0,0 +1,25 @@ +## +# Copyright 2020 Canonical Ltd. +# All rights reserved. +# +# 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. +## +touch: + description: "Touch a file on the VNF." + params: + filename: + description: "The name of the file to touch." + type: string + default: "" + required: + - filename diff --git a/charm-packages/ns_relations_requires_vnf/charms/simple_requires/config.yaml b/charm-packages/ns_relations_requires_vnf/charms/simple_requires/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2be62318c6ce27156e4af585494b36d0c2b802f8 --- /dev/null +++ b/charm-packages/ns_relations_requires_vnf/charms/simple_requires/config.yaml @@ -0,0 +1,17 @@ +## +# Copyright 2020 Canonical Ltd. +# All rights reserved. +# +# 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. +## +options: {} \ No newline at end of file diff --git a/charm-packages/ns_relations_requires_vnf/charms/simple_requires/hooks/install b/charm-packages/ns_relations_requires_vnf/charms/simple_requires/hooks/install new file mode 120000 index 0000000000000000000000000000000000000000..25b1f68fa39d58d33c08ca420c3d439d19be0c55 --- /dev/null +++ b/charm-packages/ns_relations_requires_vnf/charms/simple_requires/hooks/install @@ -0,0 +1 @@ +../src/charm.py \ No newline at end of file diff --git a/charm-packages/ns_relations_requires_vnf/charms/simple_requires/hooks/start b/charm-packages/ns_relations_requires_vnf/charms/simple_requires/hooks/start new file mode 120000 index 0000000000000000000000000000000000000000..25b1f68fa39d58d33c08ca420c3d439d19be0c55 --- /dev/null +++ b/charm-packages/ns_relations_requires_vnf/charms/simple_requires/hooks/start @@ -0,0 +1 @@ +../src/charm.py \ No newline at end of file diff --git a/charm-packages/ns_relations_requires_vnf/charms/simple_requires/hooks/upgrade-charm b/charm-packages/ns_relations_requires_vnf/charms/simple_requires/hooks/upgrade-charm new file mode 120000 index 0000000000000000000000000000000000000000..25b1f68fa39d58d33c08ca420c3d439d19be0c55 --- /dev/null +++ b/charm-packages/ns_relations_requires_vnf/charms/simple_requires/hooks/upgrade-charm @@ -0,0 +1 @@ +../src/charm.py \ No newline at end of file diff --git a/charm-packages/ns_relations_requires_vnf/charms/simple_requires/lib/ops b/charm-packages/ns_relations_requires_vnf/charms/simple_requires/lib/ops new file mode 120000 index 0000000000000000000000000000000000000000..d93419320c2e0d3133a0bc8059e2f259bf5bb213 --- /dev/null +++ b/charm-packages/ns_relations_requires_vnf/charms/simple_requires/lib/ops @@ -0,0 +1 @@ +../mod/operator/ops \ No newline at end of file diff --git a/charm-packages/ns_relations_requires_vnf/charms/simple_requires/metadata.yaml b/charm-packages/ns_relations_requires_vnf/charms/simple_requires/metadata.yaml new file mode 100644 index 0000000000000000000000000000000000000000..071f8fa8d2b605f85a78f2322ba8c096c65e1326 --- /dev/null +++ b/charm-packages/ns_relations_requires_vnf/charms/simple_requires/metadata.yaml @@ -0,0 +1,28 @@ +## +# Copyright 2020 Canonical Ltd. +# All rights reserved. +# +# 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. +## + +name: simple-native-requires +summary: A simple native charm +description: | + Simple native charm +series: + - bionic + - xenial + - focal +requires: + interface: + interface: interface \ No newline at end of file diff --git a/charm-packages/ns_relations_requires_vnf/charms/simple_requires/mod/operator b/charm-packages/ns_relations_requires_vnf/charms/simple_requires/mod/operator new file mode 160000 index 0000000000000000000000000000000000000000..a84ce8776b368a8b2bccdb173716e342db9a6b36 --- /dev/null +++ b/charm-packages/ns_relations_requires_vnf/charms/simple_requires/mod/operator @@ -0,0 +1 @@ +Subproject commit a84ce8776b368a8b2bccdb173716e342db9a6b36 diff --git a/charm-packages/ns_relations_requires_vnf/charms/simple_requires/src/charm.py b/charm-packages/ns_relations_requires_vnf/charms/simple_requires/src/charm.py new file mode 100755 index 0000000000000000000000000000000000000000..c243dc90a31ba2fb5c14143a5d658f7b8dfd2dcc --- /dev/null +++ b/charm-packages/ns_relations_requires_vnf/charms/simple_requires/src/charm.py @@ -0,0 +1,80 @@ +#!/usr/bin/env python3 +## +# Copyright 2020 Canonical Ltd. +# All rights reserved. +# +# 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. +## + +import sys +import subprocess +import logging + +sys.path.append("lib") + +from ops.charm import CharmBase +from ops.main import main +from ops.model import ActiveStatus + +logger = logging.getLogger(__name__) + +class MyNativeCharm(CharmBase): + + def __init__(self, framework, key): + super().__init__(framework, key) + + # Listen to charm events + self.framework.observe(self.on.config_changed, self.on_config_changed) + self.framework.observe(self.on.install, self.on_install) + self.framework.observe(self.on.start, self.on_start) + + # Listen to the touch action event + self.framework.observe(self.on.touch_action, self.on_touch_action) + + # Listen to relation changed + self.framework.observe( + self.on.interface_relation_changed, self.on_interface_relation_changed + ) + def on_config_changed(self, event): + """Handle changes in configuration""" + self.model.unit.status = ActiveStatus() + + def on_install(self, event): + """Called when the charm is being installed""" + self.model.unit.status = ActiveStatus() + + def on_start(self, event): + """Called when the charm is being started""" + self.model.unit.status = ActiveStatus() + + def on_touch_action(self, event): + """Touch a file.""" + + filename = event.params["filename"] + try: + subprocess.run(["touch", filename], check=True) + event.set_results({"created": True, "filename": filename}) + except subprocess.CalledProcessError as e: + event.fail("Action failed: {}".format(e)) + self.model.unit.status = ActiveStatus() + + def on_interface_relation_changed(self, event): + logger.debug("RELATION DATA: {}".format(dict(event.relation.data[event.unit]))) + parameter = event.relation.data[event.unit].get("parameter") + if parameter: + self.model.unit.status = ActiveStatus("Parameter received: {}".format(parameter)) + + +if __name__ == "__main__": + main(MyNativeCharm) + diff --git a/charm-packages/ns_relations_requires_vnf/cloud_init/cloud-config.txt b/charm-packages/ns_relations_requires_vnf/cloud_init/cloud-config.txt new file mode 100755 index 0000000000000000000000000000000000000000..36c8d1bf2cdebbc4e50d1e8348003f64f419cd0b --- /dev/null +++ b/charm-packages/ns_relations_requires_vnf/cloud_init/cloud-config.txt @@ -0,0 +1,12 @@ +#cloud-config +password: osm4u +chpasswd: { expire: False } +ssh_pwauth: True + +write_files: +- content: | + # My new helloworld file + + owner: root:root + permissions: '0644' + path: /root/helloworld.txt diff --git a/charm-packages/ns_relations_requires_vnf/icons/osm.png b/charm-packages/ns_relations_requires_vnf/icons/osm.png new file mode 100644 index 0000000000000000000000000000000000000000..62012d2a2b491bdcd536d62c3c3c863c0d8c1b33 Binary files /dev/null and b/charm-packages/ns_relations_requires_vnf/icons/osm.png differ diff --git a/charm-packages/ns_relations_requires_vnf/ns_relations_requires_vnfd.yaml b/charm-packages/ns_relations_requires_vnf/ns_relations_requires_vnfd.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ae9ce1680c5fa950871a2e74f5bd73b2fcb95bb9 --- /dev/null +++ b/charm-packages/ns_relations_requires_vnf/ns_relations_requires_vnfd.yaml @@ -0,0 +1,53 @@ +vnfd:vnfd-catalog: + vnfd: + - id: ns_relations_requires-vnf + name: ns_relations_requires-vnf + short-name: ns_relations_requires-vnf + version: 1.0 + description: A VNF consisting of 1 VDU connected to two external VL, and one for data and another one for management + logo: osm.png + connection-point: + - id: requires-mgmt + name: requires-mgmt + short-name: requires-mgmt + type: VPORT + mgmt-interface: + cp: requires-mgmt + vdu: + - id: simple_requires + name: simple_requires + image: ubuntu18.04 + count: 1 + vm-flavor: + vcpu-count: 1 + memory-mb: 1024 + storage-gb: 10 + interface: + - name: simple_requires-eth0 + position: 1 + type: EXTERNAL + virtual-interface: + type: PARAVIRT + external-connection-point-ref: requires-mgmt + cloud-init-file: cloud-config.txt + vnf-configuration: + juju: + charm: simple_requires + proxy: false + config-access: + ssh-access: + required: True + default-user: ubuntu + initial-config-primitive: + - seq: 1 + name: touch + parameter: + - name: filename + data-type: STRING + value: '/home/ubuntu/first-touch' + config-primitive: + - name: touch + parameter: + - name: filename + data-type: STRING + default-value: '/home/ubuntu/touched'