hackfest_ansible
Signed-off-by: candelpreste <adrian.candelprestel@altran.com>
diff --git a/descriptor-packages/nsd/hackfest_ansible_ns/Makefile b/descriptor-packages/nsd/hackfest_ansible_ns/Makefile
new file mode 100644
index 0000000..9c18082
--- /dev/null
+++ b/descriptor-packages/nsd/hackfest_ansible_ns/Makefile
@@ -0,0 +1,20 @@
+#
+# Copyright 2018 Telefonica
+#
+# 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.
+#
+
+DESCRIPTORS_TOPDIR ?= ../..
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/nsd/hackfest_ansible_ns/src/ansiblecharm_nsd.yaml b/descriptor-packages/nsd/hackfest_ansible_ns/src/ansiblecharm_nsd.yaml
new file mode 100644
index 0000000..031ed4e
--- /dev/null
+++ b/descriptor-packages/nsd/hackfest_ansible_ns/src/ansiblecharm_nsd.yaml
@@ -0,0 +1,26 @@
+nsd:nsd-catalog:
+ nsd:
+ - id: ansiblecharm_nsd
+ name: ansiblecharm_nsd
+ short-name: ansiblecharm_nsd
+ description: Generated by OSM package generator
+ vendor: OSM
+ logo: osm.png
+ version: '1.0'
+ constituent-vnfd:
+ # The member-vnf-index needs to be unique, starting from 1
+ # vnfd-id-ref is the id of the VNFD
+ # Multiple constituent VNFDs can be specified
+ - member-vnf-index: 1
+ vnfd-id-ref: ansiblecharm_vnfd
+ vld:
+ # Networks for the VNFs
+ - id: mgmtnet
+ name: mgmtnet
+ short-name: mgmtnet
+ type: ELAN
+ mgmt-network: 'true'
+ vnfd-connection-point-ref:
+ - member-vnf-index-ref: 1
+ vnfd-id-ref: ansiblecharm_vnfd
+ vnfd-connection-point-ref: vnf-cp0
diff --git a/descriptor-packages/nsd/hackfest_ansible_ns/src/icons/osm.png b/descriptor-packages/nsd/hackfest_ansible_ns/src/icons/osm.png
new file mode 100644
index 0000000..62012d2
--- /dev/null
+++ b/descriptor-packages/nsd/hackfest_ansible_ns/src/icons/osm.png
Binary files differ
diff --git a/descriptor-packages/vnfd/hackfest_ansible_vnf/Makefile b/descriptor-packages/vnfd/hackfest_ansible_vnf/Makefile
new file mode 100644
index 0000000..e989331
--- /dev/null
+++ b/descriptor-packages/vnfd/hackfest_ansible_vnf/Makefile
@@ -0,0 +1,21 @@
+#
+# Copyright 2018 Telefonica
+#
+# 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.
+#
+DESCRIPTORS_TOPDIR ?= ../..
+
+VNFD_CHARM = ansible-charm
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/vnfd/hackfest_ansible_vnf/src/ansiblecharm_vnfd.yaml b/descriptor-packages/vnfd/hackfest_ansible_vnf/src/ansiblecharm_vnfd.yaml
new file mode 100644
index 0000000..873d041
--- /dev/null
+++ b/descriptor-packages/vnfd/hackfest_ansible_vnf/src/ansiblecharm_vnfd.yaml
@@ -0,0 +1,55 @@
+vnfd:vnfd-catalog:
+ vnfd:
+ - id: ansiblecharm_vnfd
+ name: ansiblecharm_vnfd
+ short-name: ansiblecharm_vnfd
+ description: Generated by OSM package generator
+ vendor: OSM
+ logo: osm.png
+ version: '1.0'
+ connection-point:
+ - name: vnf-cp0
+ type: VPORT
+ mgmt-interface:
+ cp: vnf-cp0
+ vdu:
+ - id: ansiblecharm_vnfd-VM
+ name: ansiblecharm_vnfd-VM
+ description: ansiblecharm_vnfd-VM
+ count: 1
+ vm-flavor:
+ vcpu-count: 1
+ memory-mb: 1024
+ storage-gb: 10
+ image: 'ubuntu1604'
+ interface:
+ - name: vdu-eth0
+ type: EXTERNAL
+ virtual-interface:
+ type: VIRTIO
+ external-connection-point-ref: vnf-cp0
+ cloud-init-file: cloud-config.txt
+ vnf-configuration:
+ juju:
+ charm: ansible-charm
+ initial-config-primitive:
+ - seq: 1
+ name: config
+ parameter:
+ - name: ssh-hostname
+ value: <rw_mgmt_ip>
+ - name: ssh-username
+ value: ubuntu
+ - name: ssh-password
+ value: osm4u
+ - seq: 2
+ name: ansible-playbook
+ parameter:
+ - name: filename
+ value: '/home/ubuntu/first-touch'
+ config-primitive:
+ - name: ansible-playbook
+ parameter:
+ - name: filename
+ data-type: STRING
+ value: '/home/ubuntu/first-touch'
diff --git a/descriptor-packages/vnfd/hackfest_ansible_vnf/src/cloud_init/cloud-config.txt b/descriptor-packages/vnfd/hackfest_ansible_vnf/src/cloud_init/cloud-config.txt
new file mode 100644
index 0000000..36c8d1b
--- /dev/null
+++ b/descriptor-packages/vnfd/hackfest_ansible_vnf/src/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/descriptor-packages/vnfd/hackfest_ansible_vnf/src/icons/osm.png b/descriptor-packages/vnfd/hackfest_ansible_vnf/src/icons/osm.png
new file mode 100644
index 0000000..62012d2
--- /dev/null
+++ b/descriptor-packages/vnfd/hackfest_ansible_vnf/src/icons/osm.png
Binary files differ