Reformat Robot files to follow best practices
[osm/tests.git] / robot-systest / testsuite / k8s_01-create_k8s_cluster.robot
index 6733c6c..210b772 100644 (file)
@@ -13,7 +13,7 @@
 #   limitations under the License.
 
 *** Settings ***
-Documentation     [K8s-01] Create K8s cluster.
+Documentation   [K8s-01] Create K8s cluster.
 
 Library   OperatingSystem
 Library   String
@@ -71,97 +71,97 @@ ${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}
-    Log To Console  \n${stdout}
+    ${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 VNFD   '%{PACKAGES_FOLDER}/${vnfd_pkg1}'
 
 
 Create Machines VNF Descriptor
 
-    Create VNFD  '%{PACKAGES_FOLDER}/${vnfd_pkg2}'
+    Create VNFD   '%{PACKAGES_FOLDER}/${vnfd_pkg2}'
 
 
 Create K8s Cluster NS Descriptor
 
-    Create NSD  '%{PACKAGES_FOLDER}/${nsd_pkg}'
+    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}
+    ${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}
-    log  ${ip_addr_1}
-    Set Suite Variable  ${vnf_1_ip_addr}  ${ip_addr_1}
-    ${ip_addr_2}  Get Vnf Management Ip Address  ${ns_id}  ${vnf_member_index_2}
-    log  ${ip_addr_2}
-    Set Suite Variable  ${vnf_2_ip_addr}  ${ip_addr_2}
-    ${ip_addr_3}  Get Vnf Management Ip Address  ${ns_id}  ${vnf_member_index_3}
-    log  ${ip_addr_3}
-    Set Suite Variable  ${vnf_3_ip_addr}  ${ip_addr_3}
-    ${ip_addr_4}  Get Vnf Management Ip Address  ${ns_id}  ${vnf_member_index_4}
-    log  ${ip_addr_4}
-    Set Suite Variable  ${vnf_4_ip_addr}  ${ip_addr_4}
-    ${ip_addr_5}  Get Vnf Management Ip Address  ${ns_id}  ${vnf_member_index_5}
-    log  ${ip_addr_5}
-    Set Suite Variable  ${vnf_5_ip_addr}  ${ip_addr_5}
+    ${ip_addr_1}   Get Vnf Management Ip Address   ${ns_id}   ${vnf_member_index_1}
+    log   ${ip_addr_1}
+    Set Suite Variable   ${vnf_1_ip_addr}   ${ip_addr_1}
+    ${ip_addr_2}   Get Vnf Management Ip Address   ${ns_id}   ${vnf_member_index_2}
+    log   ${ip_addr_2}
+    Set Suite Variable   ${vnf_2_ip_addr}   ${ip_addr_2}
+    ${ip_addr_3}   Get Vnf Management Ip Address   ${ns_id}   ${vnf_member_index_3}
+    log   ${ip_addr_3}
+    Set Suite Variable   ${vnf_3_ip_addr}   ${ip_addr_3}
+    ${ip_addr_4}   Get Vnf Management Ip Address   ${ns_id}   ${vnf_member_index_4}
+    log   ${ip_addr_4}
+    Set Suite Variable   ${vnf_4_ip_addr}   ${ip_addr_4}
+    ${ip_addr_5}   Get Vnf Management Ip Address   ${ns_id}   ${vnf_member_index_5}
+    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
-    Variable Should Exist  ${vnf_2_ip_addr}  msg=IP address of the management VNF '${vnf_member_index_2}' is not available
-    Variable Should Exist  ${vnf_3_ip_addr}  msg=IP address of the management VNF '${vnf_member_index_3}' is not available
-    Variable Should Exist  ${vnf_4_ip_addr}  msg=IP address of the management VNF '${vnf_member_index_4}' is not available
-    Variable Should Exist  ${vnf_5_ip_addr}  msg=IP address of the management VNF '${vnf_member_index_5}' is not available
-    Sleep  30s  Waiting ssh daemon to be up
-    Test SSH Connection  ${vnf_1_ip_addr}  ${username}  ${password}  ${privatekey}
-    Test SSH Connection  ${vnf_2_ip_addr}  ${username}  ${password}  ${privatekey}
-    Test SSH Connection  ${vnf_3_ip_addr}  ${username}  ${password}  ${privatekey}
-    Test SSH Connection  ${vnf_4_ip_addr}  ${username}  ${password}  ${privatekey}
-    Test SSH Connection  ${vnf_5_ip_addr}  ${username}  ${password}  ${privatekey}
+    Variable Should Exist   ${vnf_1_ip_addr}   msg=IP address of the management VNF '${vnf_member_index_1}' is not available
+    Variable Should Exist   ${vnf_2_ip_addr}   msg=IP address of the management VNF '${vnf_member_index_2}' is not available
+    Variable Should Exist   ${vnf_3_ip_addr}   msg=IP address of the management VNF '${vnf_member_index_3}' is not available
+    Variable Should Exist   ${vnf_4_ip_addr}   msg=IP address of the management VNF '${vnf_member_index_4}' is not available
+    Variable Should Exist   ${vnf_5_ip_addr}   msg=IP address of the management VNF '${vnf_member_index_5}' is not available
+    Sleep   30s   Waiting ssh daemon to be up
+    Test SSH Connection   ${vnf_1_ip_addr}   ${username}   ${password}   ${privatekey}
+    Test SSH Connection   ${vnf_2_ip_addr}   ${username}   ${password}   ${privatekey}
+    Test SSH Connection   ${vnf_3_ip_addr}   ${username}   ${password}   ${privatekey}
+    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}
+    Check If remote File Exists   ${vnf_5_ip_addr}   ${username}   ${password}   ${privatekey}   ${kubeconfig_file}
 
 
 Delete NS Instance
     [Tags]   cleanup
 
-    Delete NS  ${ns_name}
+    Delete NS   ${ns_name}
 
 
 Delete NS Descriptor
     [Tags]   cleanup
 
-    Delete NSD  ${nsd_name}
+    Delete NSD   ${nsd_name}
 
 
 Delete Controller VNF Descriptor
     [Tags]   cleanup
 
-    Delete VNFD  ${vnfd_name1}
+    Delete VNFD   ${vnfd_name1}
 
 Delete Machines VNF Descriptor
     [Tags]   cleanup
 
-    Delete VNFD  ${vnfd_name2}
+    Delete VNFD   ${vnfd_name2}
 
 
 *** Keywords ***
 Suite Cleanup
-    [Documentation]  Test Suite Cleanup: Deleting descriptors and NS instance
+    [Documentation]   Test Suite Cleanup: Deleting descriptors and NS instance
 
-    Run Keyword If Any Tests Failed  Delete NS  ${ns_name}
-    Run Keyword If Any Tests Failed  Delete NSD  ${nsd_name}
-    Run Keyword If Any Tests Failed  Delete VNFD  ${vnfd_name}
+    Run Keyword If Any Tests Failed   Delete NS   ${ns_name}
+    Run Keyword If Any Tests Failed   Delete NSD   ${nsd_name}
+    Run Keyword If Any Tests Failed   Delete VNFD   ${vnfd_name}