X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=robot-systest%2Ftestsuite%2Fk8s_01-create_k8s_cluster.robot;h=6733c6ce4a17f75b604bdd7d6146776a0647d67f;hb=576487e73575ad72071aa5680b8d17b2d8ff8027;hp=a49bbd301629f640f38bc1b8f27caff9616ac1b9;hpb=3f1844f55c6a9c832b78b92efbc2332244d23944;p=osm%2Ftests.git diff --git a/robot-systest/testsuite/k8s_01-create_k8s_cluster.robot b/robot-systest/testsuite/k8s_01-create_k8s_cluster.robot index a49bbd3..6733c6c 100644 --- a/robot-systest/testsuite/k8s_01-create_k8s_cluster.robot +++ b/robot-systest/testsuite/k8s_01-create_k8s_cluster.robot @@ -27,41 +27,75 @@ Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot -Variables %{ROBOT_DEVOPS_FOLDER}/resources/k8s_01-create_k8s_cluster_data.py - Force Tags k8s_01 cluster_k8s regression Suite Teardown Run Keyword And Ignore Error Suite Cleanup *** Variables *** +# NS and VNF descriptor package files +${vnfd_pkg1} k8s_jujucontroller_vnf.tar.gz +${vnfd_pkg2} k8s_jujumachine_vnf.tar.gz +${nsd_pkg} k8s_juju_ns.tar.gz +${vnfd_name1} k8s_jujucontroller_vnf +${vnfd_name2} k8s_jujumachine_vnf +${nsd_name} k8s_juju + +# VNF Member indexes +${vnf_member_index_1} k8s_vnf1 +${vnf_member_index_2} k8s_vnf2 +${vnf_member_index_3} k8s_vnf3 +${vnf_member_index_4} k8s_vnf4 +${vnf_member_index_5} k8s_juju + +# Username +${username} ubuntu + +# Kubeconfig file +${kubeconfig_file} /home/ubuntu/.kube/config + +# NS instance name +${ns_name} k8s-cluster + +# SSH keys and username to be used +${publickey} %{HOME}/.ssh/id_rsa.pub +${privatekey} %{HOME}/.ssh/id_rsa ${username} ubuntu ${password} ${EMPTY} +# Template and config file to use +${template} k8s_juju_template.yaml +${config_file} config.yaml + *** Test Cases *** Render a template - ${stdout}= Render template %{ROBOT_DEVOPS_FOLDER}/resources/${template} %{ROBOT_DEVOPS_FOLDER}/resources/${config_file} IP_VM1=%{IP_VM1} IP_VM2=%{IP_VM2} IP_VM3=%{IP_VM3} IP_VM4=%{IP_VM4} IP_JUJU=%{IP_JUJU} NETWORK=%{VIM_MGMT_NET} + ${stdout}= Render template %{ROBOT_DEVOPS_FOLDER}/resources/${template} %{ROBOT_DEVOPS_FOLDER}/resources/${config_file} IP_VM1=%{IP_VM1} IP_VM2=%{IP_VM2} IP_VM3=%{IP_VM3} IP_VM4=%{IP_VM4} IP_JUJU=%{IP_JUJU} NETWORK=%{VIM_MGMT_NET} Log To Console \n${stdout} + Create Controller VNF Descriptor Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg1}' + Create Machines VNF Descriptor Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg2}' + Create K8s Cluster NS Descriptor Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}' + Instantiate K8s Cluster Network Service ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ns_config=${EMPTY} publickey=${publickey} ns_launch_max_wait_time=70min config_file=%{ROBOT_DEVOPS_FOLDER}/resources/${config_file} Set Suite Variable ${ns_id} ${id} + Get Management Ip Addresses ${ip_addr_1} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_1} @@ -80,6 +114,7 @@ Get Management Ip Addresses log ${ip_addr_5} Set Suite Variable ${vnf_5_ip_addr} ${ip_addr_5} + Test SSH Access Variable Should Exist ${vnf_1_ip_addr} msg=IP address of the management VNF '${vnf_member_index_1}' is not available @@ -94,10 +129,12 @@ Test SSH Access Test SSH Connection ${vnf_4_ip_addr} ${username} ${password} ${privatekey} Test SSH Connection ${vnf_5_ip_addr} ${username} ${password} ${privatekey} + Check kubeconfig file Check If remote File Exists ${vnf_5_ip_addr} ${username} ${password} ${privatekey} ${kubeconfig_file} + Delete NS Instance [Tags] cleanup