--- /dev/null
+#
+# Copyright 2017 Sandvine
+#
+# 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)
--- /dev/null
+# Copyright 2019 ETSI
+#
+# 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.
+
+nsd:nsd-catalog:
+ nsd:
+ - id: ubuntu-cloudinit_nsd
+ name: ubuntu-cloudinit_nsd
+ short-name: ubuntu-cloudinit_nsd
+ description: Generated by OSM package generator
+ vendor: OSM
+ version: '1.0'
+
+
+ constituent-vnfd:
+ - member-vnf-index: 1
+ vnfd-id-ref: ubuntu-cloudinit_vnfd
+
+ vld:
+ # Networks for the VNFs
+ - id: mgmtnet
+ name: mgmtnet
+ short-name: mgmtnet
+ type: ELAN
+ mgmt-network: 'true'
+ # vim-network-name: <update>
+ vnfd-connection-point-ref:
+ - member-vnf-index-ref: 1
+ vnfd-id-ref: ubuntu-cloudinit_vnfd
+ vnfd-connection-point-ref: vnf-cp0
--- /dev/null
+#
+# Copyright 2017 Sandvine
+#
+# 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)
--- /dev/null
+#Copyright 2019 ETSI
+#
+#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.
+
+#cloud-config
+password: {{ password }}
+chpasswd: { expire: False }
+ssh_pwauth: True
+
--- /dev/null
+# Copyright 2019 ETSI
+#
+# 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.
+
+vnfd:vnfd-catalog:
+ vnfd:
+ - id: ubuntu-cloudinit_vnfd
+ name: ubuntu-cloudinit_vnfd
+ short-name: ubuntu-cloudinit_vnfd
+ description: Generated by OSM package generator
+ vendor: OSM
+ version: '1.0'
+
+ # Management interface
+ mgmt-interface:
+ cp: vnf-cp0
+
+ vdu:
+ - id: ubuntu-cloudinit_vnfd-VM
+ name: ubuntu-cloudinit_vnfd-VM
+ description: ubuntu-cloudinit_vnfd-VM
+ count: 1
+ cloud-init-file: cloud-init.cfg
+
+ vm-flavor:
+ vcpu-count: 2
+ memory-mb: 2048
+ storage-gb: 10
+
+ # Image including the full path
+ image: 'ubuntu1604'
+
+ interface:
+ - name: eth0
+ type: EXTERNAL
+ virtual-interface:
+ type: PARAVIRT
+ external-connection-point-ref: vnf-cp0
+
+ connection-point:
+ - name: vnf-cp0
+
${ns_delete_pol_time} 15sec
${nsconfig}
-
*** Keywords ***
Get NS List
[Documentation] Get ns instance list
Launch Network Services and Return
[Arguments] ${vim_name} ${ns_config}=''
+ [Documentation] Get Configuration parameter to create Newtork service
Run Keyword If ${ns_config}=='' Get NS Config
... ELSE Set NS Config ${ns_config}
Set NS Config
[Arguments] ${ns_config}
+ [Documentation] Set NS Configuration variable
+
${nsconfig}= Get Variable Value ${ns_config} ''
Set Test Variable ${nsconfig}
Get NS Config
+ [Documentation] Get NS Configuration from Environment Variable
+
${nsconfig}= Get Environment Variable NS_CONFIG ''
Set Test Variable ${nsconfig}
--- /dev/null
+# -*- coding: utf-8 -*-
+
+##
+# Copyright 2019 TATA ELXSI
+#
+# 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.
+##
+
+##
+# Author: Ragavi D (ragavi.d@tataelxsi.co.in)
+
+# VNFD Details
+vnfdPckgPath = "/descriptor-packages/vnfd/ubuntu-cloudinit_vnf"
+vnfdPckg = '/build/ubuntu-cloudinit_vnf.tar.gz'
+
+# NSD Details
+nsdPckgPath = "/descriptor-packages/nsd/ubuntu-cloudinit_ns"
+nsdPckg = '/build/ubuntu-cloudinit_ns.tar.gz'
--- /dev/null
+# -*- coding: utf-8 -*-\r
+\r
+##\r
+# Copyright 2019 TATA ELXSI\r
+#\r
+# All Rights Reserved.\r
+#\r
+# Licensed under the Apache License, Version 2.0 (the "License"); you may\r
+# not use this file except in compliance with the License. You may obtain\r
+# a copy of the License at\r
+#\r
+# http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+# Unless required by applicable law or agreed to in writing, software\r
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\r
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r
+# License for the specific language governing permissions and limitations\r
+# under the License.\r
+##\r
+\r
+## Author: Ragavi D (ragavi.d@tataelxsi.co.in)\r
+\r
+*** Settings ***\r
+Documentation Test Suite to create hackfest basic nestwork service\r
+Suite Teardown Run Keyword And Ignore Error Test Cleanup\r
+Library OperatingSystem\r
+Library String\r
+Library Collections\r
+Resource ../../lib/cli/vnfd_lib.robot\r
+Resource ../../lib/cli/nsd_lib.robot\r
+Resource ../../lib/cli/ns_lib.robot\r
+Resource ../../lib/cli/vim_account_lib.robot\r
+Library ../../lib/custom_lib.py\r
+Variables ../../resource/cli/ubuntu-cloudinit_ns_data.py\r
+\r
+*** Variables ***\r
+@{vnfd_ids}\r
+${nsd_id} ${EMPTY}\r
+@{nsd_ids}\r
+@{ns_ids}\r
+${ns_config} '{vld: [ {name: mgmtnet, vim-network-name: osm-ext} ], additionalParamsForVnf: [ { member-vnf-index: "1", additionalParams: { password: "PASSWORD" } } ] }'\r
+\r
+*** Test Cases ***\r
+Create Ubuntu CloudInit VNF Descriptor\r
+ [Tags] comprehensive ubuntu-cloudinit_ns\r
+ Build VNF Descriptor ${vnfdPckgPath}\r
+ ${vnfd_id}= Create VNFD '${CURDIR}${/}../../..${vnfdPckgPath}${vnfdPckg}'\r
+ Append To List ${vnfd_ids} ${vnfd_id}\r
+\r
+Create Ubuntu CloudInit NS Descriptor\r
+ [Tags] comprehensive ubuntu-cloudinit_ns\r
+ Build NS Descriptor ${nsdPckgPath}\r
+ ${nsd_id}= Create NSD '${CURDIR}${/}../../..${nsdPckgPath}${nsdPckg}'\r
+ Append To List ${nsd_ids} ${nsd_id}\r
+\r
+Network Service Instance Test\r
+ [Documentation] Launch and terminate network services\r
+ [Tags] comprehensive ubuntu-cloudinit_ns\r
+ : FOR ${vim_name} IN @{vim}\r
+ \ Launch Network Services and Return ${vim_name} ${ns_config}\r
+\r
+Delete NS Instance Test\r
+ [Tags] comprehensive ubuntu-cloudinit_ns\r
+ : FOR ${ns} IN @{ns_ids}\r
+ \ Delete NS ${ns}\r
+\r
+Delete NS Descriptor Test\r
+ [Tags] comprehensive ubuntu-cloudinit_ns\r
+ : FOR ${nsd} IN @{nsd_ids}\r
+ \ Delete NSD ${nsd}\r
+\r
+Delete VNF Descriptor Test\r
+ [Tags] comprehensive ubuntu-cloudinit_ns\r
+ : FOR ${vnfd_id} IN @{vnfd_ids}\r
+ \ Delete VNFD ${vnfd_id}\r
+\r
+*** Keywords ***\r
+Test Cleanup\r
+ [Documentation] Test Suit Cleanup: Deliting Descriptor, instance and vim\r
+ : FOR ${ns} IN @{ns_ids}\r
+ \ Delete NS ${ns}\r
+ : FOR ${nsd} IN @{nsd_ids}\r
+ \ Delete NSD ${nsd}\r
+ : FOR ${vnfd} IN @{vnfd_ids}\r
+ \ Delete VNFD ${vnfd}\r
+ # :FOR ${vim_id} IN @{vim}\r
+ # Delete Vim Account ${vim_id}\r