Initial tests contributions
Dockerfile for robot tests automation
Robot-systests from devops repository
Testing tags for CI/CD
Adding charm build script
Change-Id: Ib50d8e3c66be44e946e19071b2ca229d48609ea3
Signed-off-by: Felipe Vicens <felipe.vicens@atos.net>
diff --git a/robot-systest/resources/basic_01-crud_operations_on_vim_targets_data.py b/robot-systest/resources/basic_01-crud_operations_on_vim_targets_data.py
new file mode 100644
index 0000000..c30314e
--- /dev/null
+++ b/robot-systest/resources/basic_01-crud_operations_on_vim_targets_data.py
@@ -0,0 +1,46 @@
+# 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 os
+import yaml
+from pathlib import Path
+
+# Prometheus host and port
+prometheus_host = os.environ.get("OSM_HOSTNAME")
+prometheus_port = "9091"
+
+# VIM Configuration
+vim_account_type = "openstack"
+vim_name_prefix = "basic_01_vim_test"
+# Get credentias from Openstack Clouds file
+os_cloud = os.environ.get("OS_CLOUD")
+clouds_file_paths = ["./clouds.yaml", str(Path.home()) + "/.config/openstack/clouds.yaml", "/etc/openstack/clouds.yaml"]
+for path in clouds_file_paths:
+ clouds_file_path = Path(path)
+ if clouds_file_path.exists(): break
+if not clouds_file_path.exists(): raise Exception("Openstack clouds file not found")
+with clouds_file_path.open() as clouds_file:
+ clouds = yaml.safe_load(clouds_file)
+ if not os_cloud in clouds["clouds"]: raise Exception("Openstack cloud '" + os_cloud + "' not found")
+ cloud = clouds["clouds"][os_cloud]
+ if not "username" in cloud["auth"]: raise Exception("Username not found in Openstack cloud '" + os_cloud + "'")
+ vim_user = cloud["auth"]["username"]
+ if not "password" in cloud["auth"]: raise Exception("Password not found in Openstack cloud '" + os_cloud + "'")
+ vim_password = cloud["auth"]["password"]
+ if not "auth_url" in cloud["auth"]: raise Exception("Auth url not found in Openstack cloud '" + os_cloud + "'")
+ vim_auth_url = cloud["auth"]["auth_url"]
+ if not "project_name" in cloud["auth"]: raise Exception("Project name not found in Openstack cloud '" + os_cloud + "'")
+ vim_tenant = cloud["auth"]["project_name"]
+ vim_user_domain_name = cloud["auth"]["user_domain_name"] if "user_domain_name" in cloud["auth"] else "Default"
+ vim_project_domain_name = cloud["auth"]["project_domain_name"] if "project_domain_name" in cloud["auth"] else "Default"
+# Extra config
+vim_config = "'{project_domain_name: " + vim_project_domain_name + ", user_domain_name: " + vim_user_domain_name + ", vim_network_name: " + os.environ.get("VIM_MGMT_NET") + "}'"
diff --git a/robot-systest/resources/basic_05-instantiation_parameters_in_cloud_init_data.py b/robot-systest/resources/basic_05-instantiation_parameters_in_cloud_init_data.py
new file mode 100644
index 0000000..d4e5312
--- /dev/null
+++ b/robot-systest/resources/basic_05-instantiation_parameters_in_cloud_init_data.py
@@ -0,0 +1,24 @@
+# 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.
+
+from pathlib import Path
+
+# Get ${HOME} from local machine
+home = str(Path.home())
+# NS and VNF descriptor package folder
+vnfd_pkg = 'ubuntu_cloudinit_vnf'
+nsd_pkg = 'ubuntu_cloudinit_ns'
+# NS and VNF descriptor id
+vnfd_name = 'ubuntu_cloudinit-vnf'
+nsd_name = 'ubuntu_cloudinit-ns'
+# NS instance name
+ns_name = 'basic_05_instantiation_params_cloud_init'
diff --git a/robot-systest/resources/basic_06-vnf_with_charm_data.py b/robot-systest/resources/basic_06-vnf_with_charm_data.py
new file mode 100644
index 0000000..c1a154c
--- /dev/null
+++ b/robot-systest/resources/basic_06-vnf_with_charm_data.py
@@ -0,0 +1,27 @@
+# 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.
+
+from pathlib import Path
+
+# Get ${HOME} from local machine
+home = str(Path.home())
+# NS and VNF descriptor package folder
+vnfd_pkg = 'hackfest_proxycharm_vnf'
+nsd_pkg = 'hackfest_proxycharm_ns'
+# NS and VNF descriptor id
+vnfd_name = 'hackfest_proxycharm-vnf'
+nsd_name = 'hackfest_proxycharm-ns'
+# NS instance name
+ns_name = 'basic_06_charm_test'
+# SSH keys to be used
+publickey = home + '/.ssh/id_rsa.pub'
+privatekey = home + '/.ssh/id_rsa'
diff --git a/robot-systest/resources/basic_07-secure_key_management_data.py b/robot-systest/resources/basic_07-secure_key_management_data.py
new file mode 100644
index 0000000..8bd8b38
--- /dev/null
+++ b/robot-systest/resources/basic_07-secure_key_management_data.py
@@ -0,0 +1,24 @@
+# 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.
+
+from pathlib import Path
+
+# Get ${HOME} from local machine
+home = str(Path.home())
+# NS and VNF descriptor package folder
+vnfd_pkg = 'simple_nopasswd_vnf'
+nsd_pkg = 'simple_nopasswd_ns'
+# NS and VNF descriptor id
+vnfd_name = 'simple_nopasswd-vnf'
+nsd_name = 'simple_nopasswd-ns'
+# NS instance name
+ns_name = 'basic_07_secure_key_management'
diff --git a/robot-systest/resources/basic_09-manual_vdu_scaling_data.py b/robot-systest/resources/basic_09-manual_vdu_scaling_data.py
new file mode 100644
index 0000000..31b45a2
--- /dev/null
+++ b/robot-systest/resources/basic_09-manual_vdu_scaling_data.py
@@ -0,0 +1,27 @@
+# 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.
+
+from pathlib import Path
+
+# Get ${HOME} from local machine
+home = str(Path.home())
+# NS and VNF descriptor package folder
+vnfd_pkg = 'hackfest_basic_metrics_vnf'
+nsd_pkg = 'hackfest_basic_metrics_ns'
+# NS and VNF descriptor id
+vnfd_name = 'hackfest_basic_metrics-vnf'
+nsd_name = 'hackfest_basic-ns-metrics'
+# NS instance name
+ns_name = 'basic_09_manual_scaling_test'
+# SSH keys to be used
+publickey = home + '/.ssh/id_rsa.pub'
+privatekey = home + '/.ssh/id_rsa'
diff --git a/robot-systest/resources/hackfest_basic_ns_data.py b/robot-systest/resources/hackfest_basic_ns_data.py
new file mode 100644
index 0000000..0f927ed
--- /dev/null
+++ b/robot-systest/resources/hackfest_basic_ns_data.py
@@ -0,0 +1,27 @@
+# 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.
+
+from pathlib import Path
+
+# Get ${HOME} from local machine
+home = str(Path.home())
+# NS and VNF descriptor package folder
+vnfd_pkg = 'hackfest_basic_vnf'
+nsd_pkg = 'hackfest_basic_ns'
+# NS and VNF descriptor package id
+vnfd_name = 'hackfest_basic-vnf'
+nsd_name = 'hackfest_basic-ns'
+# NS instance name
+ns_name = 'hfbasic'
+# SSH keys to be used
+publickey = home + '/.ssh/id_rsa.pub'
+privatekey = home + '/.ssh/id_rsa'
diff --git a/robot-systest/resources/hackfest_cloudinit_ns_data.py b/robot-systest/resources/hackfest_cloudinit_ns_data.py
new file mode 100644
index 0000000..d914c49
--- /dev/null
+++ b/robot-systest/resources/hackfest_cloudinit_ns_data.py
@@ -0,0 +1,27 @@
+# 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.
+
+from pathlib import Path
+
+# Get ${HOME} from local machine
+home = str(Path.home())
+# NS and VNF descriptor package folder
+vnfd_pkg = 'hackfest_cloudinit_vnf'
+nsd_pkg = 'hackfest_cloudinit_ns'
+# NS and VNF descriptor package id
+vnfd_name = 'hackfest_cloudinit-vnf'
+nsd_name = 'hackfest_cloudinit-ns'
+# NS instance name
+ns_name = 'hfcloudinit'
+# SSH keys to be used
+publickey = home + '/.ssh/id_rsa.pub'
+privatekey = home + '/.ssh/id_rsa'
diff --git a/robot-systest/resources/hackfest_multivdu_ns_data.py b/robot-systest/resources/hackfest_multivdu_ns_data.py
new file mode 100644
index 0000000..7c75b67
--- /dev/null
+++ b/robot-systest/resources/hackfest_multivdu_ns_data.py
@@ -0,0 +1,27 @@
+# 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.
+
+from pathlib import Path
+
+# Get ${HOME} from local machine
+home = str(Path.home())
+# NS and VNF descriptor package folder
+vnfd_pkg = 'hackfest_multivdu_vnf'
+nsd_pkg = 'hackfest_multivdu_ns'
+# NS and VNF descriptor package id
+vnfd_name = 'hackfest_multivdu-vnf'
+nsd_name = 'hackfest_multivdu-ns'
+# NS instance name
+ns_name = 'hfmultivdu'
+# SSH keys to be used
+publickey = home + '/.ssh/id_rsa.pub'
+privatekey = home + '/.ssh/id_rsa'
diff --git a/robot-systest/resources/k8s_03-simple_k8s_data.py b/robot-systest/resources/k8s_03-simple_k8s_data.py
new file mode 100644
index 0000000..4ecfe59
--- /dev/null
+++ b/robot-systest/resources/k8s_03-simple_k8s_data.py
@@ -0,0 +1,30 @@
+# 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.
+
+from pathlib import Path
+
+# Get ${HOME} from local machine
+home = str(Path.home())
+# K8s cluster name
+k8scluster_name = 'k8s-test'
+k8scluster_version = 'v1'
+# NS and VNF descriptor package files
+vnfd_pkg = 'hackfest_simple_k8s_vnfd.tar.gz'
+nsd_pkg = 'hackfest_simple_k8s_nsd.tar.gz'
+# NS and VNF descriptor package files
+vnfd_name = 'hackfest-simple-k8s-vnfd'
+nsd_name = 'hackfest-simple-k8s-nsd'
+# NS instance name
+ns_name = 'simple-k8s'
+# SSH keys to be used
+publickey = home + '/.ssh/id_rsa.pub'
+privatekey = home + '/.ssh/id_rsa'
diff --git a/robot-systest/resources/slice_01-network_slicing_data.py b/robot-systest/resources/slice_01-network_slicing_data.py
new file mode 100644
index 0000000..cc64eed
--- /dev/null
+++ b/robot-systest/resources/slice_01-network_slicing_data.py
@@ -0,0 +1,37 @@
+# Copyright 2020 Atos
+#
+# 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.
+
+from pathlib import Path
+
+# Get ${HOME} from local machine
+home = str(Path.home())
+# NS and VNF descriptor package files
+vnfd1_pkg = 'slice_basic_vnf'
+vnfd2_pkg = 'slice_basic_middle_vnf'
+nsd1_pkg = 'slice_basic_ns'
+nsd2_pkg = 'slice_basic_middle_ns'
+nst = 'slice_basic_nst/slice_basic_nst.yaml'
+# Instance names
+slice_name = 'slicebasic'
+middle_ns_name = 'slicebasic.slice_basic_nsd_2'
+# Descriptor names
+nst_name = 'slice_basic_nst'
+vnfd1_name = 'slice_basic_vnf'
+vnfd2_name = 'slice_basic_middle_vnf'
+nsd1_name = 'slice_basic_ns'
+nsd2_name = 'slice_basic_middle_ns'
+# SSH keys to be used
+publickey = home + '/.ssh/id_rsa.pub'
+privatekey = home + '/.ssh/id_rsa'
+
diff --git a/robot-systest/resources/slice_02-shared_network_slicing_data.py b/robot-systest/resources/slice_02-shared_network_slicing_data.py
new file mode 100644
index 0000000..d6358a2
--- /dev/null
+++ b/robot-systest/resources/slice_02-shared_network_slicing_data.py
@@ -0,0 +1,40 @@
+# Copyright 2020 Atos
+#
+# 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.
+
+from pathlib import Path
+
+# Get ${HOME} from local machine
+home = str(Path.home())
+# NS and VNF descriptor package files
+vnfd1_pkg = 'slice_basic_vnf'
+vnfd2_pkg = 'slice_basic_middle_vnf'
+nsd1_pkg = 'slice_basic_ns'
+nsd2_pkg = 'slice_basic_middle_ns'
+nst = 'slice_basic_nst/slice_basic_nst.yaml'
+nst2 = 'slice_basic_nst/slice_basic_2nd_nst.yaml'
+# Instance names
+slice_name = 'slicebasic'
+slice2_name = 'sliceshared'
+middle_ns_name = 'slicebasic.slice_basic_nsd_2'
+# Descriptor names
+nst_name = 'slice_basic_nst'
+nst2_name = 'slice_basic_nst2'
+vnfd1_name = 'slice_basic_vnf'
+vnfd2_name = 'slice_basic_middle_vnf'
+nsd1_name = 'slice_basic_ns'
+nsd2_name = 'slice_basic_middle_ns'
+# SSH keys to be used
+publickey = home + '/.ssh/id_rsa.pub'
+privatekey = home + '/.ssh/id_rsa'
+
diff --git a/robot-systest/resources/slice_02-shared_ns_data.py b/robot-systest/resources/slice_02-shared_ns_data.py
new file mode 100644
index 0000000..2170b57
--- /dev/null
+++ b/robot-systest/resources/slice_02-shared_ns_data.py
@@ -0,0 +1,39 @@
+# Copyright 2020 Atos
+#
+# 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.
+
+from pathlib import Path
+
+# Get ${HOME} from local machine
+home = str(Path.home())
+# NS and VNF descriptor package files
+vnfd1_pkg = 'slice_hackfest_vnf.tar.gz'
+vnfd2_pkg = 'slice_hackfest_middle_vnfd.tar.gz'
+nsd1_pkg = 'slice_hackfest_ns.tar.gz'
+nsd2_pkg = 'slice_hackfest_middle_nsd.tar.gz'
+nst = 'slice_hackfest_nst.yaml'
+nst2 = 'slice_hackfest2_nst.yaml'
+# Instance names
+slice_name = 'slicehfbasic'
+slice2_name = 'sliceshared'
+middle_ns_name = 'slicehfbasic.slice_hackfest_nsd_2'
+# Descriptor names
+nst_name = 'slice_hackfest_nst'
+nst2_name = 'slice_hackfest2_nst'
+vnfd1_name = 'slice_hackfest_vnf'
+vnfd2_name = 'slice_hackfest_middle_vnf'
+nsd1_name = 'slice_hackfest_ns'
+nsd2_name = 'slice_hackfest_middle_ns'
+# SSH keys to be used
+publickey = home + '/.ssh/id_rsa.pub'
+privatekey = home + '/.ssh/id_rsa'