'%{PACKAGES_FOLDER}/${VNFD_PKG}' Onboards ("creates") a NF Package into OSM. - Parameters: - vnfd_pkg: Name (and location) of the NF Package - overrides (optional): String with options to override the EPA and/or interface properties of the Package. This is very useful to allow to deploy e.g. non-EPA packages in EPA VIMs (or vice-versa). Valid strings are the same as in the command. E.g.: - `--override-epa`: adds EPA attributes to all VDUs. - `--override-nonepa`: removes all EPA attributes from all VDUs. - `--override-paravirt`: converts all interfaces to `PARAVIRT`. This one can be combined with the others above (e.g. '--override-nonepa --override-paravirt'). - Relevant environment variables: - OVERRIDES: If the environment variable "OVERRIDES" exists, it prevails over the value in the argument. This is often more convenient to enforce the same behaviour for every test run in a given VIM. ${overrides} OVERRIDES default=${overrides} Returns the value of an environment variable with the given name. ${overrides} = ${rc} ${stdout} osm vnfpkg-create ${overrides} ${vnfd_pkg} Runs the given command in the system and returns the RC and output. Running command 'osm vnfpkg-create '/robot-systest/osm-packages/hackfest_basic_vnf' 2>&1'. ${rc} = 0 ${stdout} = Validating package /robot-systest/osm-packages/hackfest_basic_vnf Validation OK List of charms in the descriptor: set() Adding File: hackfest_basic_vnf Package created: /robot-systest/osm-packages/hac... ${stdout} Logs the given message with the given level. Validating package /robot-systest/osm-packages/hackfest_basic_vnf Validation OK List of charms in the descriptor: set() Adding File: hackfest_basic_vnf Package created: /robot-systest/osm-packages/hackfest_basic_vnf.tar.gz Uploading package /robot-systest/osm-packages/hackfest_basic_vnf.tar.gz 77a98a0c-6f1b-4838-8a2b-c44753ce2385 ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${lines} ${stdout} Returns and logs the number of lines in the given string. 7 lines ${lines} = 7 ${last} ${lines} - 1 Evaluates the given expression in Python and returns the result. ${last} = 6 ${id} ${stdout} ${last} Returns the specified line from the given ``string``. ${id} = 77a98a0c-6f1b-4838-8a2b-c44753ce2385 ${id} Upload VNF package for the testsuite. azure cluster_main daily hackfest_basic regression sanity '%{PACKAGES_FOLDER}/${NSD_PKG}' Upload a NS package to OSM and return the id. ${rc} ${stdout} osm nspkg-create ${nsd_pkg} Runs the given command in the system and returns the RC and output. Running command 'osm nspkg-create '/robot-systest/osm-packages/hackfest_basic_ns' 2>&1'. ${rc} = 0 ${stdout} = Validating package /robot-systest/osm-packages/hackfest_basic_ns Validation OK List of charms in the descriptor: set() Adding File: hackfest_basic_ns Package created: /robot-systest/osm-packages/hackf... ${stdout} Logs the given message with the given level. Validating package /robot-systest/osm-packages/hackfest_basic_ns Validation OK List of charms in the descriptor: set() Adding File: hackfest_basic_ns Package created: /robot-systest/osm-packages/hackfest_basic_ns.tar.gz 84101645-9def-4b85-803a-a2085436ddd4 ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${lines} ${stdout} Returns and logs the number of lines in the given string. 6 lines ${lines} = 6 ${last} ${lines} - 1 Evaluates the given expression in Python and returns the result. ${last} = 5 ${id} ${stdout} ${last} Returns the specified line from the given ``string``. ${id} = 84101645-9def-4b85-803a-a2085436ddd4 ${id} Upload NS package for the testsuite. azure cluster_main daily hackfest_basic regression sanity ${id} ${NSD_NAME} %{VIM_TARGET} ${NS_NAME} ${NS_CONFIG} ${PUBLICKEY} Launch the instantation of a NS and verify in a loop that the NS instance is successfully created in a given time, and return the NS instance id. ${ns_launch_max_wait_time} ${ns_launch_max_wait_time} result_format=number Converts between supported `time formats`. ${ns_launch_max_wait_time} = 300.0 ${ns_launch_max_wait_time} ${ns_launch_max_wait_time} * ${VIM_TIMEOUT_MULTIPLIER} Evaluates the given expression in Python and returns the result. ${ns_launch_max_wait_time} = 300.0 ${ns_launch_max_wait_time} Logs the given message with the given level. 300.0 ${config_attr} '${ns_config}'!='${EMPTY}' --config '${ns_config}' ${EMPTY} Sets variable based on the given condition. ${config_attr} = --config '{vld: [ {name: mgmtnet, vim-network-name: osm-ext} ] }' ${sshkeys_attr} '${publickey}'!='${EMPTY}' --ssh_keys ${publickey} ${EMPTY} Sets variable based on the given condition. ${sshkeys_attr} = --ssh_keys /root/.ssh/id_rsa.pub ${config_file_attr} '${config_file}'!='${EMPTY}' --config_file '${config_file}' ${EMPTY} Sets variable based on the given condition. ${config_file_attr} = ${ns_id} ${ns_name} ${nsd} ${vim_name} ${config_attr} ${sshkeys_attr} ${config_file_attr} Launch the instantation of a NS, and return the NS instance id. ${rc} ${stdout} osm ns-create --ns_name ${ns_name} --nsd_name ${nsd} --vim_account ${vim_name} ${ns_extra_args} Runs the given command in the system and returns the RC and output. Running command 'osm ns-create --ns_name hfbasic --nsd_name hackfest_basic-ns --vim_account osm --config '{vld: [ {name: mgmtnet, vim-network-name: osm-ext} ] }' --ssh_keys /root/.ssh/id_rsa.pub 2>&1'. ${rc} = 0 ${stdout} = a36c1eac-9a82-4f6a-a09e-55f2823db71b ${stdout} Logs the given message with the given level. a36c1eac-9a82-4f6a-a09e-55f2823db71b ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} ${ns_id} = a36c1eac-9a82-4f6a-a09e-55f2823db71b ${ns_id} Logs the given message with the given level. a36c1eac-9a82-4f6a-a09e-55f2823db71b ${ns_launch_max_wait_time} ${NS_LAUNCH_POL_TIME} Check For NS Instance To Configured ${ns_name} Runs the specified keyword and retries if it fails. ${ns_name} Check if a given NS instance has completed the instantiation, no matter if it succeeded (the status should be READY or BROKEN). ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ ${rc} ${stdout} osm ns-list --filter name="${ns_name}" Runs the given command in the system and returns the RC and output. Running command 'osm ns-list --filter name="hfbasic" 2>&1'. ${rc} = 0 ${stdout} = +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ns instance name | id ... ${rc},${stdout} Logs the given message with the given level. 0,+------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ns instance name | id | date | ns state | current operation | error details | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | hfbasic | a36c1eac-9a82-4f6a-a09e-55f2823db71b | 2024-05-03T12:44:24 | BUILDING | INSTANTIATING (15c6a2ec-541f-4f23-a641-d3330d6293a8) | N/A | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID" ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} READY BROKEN Fails if ``container`` does not contain any of the ``*items``. '+------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ns instance name | id | date | ns state | current operation | error details | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | hfbasic | a36c1eac-9a82-4f6a-a09e-55f2823db71b | 2024-05-03T12:44:24 | BUILDING | INSTANTIATING (15c6a2ec-541f-4f23-a641-d3330d6293a8) | N/A | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID"' does not contain any of 'READY' or 'BROKEN' ${ns_name} Check if a given NS instance has completed the instantiation, no matter if it succeeded (the status should be READY or BROKEN). ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+---------------------------------+--------+------------------------+-------------+-------------------------+ | ID | Name ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+---------------------------------+--------+------------------------+-------------+-------------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+---------------------------------+--------+------------------------+-------------+-------------------------+ | 09a83641-390f-481a-9d8c-f113868dc7bf | hfbasic-vnf-hackfest_basic-VM-0 | ACTIVE | osm-ext=172.21.249.19 | ubuntu20.04 | simple_requires-1-1-flv | | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+---------------------------------+--------+------------------------+-------------+-------------------------+ ${rc} ${stdout} osm ns-list --filter name="${ns_name}" Runs the given command in the system and returns the RC and output. Running command 'osm ns-list --filter name="hfbasic" 2>&1'. ${rc} = 0 ${stdout} = +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | ns instance name | id | date ... ${rc},${stdout} Logs the given message with the given level. 0,+------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | ns instance name | id | date | ns state | current operation | error details | +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | hfbasic | a36c1eac-9a82-4f6a-a09e-55f2823db71b | 2024-05-03T12:44:24 | READY | IDLE (None) | N/A | +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID" ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} READY BROKEN Fails if ``container`` does not contain any of the ``*items``. ${ns_name} Check if a given NS instance has not failed in the instantiation (the status should not be BROKEN). ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+---------------------------------+--------+------------------------+-------------+-------------------------+ | ID | Name ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+---------------------------------+--------+------------------------+-------------+-------------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+---------------------------------+--------+------------------------+-------------+-------------------------+ | 09a83641-390f-481a-9d8c-f113868dc7bf | hfbasic-vnf-hackfest_basic-VM-0 | ACTIVE | osm-ext=172.21.249.19 | ubuntu20.04 | simple_requires-1-1-flv | | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+---------------------------------+--------+------------------------+-------------+-------------------------+ ${rc} ${stdout} osm ns-list --filter name="${ns_name}" Runs the given command in the system and returns the RC and output. Running command 'osm ns-list --filter name="hfbasic" 2>&1'. ${rc} = 0 ${stdout} = +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | ns instance name | id | date ... ${rc},${stdout} Logs the given message with the given level. 0,+------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | ns instance name | id | date | ns state | current operation | error details | +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | hfbasic | a36c1eac-9a82-4f6a-a09e-55f2823db71b | 2024-05-03T12:44:24 | READY | IDLE (None) | N/A | +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID" ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} BROKEN Fails if ``container`` contains ``item`` one or more times. ${ns_id} ${id} = a36c1eac-9a82-4f6a-a09e-55f2823db71b ${NS_ID} ${id} Makes a variable available everywhere within the scope of the current suite. ${NS_ID} = a36c1eac-9a82-4f6a-a09e-55f2823db71b Instantiate NS for the testsuite. azure cluster_main daily hackfest_basic regression sanity ${ip_addr} ${NS_ID} ${VNF_MEMBER_INDEX} Get the mgmt IP address of a member VNF in a NS instance, and return it. ${ns_id} Verifies that the given item is not empty. Length is 36 ${vnf_member_index} Verifies that the given item is not empty. Length is 3 ${rc} ${stdout} osm vnf-list --filter member-vnf-index-ref=${vnf_member_index} | grep ${ns_id} | awk '{print $14}' 2>&1 Runs the given command in the system and returns the RC and output. Running command 'osm vnf-list --filter member-vnf-index-ref=vnf | grep a36c1eac-9a82-4f6a-a09e-55f2823db71b | awk '{print $14}' 2>&1'. ${rc} = 0 ${stdout} = 172.21.249.19 ${stdout} Logs the given message with the given level. 172.21.249.19 ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} ${ip_addr} = 172.21.249.19 ${ip_addr} Logs the given message with the given level. 172.21.249.19 ${VNF_IP_ADDR} ${ip_addr} Makes a variable available everywhere within the scope of the current suite. ${VNF_IP_ADDR} = 172.21.249.19 Get the mgmt IP address of the VNF of the NS. azure cluster_main daily hackfest_basic regression sanity ${VNF_IP_ADDR} Ping a host several times during 30sec until it succeeds or raises a timeout. ${CONNECTIVITY_MAX_WAIT_TIME} ${CONNECTIVITY_POL_TIME} Test Ping Host ${host} Runs the specified keyword and retries if it fails. ${host} Run Ping Parameters: host: IP or name of the host Execution example: Ping Test ${host} ${rc} ${stdout} ping -c 2 -W 1 ${host} Runs the given command in the system and returns the RC and output. Running command 'ping -c 2 -W 1 172.21.249.19 2>&1'. ${rc} = 0 ${stdout} = PING 172.21.249.19 (172.21.249.19) 56(84) bytes of data. 64 bytes from 172.21.249.19: icmp_seq=1 ttl=63 time=2.16 ms 64 bytes from 172.21.249.19: icmp_seq=2 ttl=63 time=0.630 ms --- 172.21.249.19 pin... ${stdout} Logs the given message with the given level. PING 172.21.249.19 (172.21.249.19) 56(84) bytes of data. 64 bytes from 172.21.249.19: icmp_seq=1 ttl=63 time=2.16 ms 64 bytes from 172.21.249.19: icmp_seq=2 ttl=63 time=0.630 ms --- 172.21.249.19 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 0.630/1.393/2.157/0.763 ms ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> Test that the mgmt IP address of the VNF is reachable with ping. azure cluster_main daily hackfest_basic regression sanity 30s Waiting ssh daemon to be up Pauses the test executed for the given time. Slept 30 seconds Waiting ssh daemon to be up ${VNF_IP_ADDR} ${USERNAME} ${PASSWORD} ${PRIVATEKEY} Test the SSH connection to the host with the user and credentials passed as arguments. ${host} Opens a new SSH connection to the given ``host`` and ``port``. ${username} ${password} Logs into the SSH server with the given ``username`` and ``password``. ${username} ${privatekey} Logs into the SSH server using key-based authentication. Logging into '172.21.249.19:22' as 'ubuntu'. Read output: Welcome to Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-107-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage System information as of Fri May 3 12:45:35 UTC 2024 System load: 0.89 Processes: 105 Usage of /: 14.0% of 9.52GB Users logged in: 0 Memory usage: 20% IPv4 address for ens3: 172.21.249.19 Swap usage: 0% 1 update can be applied immediately. To see these additional updates run: apt list --upgradable The list of available updates is more than a week old. To check for new updates run: sudo apt update The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details. ubuntu@hfbasic-vnf-hackfest-basic-vm-0:~$ hostname Executes ``command`` on the remote machine and returns its outputs. Executing command 'hostname'. Command exited with return code 0. Closes all open connections. Check that the VNF is accessible via SSH in its mgmt IP address. azure cluster_main daily hackfest_basic regression sanity ${NS_NAME} Delete a NS instance. ${ns_delete_max_wait_time} ${ns_delete_max_wait_time} result_format=number Converts between supported `time formats`. ${ns_delete_max_wait_time} = 240.0 ${ns_delete_max_wait_time} ${ns_delete_max_wait_time} * ${VIM_TIMEOUT_MULTIPLIER} Evaluates the given expression in Python and returns the result. ${ns_delete_max_wait_time} = 240.0 ${ns_delete_max_wait_time} Logs the given message with the given level. 240.0 ${rc} ${stdout} osm ns-delete ${ns} Runs the given command in the system and returns the RC and output. Running command 'osm ns-delete hfbasic 2>&1'. ${rc} = 0 ${stdout} = Deletion in progress ${stdout} Logs the given message with the given level. Deletion in progress ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${ns_delete_max_wait_time} ${NS_DELETE_POL_TIME} Check For NS Instance To Be Deleted ${ns} Runs the specified keyword and retries if it fails. ${ns} Check if a given NS instance is not present in OSM. ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+---------------------------------+--------+------------------------+-------------+-------------------------+ | ID | Name ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+---------------------------------+--------+------------------------+-------------+-------------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+---------------------------------+--------+------------------------+-------------+-------------------------+ | 09a83641-390f-481a-9d8c-f113868dc7bf | hfbasic-vnf-hackfest_basic-VM-0 | ACTIVE | osm-ext=172.21.249.19 | ubuntu20.04 | simple_requires-1-1-flv | | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+---------------------------------+--------+------------------------+-------------+-------------------------+ ${rc} ${stdout} osm ns-list | awk '{print $2}' | grep ${ns} Runs the given command in the system and returns the RC and output. Running command 'osm ns-list | awk '{print $2}' | grep hfbasic 2>&1'. ${rc} = 0 ${stdout} = hfbasic ${rc},${stdout} Logs the given message with the given level. 0,hfbasic ${stdout} ${ns} Fails if objects are equal after converting them to strings. hfbasic == hfbasic ${ns} Check if a given NS instance is not present in OSM. ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ ${rc} ${stdout} osm ns-list | awk '{print $2}' | grep ${ns} Runs the given command in the system and returns the RC and output. Running command 'osm ns-list | awk '{print $2}' | grep hfbasic 2>&1'. ${rc} = 1 ${stdout} = ${rc},${stdout} Logs the given message with the given level. 1, ${stdout} ${ns} Fails if objects are equal after converting them to strings. Delete NS instance. azure cleanup cluster_main daily hackfest_basic regression sanity ${NSD_NAME} Delete a NS package from OSM. ${rc} ${stdout} Run And Return Rc And Output osm nspkg-delete ${nsd_id} Runs the keyword and continues execution even if a failure occurs. osm nspkg-delete ${nsd_id} Runs the given command in the system and returns the RC and output. Running command 'osm nspkg-delete hackfest_basic-ns 2>&1'. ${rc} = 0 ${stdout} = Deleted ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} Logs the given message with the given level. Deleted ${NSD_DELETE_MAX_WAIT_TIME} ${NSD_DELETE_POL_TIME} Check For NSD ${nsd_id} Runs the specified keyword and retries if it fails. ${nsd_id} Check that a NS package exists in OSM. ${rc} ${stdout} osm nspkg-list | awk '{print $2}' | grep ${nsd_id} Runs the given command in the system and returns the RC and output. Running command 'osm nspkg-list | awk '{print $2}' | grep hackfest_basic-ns 2>&1'. ${rc} = 1 ${stdout} = ${rc},${stdout} Logs the given message with the given level. 1, ${stdout} ${nsd_id} Fails if objects are equal after converting them to strings. Delete NS package from OSM. azure cleanup cluster_main daily hackfest_basic regression sanity ${VNFD_NAME} Delete a VNF package from OSM. ${rc} ${stdout} osm vnfpkg-delete ${vnfd_id} Runs the given command in the system and returns the RC and output. Running command 'osm vnfpkg-delete hackfest_basic-vnf 2>&1'. ${rc} = 0 ${stdout} = Deleted ${stdout} Logs the given message with the given level. Deleted ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${VNFD_DELETE_MAX_WAIT_TIME} ${VNFD_DELETE_POL_TIME} Check For VNFD ${vnfd_id} Runs the specified keyword and retries if it fails. ${vnfd_id} Check that a VNF package exists in OSM. ${rc} ${stdout} osm vnfpkg-list | awk '{print $2}' | grep ${vnfd_id} Runs the given command in the system and returns the RC and output. Running command 'osm vnfpkg-list | awk '{print $2}' | grep hackfest_basic-vnf 2>&1'. ${rc} = 1 ${stdout} = ${rc},${stdout} Logs the given message with the given level. 1, ${stdout} ${vnfd_id} Fails if objects are unequal after converting them to strings. ${stdout} ${vnfd_id} Fails if objects are equal after converting them to strings. Delete VNF package from OSM. azure cleanup cluster_main daily hackfest_basic regression sanity Suite Cleanup Runs the given keyword with the given arguments and ignores possible error. Test Suit Cleanup: Deleting Descriptor, instance and vim Delete NS ${NS_NAME} Runs the given keyword with the given arguments, if one or more tests failed. Delete NSD ${NSD_NAME} Runs the given keyword with the given arguments, if one or more tests failed. Delete VNFD ${VNFD_NAME} Runs the given keyword with the given arguments, if one or more tests failed. [HACKFEST-BASIC] Basic NS with a single-VDU VNF '%{PACKAGES_FOLDER}/${VNFD_PKG}' Onboards ("creates") a NF Package into OSM. - Parameters: - vnfd_pkg: Name (and location) of the NF Package - overrides (optional): String with options to override the EPA and/or interface properties of the Package. This is very useful to allow to deploy e.g. non-EPA packages in EPA VIMs (or vice-versa). Valid strings are the same as in the command. E.g.: - `--override-epa`: adds EPA attributes to all VDUs. - `--override-nonepa`: removes all EPA attributes from all VDUs. - `--override-paravirt`: converts all interfaces to `PARAVIRT`. This one can be combined with the others above (e.g. '--override-nonepa --override-paravirt'). - Relevant environment variables: - OVERRIDES: If the environment variable "OVERRIDES" exists, it prevails over the value in the argument. This is often more convenient to enforce the same behaviour for every test run in a given VIM. ${overrides} OVERRIDES default=${overrides} Returns the value of an environment variable with the given name. ${overrides} = ${rc} ${stdout} osm vnfpkg-create ${overrides} ${vnfd_pkg} Runs the given command in the system and returns the RC and output. Running command 'osm vnfpkg-create '/robot-systest/osm-packages/hackfest_cloudinit_vnf' 2>&1'. ${rc} = 0 ${stdout} = Validating package /robot-systest/osm-packages/hackfest_cloudinit_vnf Validation OK List of charms in the descriptor: set() Adding File: hackfest_cloudinit_vnf Package created: /robot-systest/osm-pack... ${stdout} Logs the given message with the given level. Validating package /robot-systest/osm-packages/hackfest_cloudinit_vnf Validation OK List of charms in the descriptor: set() Adding File: hackfest_cloudinit_vnf Package created: /robot-systest/osm-packages/hackfest_cloudinit_vnf.tar.gz Uploading package /robot-systest/osm-packages/hackfest_cloudinit_vnf.tar.gz 89d2ade7-b028-4e8d-b107-f096a03c0a7b ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${lines} ${stdout} Returns and logs the number of lines in the given string. 7 lines ${lines} = 7 ${last} ${lines} - 1 Evaluates the given expression in Python and returns the result. ${last} = 6 ${id} ${stdout} ${last} Returns the specified line from the given ``string``. ${id} = 89d2ade7-b028-4e8d-b107-f096a03c0a7b ${id} Upload VNF package for the testsuite. azure cluster_main daily hackfest_cloudinit regression sanity '%{PACKAGES_FOLDER}/${NSD_PKG}' Upload a NS package to OSM and return the id. ${rc} ${stdout} osm nspkg-create ${nsd_pkg} Runs the given command in the system and returns the RC and output. Running command 'osm nspkg-create '/robot-systest/osm-packages/hackfest_cloudinit_ns' 2>&1'. ${rc} = 0 ${stdout} = Validating package /robot-systest/osm-packages/hackfest_cloudinit_ns Validation OK List of charms in the descriptor: set() Adding File: hackfest_cloudinit_ns Package created: /robot-systest/osm-packag... ${stdout} Logs the given message with the given level. Validating package /robot-systest/osm-packages/hackfest_cloudinit_ns Validation OK List of charms in the descriptor: set() Adding File: hackfest_cloudinit_ns Package created: /robot-systest/osm-packages/hackfest_cloudinit_ns.tar.gz 46c46508-6687-4ab3-b96c-43273fc5b262 ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${lines} ${stdout} Returns and logs the number of lines in the given string. 6 lines ${lines} = 6 ${last} ${lines} - 1 Evaluates the given expression in Python and returns the result. ${last} = 5 ${id} ${stdout} ${last} Returns the specified line from the given ``string``. ${id} = 46c46508-6687-4ab3-b96c-43273fc5b262 ${id} Upload NS package for the testsuite. azure cluster_main daily hackfest_cloudinit regression sanity ${id} ${NSD_NAME} %{VIM_TARGET} ${NS_NAME} ${NS_CONFIG} ${EMPTY} Launch the instantation of a NS and verify in a loop that the NS instance is successfully created in a given time, and return the NS instance id. ${ns_launch_max_wait_time} ${ns_launch_max_wait_time} result_format=number Converts between supported `time formats`. ${ns_launch_max_wait_time} = 300.0 ${ns_launch_max_wait_time} ${ns_launch_max_wait_time} * ${VIM_TIMEOUT_MULTIPLIER} Evaluates the given expression in Python and returns the result. ${ns_launch_max_wait_time} = 300.0 ${ns_launch_max_wait_time} Logs the given message with the given level. 300.0 ${config_attr} '${ns_config}'!='${EMPTY}' --config '${ns_config}' ${EMPTY} Sets variable based on the given condition. ${config_attr} = --config '{vld: [ {name: mgmtnet, vim-network-name: osm-ext} ] }' ${sshkeys_attr} '${publickey}'!='${EMPTY}' --ssh_keys ${publickey} ${EMPTY} Sets variable based on the given condition. ${sshkeys_attr} = ${config_file_attr} '${config_file}'!='${EMPTY}' --config_file '${config_file}' ${EMPTY} Sets variable based on the given condition. ${config_file_attr} = ${ns_id} ${ns_name} ${nsd} ${vim_name} ${config_attr} ${sshkeys_attr} ${config_file_attr} Launch the instantation of a NS, and return the NS instance id. ${rc} ${stdout} osm ns-create --ns_name ${ns_name} --nsd_name ${nsd} --vim_account ${vim_name} ${ns_extra_args} Runs the given command in the system and returns the RC and output. Running command 'osm ns-create --ns_name hfcloudinit --nsd_name hackfest_cloudinit-ns --vim_account osm --config '{vld: [ {name: mgmtnet, vim-network-name: osm-ext} ] }' 2>&1'. ${rc} = 0 ${stdout} = bee90ced-3130-44db-9f1f-458605766aa5 ${stdout} Logs the given message with the given level. bee90ced-3130-44db-9f1f-458605766aa5 ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} ${ns_id} = bee90ced-3130-44db-9f1f-458605766aa5 ${ns_id} Logs the given message with the given level. bee90ced-3130-44db-9f1f-458605766aa5 ${ns_launch_max_wait_time} ${NS_LAUNCH_POL_TIME} Check For NS Instance To Configured ${ns_name} Runs the specified keyword and retries if it fails. ${ns_name} Check if a given NS instance has completed the instantiation, no matter if it succeeded (the status should be READY or BROKEN). ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ ${rc} ${stdout} osm ns-list --filter name="${ns_name}" Runs the given command in the system and returns the RC and output. Running command 'osm ns-list --filter name="hfcloudinit" 2>&1'. ${rc} = 0 ${stdout} = +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ns instance name | id ... ${rc},${stdout} Logs the given message with the given level. 0,+------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ns instance name | id | date | ns state | current operation | error details | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | hfcloudinit | bee90ced-3130-44db-9f1f-458605766aa5 | 2024-05-03T12:46:10 | BUILDING | INSTANTIATING (fadf088f-642d-46b7-924c-5eb8a5ed0be6) | N/A | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID" ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} READY BROKEN Fails if ``container`` does not contain any of the ``*items``. '+------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ns instance name | id | date | ns state | current operation | error details | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | hfcloudinit | bee90ced-3130-44db-9f1f-458605766aa5 | 2024-05-03T12:46:10 | BUILDING | INSTANTIATING (fadf088f-642d-46b7-924c-5eb8a5ed0be6) | N/A | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID"' does not contain any of 'READY' or 'BROKEN' ${ns_name} Check if a given NS instance has completed the instantiation, no matter if it succeeded (the status should be READY or BROKEN). ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+---------------------------+--------+------------------------------------------------------------+-------------+-------------------------+ | ID ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+---------------------------+--------+------------------------------------------------------------+-------------+-------------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+---------------------------+--------+------------------------------------------------------------+-------------+-------------------------+ | 0e718587-147a-4352-93e3-e7e9a0557f88 | hfcloudinit-vnf2-dataVM-0 | BUILD | | ubuntu20.04 | simple_requires-1-1-flv | | 48e95346-7926-4f7f-82af-363bf156642c | hfcloudinit-vnf2-mgmtVM-0 | BUILD | | ubuntu20.04 | simple_requires-1-1-flv | | 5d9b8348-ecdf-46de-8b07-87384401adf5 | hfcloudinit-vnf1-dataVM-0 | BUILD | | ubuntu20.04 | simple_requires-1-1-flv | | 7637ab00-4ccb-4bf0-8066-410ff731d318 | hfcloudinit-vnf1-mgmtVM-0 | ACTIVE | hfcloudinit-internal=192.168.221.89; osm-ext=172.21.249.65 | ubuntu20.04 | simple_requires-1-1-flv | | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+---------------------------+--------+------------------------------------------------------------+-------------+-------------------------+ ${rc} ${stdout} osm ns-list --filter name="${ns_name}" Runs the given command in the system and returns the RC and output. Running command 'osm ns-list --filter name="hfcloudinit" 2>&1'. ${rc} = 0 ${stdout} = +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ns instance name | id ... ${rc},${stdout} Logs the given message with the given level. 0,+------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ns instance name | id | date | ns state | current operation | error details | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | hfcloudinit | bee90ced-3130-44db-9f1f-458605766aa5 | 2024-05-03T12:46:10 | BUILDING | INSTANTIATING (fadf088f-642d-46b7-924c-5eb8a5ed0be6) | N/A | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID" ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} READY BROKEN Fails if ``container`` does not contain any of the ``*items``. '+------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ns instance name | id | date | ns state | current operation | error details | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | hfcloudinit | bee90ced-3130-44db-9f1f-458605766aa5 | 2024-05-03T12:46:10 | BUILDING | INSTANTIATING (fadf088f-642d-46b7-924c-5eb8a5ed0be6) | N/A | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID"' does not contain any of 'READY' or 'BROKEN' ${ns_name} Check if a given NS instance has completed the instantiation, no matter if it succeeded (the status should be READY or BROKEN). ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+---------------------------+--------+---------------------------------------------------------------------------+-------------+-------------------------+ | ID ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+---------------------------+--------+---------------------------------------------------------------------------+-------------+-------------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+---------------------------+--------+---------------------------------------------------------------------------+-------------+-------------------------+ | 0e718587-147a-4352-93e3-e7e9a0557f88 | hfcloudinit-vnf2-dataVM-0 | ACTIVE | hfcloudinit-datanet=192.168.159.222; hfcloudinit-internal=192.168.106.57 | ubuntu20.04 | simple_requires-1-1-flv | | 48e95346-7926-4f7f-82af-363bf156642c | hfcloudinit-vnf2-mgmtVM-0 | ACTIVE | hfcloudinit-internal=192.168.106.214; osm-ext=172.21.248.251 | ubuntu20.04 | simple_requires-1-1-flv | | 5d9b8348-ecdf-46de-8b07-87384401adf5 | hfcloudinit-vnf1-dataVM-0 | ACTIVE | hfcloudinit-datanet=192.168.159.200; hfcloudinit-internal=192.168.221.180 | ubuntu20.04 | simple_requires-1-1-flv | | 7637ab00-4ccb-4bf0-8066-410ff731d318 | hfcloudinit-vnf1-mgmtVM-0 | ACTIVE | hfcloudinit-internal=192.168.221.89; osm-ext=172.21.249.65 | ubuntu20.04 | simple_requires-1-1-flv | | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+---------------------------+--------+---------------------------------------------------------------------------+-------------+-------------------------+ ${rc} ${stdout} osm ns-list --filter name="${ns_name}" Runs the given command in the system and returns the RC and output. Running command 'osm ns-list --filter name="hfcloudinit" 2>&1'. ${rc} = 0 ${stdout} = +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | ns instance name | id | date ... ${rc},${stdout} Logs the given message with the given level. 0,+------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | ns instance name | id | date | ns state | current operation | error details | +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | hfcloudinit | bee90ced-3130-44db-9f1f-458605766aa5 | 2024-05-03T12:46:10 | READY | IDLE (None) | N/A | +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID" ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} READY BROKEN Fails if ``container`` does not contain any of the ``*items``. ${ns_name} Check if a given NS instance has not failed in the instantiation (the status should not be BROKEN). ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+---------------------------+--------+---------------------------------------------------------------------------+-------------+-------------------------+ | ID ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+---------------------------+--------+---------------------------------------------------------------------------+-------------+-------------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+---------------------------+--------+---------------------------------------------------------------------------+-------------+-------------------------+ | 0e718587-147a-4352-93e3-e7e9a0557f88 | hfcloudinit-vnf2-dataVM-0 | ACTIVE | hfcloudinit-datanet=192.168.159.222; hfcloudinit-internal=192.168.106.57 | ubuntu20.04 | simple_requires-1-1-flv | | 48e95346-7926-4f7f-82af-363bf156642c | hfcloudinit-vnf2-mgmtVM-0 | ACTIVE | hfcloudinit-internal=192.168.106.214; osm-ext=172.21.248.251 | ubuntu20.04 | simple_requires-1-1-flv | | 5d9b8348-ecdf-46de-8b07-87384401adf5 | hfcloudinit-vnf1-dataVM-0 | ACTIVE | hfcloudinit-datanet=192.168.159.200; hfcloudinit-internal=192.168.221.180 | ubuntu20.04 | simple_requires-1-1-flv | | 7637ab00-4ccb-4bf0-8066-410ff731d318 | hfcloudinit-vnf1-mgmtVM-0 | ACTIVE | hfcloudinit-internal=192.168.221.89; osm-ext=172.21.249.65 | ubuntu20.04 | simple_requires-1-1-flv | | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+---------------------------+--------+---------------------------------------------------------------------------+-------------+-------------------------+ ${rc} ${stdout} osm ns-list --filter name="${ns_name}" Runs the given command in the system and returns the RC and output. Running command 'osm ns-list --filter name="hfcloudinit" 2>&1'. ${rc} = 0 ${stdout} = +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | ns instance name | id | date ... ${rc},${stdout} Logs the given message with the given level. 0,+------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | ns instance name | id | date | ns state | current operation | error details | +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | hfcloudinit | bee90ced-3130-44db-9f1f-458605766aa5 | 2024-05-03T12:46:10 | READY | IDLE (None) | N/A | +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID" ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} BROKEN Fails if ``container`` contains ``item`` one or more times. ${ns_id} ${id} = bee90ced-3130-44db-9f1f-458605766aa5 ${NS_ID} ${id} Makes a variable available everywhere within the scope of the current suite. ${NS_ID} = bee90ced-3130-44db-9f1f-458605766aa5 Instantiate NS for the testsuite. azure cluster_main daily hackfest_cloudinit regression sanity ${ip_addr} ${NS_ID} ${VNF_MEMBER_INDEX} Get the mgmt IP address of a member VNF in a NS instance, and return it. ${ns_id} Verifies that the given item is not empty. Length is 36 ${vnf_member_index} Verifies that the given item is not empty. Length is 4 ${rc} ${stdout} osm vnf-list --filter member-vnf-index-ref=${vnf_member_index} | grep ${ns_id} | awk '{print $14}' 2>&1 Runs the given command in the system and returns the RC and output. Running command 'osm vnf-list --filter member-vnf-index-ref=vnf1 | grep bee90ced-3130-44db-9f1f-458605766aa5 | awk '{print $14}' 2>&1'. ${rc} = 0 ${stdout} = 172.21.249.65 ${stdout} Logs the given message with the given level. 172.21.249.65 ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} ${ip_addr} = 172.21.249.65 ${ip_addr} Logs the given message with the given level. 172.21.249.65 ${VNF_IP_ADDR} ${ip_addr} Makes a variable available everywhere within the scope of the current suite. ${VNF_IP_ADDR} = 172.21.249.65 Get the mgmt IP address of the VNF of the NS. azure cluster_main daily hackfest_cloudinit regression sanity 30s Waiting ssh daemon to be up Pauses the test executed for the given time. Slept 30 seconds Waiting ssh daemon to be up ${VNF_IP_ADDR} ${USERNAME} ${PASSWORD} ${EMPTY} Test the SSH connection to the host with the user and credentials passed as arguments. ${host} Opens a new SSH connection to the given ``host`` and ``port``. ${username} ${password} Logs into the SSH server with the given ``username`` and ``password``. Logging into '172.21.249.65:22' as 'ubuntu'. Read output: Welcome to Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-107-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage System information as of Fri May 3 12:47:53 UTC 2024 System load: 0.34 Processes: 105 Usage of /: 14.0% of 9.52GB Users logged in: 0 Memory usage: 21% IPv4 address for ens3: 172.21.249.65 Swap usage: 0% IPv4 address for ens4: 192.168.221.89 1 update can be applied immediately. To see these additional updates run: apt list --upgradable The list of available updates is more than a week old. To check for new updates run: sudo apt update The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details. ubuntu@hfcloudinit-vnf1-mgmtvm-0:~$ ${username} ${privatekey} Logs into the SSH server using key-based authentication. hostname Executes ``command`` on the remote machine and returns its outputs. Executing command 'hostname'. Command exited with return code 0. Closes all open connections. Check that the VNF is accessible via SSH in its mgmt IP address. azure cluster_main daily hackfest_cloudinit regression sanity ${stdout} ${VNF_IP_ADDR} ${USERNAME} ${PASSWORD} ${EMPTY} sudo cat /root/helloworld.txt Execute via SSH a command in a remote host and, if the command succeeds, return the output. ${host} Opens a new SSH connection to the given ``host`` and ``port``. ${username} ${password} Logs into the SSH server with the given ``username`` and ``password``. Logging into '172.21.249.65:22' as 'ubuntu'. Read output: Welcome to Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-107-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage System information as of Fri May 3 12:47:56 UTC 2024 System load: 0.34 Processes: 105 Usage of /: 14.2% of 9.52GB Users logged in: 0 Memory usage: 21% IPv4 address for ens3: 172.21.249.65 Swap usage: 0% IPv4 address for ens4: 192.168.221.89 1 update can be applied immediately. To see these additional updates run: apt list --upgradable The list of available updates is more than a week old. To check for new updates run: sudo apt update New release '22.04.3 LTS' available. Run 'do-release-upgrade' to upgrade to it. Last login: Fri May 3 12:47:54 2024 from 172.21.249.4 To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details. ubuntu@hfcloudinit-vnf1-mgmtvm-0:~$ ${username} ${privatekey} Logs into the SSH server using key-based authentication. ${stdout} ${rc} ${command} return_rc=True return_stdout=True Executes ``command`` on the remote machine and returns its outputs. Executing command 'sudo cat /root/helloworld.txt'. Command exited with return code 0. ${stdout} = # My new helloworld file ${rc} = 0 ${rc} Logs the given message with the given level. 0 ${stdout} Logs the given message with the given level. # My new helloworld file Closes all open connections. ${rc} 0 Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} ${stdout} = # My new helloworld file ${stdout} Logs the given message with the given level. # My new helloworld file Check that the day-0 configuration via cloudinit worked as expected in the VNF. A file should exist in the VM. azure cluster_main daily hackfest_cloudinit regression sanity ${NS_NAME} Delete a NS instance. ${ns_delete_max_wait_time} ${ns_delete_max_wait_time} result_format=number Converts between supported `time formats`. ${ns_delete_max_wait_time} = 240.0 ${ns_delete_max_wait_time} ${ns_delete_max_wait_time} * ${VIM_TIMEOUT_MULTIPLIER} Evaluates the given expression in Python and returns the result. ${ns_delete_max_wait_time} = 240.0 ${ns_delete_max_wait_time} Logs the given message with the given level. 240.0 ${rc} ${stdout} osm ns-delete ${ns} Runs the given command in the system and returns the RC and output. Running command 'osm ns-delete hfcloudinit 2>&1'. ${rc} = 0 ${stdout} = Deletion in progress ${stdout} Logs the given message with the given level. Deletion in progress ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${ns_delete_max_wait_time} ${NS_DELETE_POL_TIME} Check For NS Instance To Be Deleted ${ns} Runs the specified keyword and retries if it fails. ${ns} Check if a given NS instance is not present in OSM. ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+---------------------------+--------+---------------------------------------------------------------------------+-------------+-------------------------+ | ID ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+---------------------------+--------+---------------------------------------------------------------------------+-------------+-------------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+---------------------------+--------+---------------------------------------------------------------------------+-------------+-------------------------+ | 0e718587-147a-4352-93e3-e7e9a0557f88 | hfcloudinit-vnf2-dataVM-0 | ACTIVE | hfcloudinit-datanet=192.168.159.222; hfcloudinit-internal=192.168.106.57 | ubuntu20.04 | simple_requires-1-1-flv | | 48e95346-7926-4f7f-82af-363bf156642c | hfcloudinit-vnf2-mgmtVM-0 | ACTIVE | hfcloudinit-internal=192.168.106.214; osm-ext=172.21.248.251 | ubuntu20.04 | simple_requires-1-1-flv | | 5d9b8348-ecdf-46de-8b07-87384401adf5 | hfcloudinit-vnf1-dataVM-0 | ACTIVE | hfcloudinit-datanet=192.168.159.200; hfcloudinit-internal=192.168.221.180 | ubuntu20.04 | simple_requires-1-1-flv | | 7637ab00-4ccb-4bf0-8066-410ff731d318 | hfcloudinit-vnf1-mgmtVM-0 | ACTIVE | hfcloudinit-internal=192.168.221.89; osm-ext=172.21.249.65 | ubuntu20.04 | simple_requires-1-1-flv | | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+---------------------------+--------+---------------------------------------------------------------------------+-------------+-------------------------+ ${rc} ${stdout} osm ns-list | awk '{print $2}' | grep ${ns} Runs the given command in the system and returns the RC and output. Running command 'osm ns-list | awk '{print $2}' | grep hfcloudinit 2>&1'. ${rc} = 0 ${stdout} = hfcloudinit ${rc},${stdout} Logs the given message with the given level. 0,hfcloudinit ${stdout} ${ns} Fails if objects are equal after converting them to strings. hfcloudinit == hfcloudinit ${ns} Check if a given NS instance is not present in OSM. ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+---------------------------+--------+--------------------------------------------------------------+-------------+-------------------------+ | ID ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+---------------------------+--------+--------------------------------------------------------------+-------------+-------------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+---------------------------+--------+--------------------------------------------------------------+-------------+-------------------------+ | 0e718587-147a-4352-93e3-e7e9a0557f88 | hfcloudinit-vnf2-dataVM-0 | ACTIVE | | ubuntu20.04 | simple_requires-1-1-flv | | 48e95346-7926-4f7f-82af-363bf156642c | hfcloudinit-vnf2-mgmtVM-0 | ACTIVE | hfcloudinit-internal=192.168.106.214; osm-ext=172.21.248.251 | ubuntu20.04 | simple_requires-1-1-flv | | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+---------------------------+--------+--------------------------------------------------------------+-------------+-------------------------+ ${rc} ${stdout} osm ns-list | awk '{print $2}' | grep ${ns} Runs the given command in the system and returns the RC and output. Running command 'osm ns-list | awk '{print $2}' | grep hfcloudinit 2>&1'. ${rc} = 0 ${stdout} = hfcloudinit ${rc},${stdout} Logs the given message with the given level. 0,hfcloudinit ${stdout} ${ns} Fails if objects are equal after converting them to strings. hfcloudinit == hfcloudinit ${ns} Check if a given NS instance is not present in OSM. ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ ${rc} ${stdout} osm ns-list | awk '{print $2}' | grep ${ns} Runs the given command in the system and returns the RC and output. Running command 'osm ns-list | awk '{print $2}' | grep hfcloudinit 2>&1'. ${rc} = 1 ${stdout} = ${rc},${stdout} Logs the given message with the given level. 1, ${stdout} ${ns} Fails if objects are equal after converting them to strings. Delete NS instance. azure cleanup cluster_main daily hackfest_cloudinit regression sanity ${NSD_NAME} Delete a NS package from OSM. ${rc} ${stdout} Run And Return Rc And Output osm nspkg-delete ${nsd_id} Runs the keyword and continues execution even if a failure occurs. osm nspkg-delete ${nsd_id} Runs the given command in the system and returns the RC and output. Running command 'osm nspkg-delete hackfest_cloudinit-ns 2>&1'. ${rc} = 0 ${stdout} = Deleted ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} Logs the given message with the given level. Deleted ${NSD_DELETE_MAX_WAIT_TIME} ${NSD_DELETE_POL_TIME} Check For NSD ${nsd_id} Runs the specified keyword and retries if it fails. ${nsd_id} Check that a NS package exists in OSM. ${rc} ${stdout} osm nspkg-list | awk '{print $2}' | grep ${nsd_id} Runs the given command in the system and returns the RC and output. Running command 'osm nspkg-list | awk '{print $2}' | grep hackfest_cloudinit-ns 2>&1'. ${rc} = 1 ${stdout} = ${rc},${stdout} Logs the given message with the given level. 1, ${stdout} ${nsd_id} Fails if objects are equal after converting them to strings. Delete NS package from OSM. azure cleanup cluster_main daily hackfest_cloudinit regression sanity ${VNFD_NAME} Delete a VNF package from OSM. ${rc} ${stdout} osm vnfpkg-delete ${vnfd_id} Runs the given command in the system and returns the RC and output. Running command 'osm vnfpkg-delete hackfest_cloudinit-vnf 2>&1'. ${rc} = 0 ${stdout} = Deleted ${stdout} Logs the given message with the given level. Deleted ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${VNFD_DELETE_MAX_WAIT_TIME} ${VNFD_DELETE_POL_TIME} Check For VNFD ${vnfd_id} Runs the specified keyword and retries if it fails. ${vnfd_id} Check that a VNF package exists in OSM. ${rc} ${stdout} osm vnfpkg-list | awk '{print $2}' | grep ${vnfd_id} Runs the given command in the system and returns the RC and output. Running command 'osm vnfpkg-list | awk '{print $2}' | grep hackfest_cloudinit-vnf 2>&1'. ${rc} = 1 ${stdout} = ${rc},${stdout} Logs the given message with the given level. 1, ${stdout} ${vnfd_id} Fails if objects are unequal after converting them to strings. ${stdout} ${vnfd_id} Fails if objects are equal after converting them to strings. Delete VNF package from OSM. azure cleanup cluster_main daily hackfest_cloudinit regression sanity Suite Cleanup Runs the given keyword with the given arguments and ignores possible error. Test Suit Cleanup: Deleting Descriptor, instance and vim Delete NS ${NS_NAME} Runs the given keyword with the given arguments, if one or more tests failed. Delete NSD ${NSD_NAME} Runs the given keyword with the given arguments, if one or more tests failed. Delete VNFD ${VNFD_NAME} Runs the given keyword with the given arguments, if one or more tests failed. [HACKFEST-CLOUDINIT] Basic NS with two multi-VDU VNF with cloudinit '%{PACKAGES_FOLDER}/${VNFD_PKG}' Onboards ("creates") a NF Package into OSM. - Parameters: - vnfd_pkg: Name (and location) of the NF Package - overrides (optional): String with options to override the EPA and/or interface properties of the Package. This is very useful to allow to deploy e.g. non-EPA packages in EPA VIMs (or vice-versa). Valid strings are the same as in the command. E.g.: - `--override-epa`: adds EPA attributes to all VDUs. - `--override-nonepa`: removes all EPA attributes from all VDUs. - `--override-paravirt`: converts all interfaces to `PARAVIRT`. This one can be combined with the others above (e.g. '--override-nonepa --override-paravirt'). - Relevant environment variables: - OVERRIDES: If the environment variable "OVERRIDES" exists, it prevails over the value in the argument. This is often more convenient to enforce the same behaviour for every test run in a given VIM. ${overrides} OVERRIDES default=${overrides} Returns the value of an environment variable with the given name. ${overrides} = ${rc} ${stdout} osm vnfpkg-create ${overrides} ${vnfd_pkg} Runs the given command in the system and returns the RC and output. Running command 'osm vnfpkg-create '/robot-systest/osm-packages/openldap_knf' 2>&1'. ${rc} = 0 ${stdout} = Validating package /robot-systest/osm-packages/openldap_knf Validation OK List of charms in the descriptor: set() Adding File: openldap_knf Package created: /robot-systest/osm-packages/openldap_knf.ta... ${stdout} Logs the given message with the given level. Validating package /robot-systest/osm-packages/openldap_knf Validation OK List of charms in the descriptor: set() Adding File: openldap_knf Package created: /robot-systest/osm-packages/openldap_knf.tar.gz Uploading package /robot-systest/osm-packages/openldap_knf.tar.gz 56c64b7c-f48a-4228-ad9d-b83693088410 ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${lines} ${stdout} Returns and logs the number of lines in the given string. 7 lines ${lines} = 7 ${last} ${lines} - 1 Evaluates the given expression in Python and returns the result. ${last} = 6 ${id} ${stdout} ${last} Returns the specified line from the given ``string``. ${id} = 56c64b7c-f48a-4228-ad9d-b83693088410 ${id} Upload NF package for the testsuite. azure cluster_k8s daily k8s_04 prepare regression sanity '%{PACKAGES_FOLDER}/${NSD_PKG}' Upload a NS package to OSM and return the id. ${rc} ${stdout} osm nspkg-create ${nsd_pkg} Runs the given command in the system and returns the RC and output. Running command 'osm nspkg-create '/robot-systest/osm-packages/openldap_ns' 2>&1'. ${rc} = 0 ${stdout} = Validating package /robot-systest/osm-packages/openldap_ns Validation OK List of charms in the descriptor: set() Adding File: openldap_ns Package created: /robot-systest/osm-packages/openldap_ns.tar.g... ${stdout} Logs the given message with the given level. Validating package /robot-systest/osm-packages/openldap_ns Validation OK List of charms in the descriptor: set() Adding File: openldap_ns Package created: /robot-systest/osm-packages/openldap_ns.tar.gz 11dd8f54-d3f5-4ef6-a395-4af14970be08 ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${lines} ${stdout} Returns and logs the number of lines in the given string. 6 lines ${lines} = 6 ${last} ${lines} - 1 Evaluates the given expression in Python and returns the result. ${last} = 5 ${id} ${stdout} ${last} Returns the specified line from the given ``string``. ${id} = 11dd8f54-d3f5-4ef6-a395-4af14970be08 ${id} Upload NS package for the testsuite. azure cluster_k8s daily k8s_04 prepare regression sanity ${id} ${NSD_NAME} %{VIM_TARGET} ${NS_NAME} ${NS_CONFIG} ${PUBLICKEY} Launch the instantation of a NS and verify in a loop that the NS instance is successfully created in a given time, and return the NS instance id. ${ns_launch_max_wait_time} ${ns_launch_max_wait_time} result_format=number Converts between supported `time formats`. ${ns_launch_max_wait_time} = 300.0 ${ns_launch_max_wait_time} ${ns_launch_max_wait_time} * ${VIM_TIMEOUT_MULTIPLIER} Evaluates the given expression in Python and returns the result. ${ns_launch_max_wait_time} = 300.0 ${ns_launch_max_wait_time} Logs the given message with the given level. 300.0 ${config_attr} '${ns_config}'!='${EMPTY}' --config '${ns_config}' ${EMPTY} Sets variable based on the given condition. ${config_attr} = --config '{vld: [ {name: mgmtnet, vim-network-name: osm-ext}], additionalParamsForVnf: [ {member-vnf-index: openldap, additionalParamsForKdu: [ {kdu_name: ldap, additionalParams: {service: {type: Load... ${sshkeys_attr} '${publickey}'!='${EMPTY}' --ssh_keys ${publickey} ${EMPTY} Sets variable based on the given condition. ${sshkeys_attr} = ${config_file_attr} '${config_file}'!='${EMPTY}' --config_file '${config_file}' ${EMPTY} Sets variable based on the given condition. ${config_file_attr} = ${ns_id} ${ns_name} ${nsd} ${vim_name} ${config_attr} ${sshkeys_attr} ${config_file_attr} Launch the instantation of a NS, and return the NS instance id. ${rc} ${stdout} osm ns-create --ns_name ${ns_name} --nsd_name ${nsd} --vim_account ${vim_name} ${ns_extra_args} Runs the given command in the system and returns the RC and output. Running command 'osm ns-create --ns_name ldap --nsd_name openldap_ns --vim_account osm --config '{vld: [ {name: mgmtnet, vim-network-name: osm-ext}], additionalParamsForVnf: [ {member-vnf-index: openldap, additionalParamsForKdu: [ {kdu_name: ldap, additionalParams: {service: {type: LoadBalancer }, adminPassword: admin}} ] } ] }' 2>&1'. ${rc} = 0 ${stdout} = cf174715-6f88-4244-b4dd-c2ddb091d8a2 ${stdout} Logs the given message with the given level. cf174715-6f88-4244-b4dd-c2ddb091d8a2 ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} ${ns_id} = cf174715-6f88-4244-b4dd-c2ddb091d8a2 ${ns_id} Logs the given message with the given level. cf174715-6f88-4244-b4dd-c2ddb091d8a2 ${ns_launch_max_wait_time} ${NS_LAUNCH_POL_TIME} Check For NS Instance To Configured ${ns_name} Runs the specified keyword and retries if it fails. ${ns_name} Check if a given NS instance has completed the instantiation, no matter if it succeeded (the status should be READY or BROKEN). ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ ${rc} ${stdout} osm ns-list --filter name="${ns_name}" Runs the given command in the system and returns the RC and output. Running command 'osm ns-list --filter name="ldap" 2>&1'. ${rc} = 0 ${stdout} = +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ns instance name | id ... ${rc},${stdout} Logs the given message with the given level. 0,+------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ns instance name | id | date | ns state | current operation | error details | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ldap | cf174715-6f88-4244-b4dd-c2ddb091d8a2 | 2024-05-03T12:48:48 | BUILDING | INSTANTIATING (97ce9f7e-b811-4537-8a0d-2e36809a53ce) | N/A | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID" ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} READY BROKEN Fails if ``container`` does not contain any of the ``*items``. '+------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ns instance name | id | date | ns state | current operation | error details | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ldap | cf174715-6f88-4244-b4dd-c2ddb091d8a2 | 2024-05-03T12:48:48 | BUILDING | INSTANTIATING (97ce9f7e-b811-4537-8a0d-2e36809a53ce) | N/A | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID"' does not contain any of 'READY' or 'BROKEN' ${ns_name} Check if a given NS instance has completed the instantiation, no matter if it succeeded (the status should be READY or BROKEN). ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ ${rc} ${stdout} osm ns-list --filter name="${ns_name}" Runs the given command in the system and returns the RC and output. Running command 'osm ns-list --filter name="ldap" 2>&1'. ${rc} = 0 ${stdout} = +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ns instance name | id ... ${rc},${stdout} Logs the given message with the given level. 0,+------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ns instance name | id | date | ns state | current operation | error details | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ldap | cf174715-6f88-4244-b4dd-c2ddb091d8a2 | 2024-05-03T12:48:48 | BUILDING | INSTANTIATING (97ce9f7e-b811-4537-8a0d-2e36809a53ce) | N/A | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID" ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} READY BROKEN Fails if ``container`` does not contain any of the ``*items``. '+------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ns instance name | id | date | ns state | current operation | error details | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ldap | cf174715-6f88-4244-b4dd-c2ddb091d8a2 | 2024-05-03T12:48:48 | BUILDING | INSTANTIATING (97ce9f7e-b811-4537-8a0d-2e36809a53ce) | N/A | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID"' does not contain any of 'READY' or 'BROKEN' ${ns_name} Check if a given NS instance has completed the instantiation, no matter if it succeeded (the status should be READY or BROKEN). ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ ${rc} ${stdout} osm ns-list --filter name="${ns_name}" Runs the given command in the system and returns the RC and output. Running command 'osm ns-list --filter name="ldap" 2>&1'. ${rc} = 0 ${stdout} = +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | ns instance name | id | date ... ${rc},${stdout} Logs the given message with the given level. 0,+------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | ns instance name | id | date | ns state | current operation | error details | +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | ldap | cf174715-6f88-4244-b4dd-c2ddb091d8a2 | 2024-05-03T12:48:48 | READY | IDLE (None) | N/A | +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID" ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} READY BROKEN Fails if ``container`` does not contain any of the ``*items``. ${ns_name} Check if a given NS instance has not failed in the instantiation (the status should not be BROKEN). ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ ${rc} ${stdout} osm ns-list --filter name="${ns_name}" Runs the given command in the system and returns the RC and output. Running command 'osm ns-list --filter name="ldap" 2>&1'. ${rc} = 0 ${stdout} = +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | ns instance name | id | date ... ${rc},${stdout} Logs the given message with the given level. 0,+------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | ns instance name | id | date | ns state | current operation | error details | +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | ldap | cf174715-6f88-4244-b4dd-c2ddb091d8a2 | 2024-05-03T12:48:48 | READY | IDLE (None) | N/A | +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID" ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} BROKEN Fails if ``container`` contains ``item`` one or more times. ${ns_id} ${id} = cf174715-6f88-4244-b4dd-c2ddb091d8a2 ${id} Logs the given message with the given level. cf174715-6f88-4244-b4dd-c2ddb091d8a2 Instantiate NS for the testsuite. azure cluster_k8s daily k8s_04 prepare regression sanity ${id} ${NS_NAME} Get the NS instance ID from a NS instance name passed as argument, and return it. ${ns_name} Verifies that the given item is not empty. Length is 4 ${rc} ${stdout} osm ns-list | grep ${ns_name} | awk '{print $4}' 2>&1 Runs the given command in the system and returns the RC and output. Running command 'osm ns-list | grep ldap | awk '{print $4}' 2>&1'. ${rc} = 0 ${stdout} = cf174715-6f88-4244-b4dd-c2ddb091d8a2 ${stdout} Logs the given message with the given level. cf174715-6f88-4244-b4dd-c2ddb091d8a2 ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} Verifies that the given item is not empty. Length is 36 ${stdout} ${id} = cf174715-6f88-4244-b4dd-c2ddb091d8a2 ${NS_ID} ${id} Makes a variable available everywhere within the scope of the current suite. ${NS_ID} = cf174715-6f88-4244-b4dd-c2ddb091d8a2 Retrieve NS instance id to be used later on. azure cluster_k8s daily k8s_04 regression sanity verify ${NS_ID} msg=Network service instance is not available Fails unless the given variable exists within the current scope. @{vnfr_list} ${NS_ID} Return a list with the IDs of the VNF records of a NS instance. ${ns_id} Verifies that the given item is not empty. Length is 36 ${rc} ${stdout} osm vnf-list --ns ${ns_id} | grep ${ns_id} | awk '{print $2}' 2>&1 Runs the given command in the system and returns the RC and output. Running command 'osm vnf-list --ns cf174715-6f88-4244-b4dd-c2ddb091d8a2 | grep cf174715-6f88-4244-b4dd-c2ddb091d8a2 | awk '{print $2}' 2>&1'. ${rc} = 0 ${stdout} = f8866f0e-1161-4ba5-aad2-20be63770388 ${rc} ${SUCCESS_RETURN_CODE} msg=${stdout} values=False Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> @{vdur} ${stdout} Splits the ``string`` using ``separator`` as a delimiter string. @{vdur} = [ f8866f0e-1161-4ba5-aad2-20be63770388 ] @{vdur} @{vnfr_list} = [ f8866f0e-1161-4ba5-aad2-20be63770388 ] ${vnfr_list} Logs the length and contents of the ``list`` using given ``level``. List has one item: f8866f0e-1161-4ba5-aad2-20be63770388 ${VNF_ID} ${vnfr_list}[0] Makes a variable available everywhere within the scope of the current suite. ${VNF_ID} = f8866f0e-1161-4ba5-aad2-20be63770388 Retrieve NF instance id to be used later on. azure cluster_k8s daily k8s_04 regression sanity verify ${NS_ID} msg=Network service instance is not available Fails unless the given variable exists within the current scope. ${ns_op_id} ${NS_NAME} ${UPGRADE_ACTION} ${VNF_MEMBER_INDEX} ${KDU_NAME} replicaCount=${REPLICA_COUNT} Execute an action over the desired K8s NS. Parameters are given to this function in key=value format (one argument per key/value pair). Return the ID of the operation associated to the executed action. Examples of execution: ${ns_op_id}= Execute NS Action ${ns_name} ${ns_action} ${vnf_member_index} ${ns_op_id}= Execute NS Action ${ns_name} ${ns_action} ${vnf_member_index} ${param1}=${value1} ${param2}=${value2} ${params} ${EMPTY} Returns the given values which can then be assigned to a variables. ${params} = ${param} @{action_params} replicaCount=3 ${match} ${param_name} ${param_value} ${param} (.+)=(.+) msg=Syntax error in parameters Fails if ``string`` does not match ``pattern`` as a regular expression. ${match} = replicaCount=3 ${param_name} = replicaCount ${param_value} = 3 ${match},${param_name},${param_value} Logs the given message with the given level. replicaCount=3,replicaCount,3 ${params} SEPARATOR= ${params} "${param_name}":"${param_value}", Catenates the given items together and returns the resulted string. ${params} = "replicaCount":"3", ${osm_ns_action_command} osm ns-action --action_name ${ns_action} --vnf_name ${vnf_member_index} --kdu_name ${kdu_name} Returns the given values which can then be assigned to a variables. ${osm_ns_action_command} = osm ns-action --action_name upgrade --vnf_name openldap --kdu_name ldap ${osm_ns_action_command} ${osm_ns_action_command} --params '{${params}}' Catenates the given items together and returns the resulted string. ${osm_ns_action_command} = osm ns-action --action_name upgrade --vnf_name openldap --kdu_name ldap --params '{"replicaCount":"3",}' ${osm_ns_action_command} ${osm_ns_action_command} Returns the given values which can then be assigned to a variables. ${osm_ns_action_command} ${osm_ns_action_command} ${ns_name} Catenates the given items together and returns the resulted string. ${osm_ns_action_command} = osm ns-action --action_name upgrade --vnf_name openldap --kdu_name ldap --params '{"replicaCount":"3",}' ldap ${rc} ${stdout} ${osm_ns_action_command} Runs the given command in the system and returns the RC and output. Running command 'osm ns-action --action_name upgrade --vnf_name openldap --kdu_name ldap --params '{"replicaCount":"3",}' ldap 2>&1'. ${rc} = 0 ${stdout} = cda11900-5435-43af-90e0-dea6a793365d ${rc} ${SUCCESS_RETURN_CODE} msg=${stdout} values=False Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${NS_ACTION_MAX_WAIT_TIME} ${NS_ACTION_POL_TIME} Check For NS Operation Ended ${stdout} Runs the specified keyword and retries if it fails. ${stdout} Check wheter the status of the desired operation is "FAILED" or "COMPLETED". ${ns_operation_id} Verifies that the given item is not empty. Length is 36 ${rc} ${stdout} osm ns-op-show ${ns_operation_id} --literal | yq -r .operationState Runs the given command in the system and returns the RC and output. Running command 'osm ns-op-show cda11900-5435-43af-90e0-dea6a793365d --literal | yq -r .operationState 2>&1'. ${rc} = 0 ${stdout} = PROCESSING ${stdout} Logs the given message with the given level. PROCESSING ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} FAILED COMPLETED msg=Timeout waiting for ns-action with id ${ns_operation_id} values=False Fails if ``container`` does not contain any of the ``*items``. Timeout waiting for ns-action with id cda11900-5435-43af-90e0-dea6a793365d ${stdout} Check wheter the status of the desired operation is "FAILED" or "COMPLETED". ${ns_operation_id} Verifies that the given item is not empty. Length is 36 ${rc} ${stdout} osm ns-op-show ${ns_operation_id} --literal | yq -r .operationState Runs the given command in the system and returns the RC and output. Running command 'osm ns-op-show cda11900-5435-43af-90e0-dea6a793365d --literal | yq -r .operationState 2>&1'. ${rc} = 0 ${stdout} = FAILED ${stdout} Logs the given message with the given level. FAILED ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} FAILED COMPLETED msg=Timeout waiting for ns-action with id ${ns_operation_id} values=False Fails if ``container`` does not contain any of the ``*items``. ${stdout} Check wheter the status of the desired operation is "COMPLETED" or not. ${ns_operation_id} Verifies that the given item is not empty. Length is 36 ${rc} ${stdout} osm ns-op-show ${ns_operation_id} --literal | yq -r .operationState Runs the given command in the system and returns the RC and output. Running command 'osm ns-op-show cda11900-5435-43af-90e0-dea6a793365d --literal | yq -r .operationState 2>&1'. ${rc} = 0 ${stdout} = FAILED ${stdout} Logs the given message with the given level. FAILED ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} COMPLETED msg=The ns-action with id ${ns_operation_id} was not completed values=False Fails if ``container`` does not contain ``item`` one or more times. The ns-action with id cda11900-5435-43af-90e0-dea6a793365d was not completed ${stdout} ${ns_op_id} Logs the given message with the given level. Perform OSM action to upgrade the number of replicas of a deployment in the CNF. azure cluster_k8s daily k8s_04 regression sanity verify The ns-action with id cda11900-5435-43af-90e0-dea6a793365d was not completed ${NS_ID} msg=Network service instance is not available Fails unless the given variable exists within the current scope. ${count} ${VNF_ID} ${KDU_NAME} Return the number of KDU replicas (empty if none) of a VNF instance. ${vnf_id} Verifies that the given item is not empty. Length is 36 ${kdu_name} Verifies that the given item is not empty. Length is 4 ${rc} ${stdout} osm vnf-show ${vnf_id} --kdu ${kdu_name} | yq -r .config.replicaCount Runs the given command in the system and returns the RC and output. Running command 'osm vnf-show f8866f0e-1161-4ba5-aad2-20be63770388 --kdu ldap | yq -r .config.replicaCount 2>&1'. ${rc} = 0 ${stdout} = null ${rc} ${SUCCESS_RETURN_CODE} msg=${stdout} values=False Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${return} '${stdout}' == 'null' ${EMPTY} ${stdout} Sets variable based on the given condition. ${return} = ${return} ${count} = ${count} Logs the given message with the given level. ${count} ${REPLICA_COUNT} Fails if objects are unequal after converting them to integers. '' cannot be converted to an integer: ValueError: invalid literal for int() with base 10: '' Check that the number of replicas after the upgrade is the expected one. azure cluster_k8s daily k8s_04 regression sanity verify '' cannot be converted to an integer: ValueError: invalid literal for int() with base 10: '' ${NS_ID} msg=Network service instance is not available Fails unless the given variable exists within the current scope. ${ns_op_id} ${NS_NAME} ${ROLLBACK_ACTION} ${VNF_MEMBER_INDEX} ${KDU_NAME} Execute an action over the desired K8s NS. Parameters are given to this function in key=value format (one argument per key/value pair). Return the ID of the operation associated to the executed action. Examples of execution: ${ns_op_id}= Execute NS Action ${ns_name} ${ns_action} ${vnf_member_index} ${ns_op_id}= Execute NS Action ${ns_name} ${ns_action} ${vnf_member_index} ${param1}=${value1} ${param2}=${value2} ${params} ${EMPTY} Returns the given values which can then be assigned to a variables. ${params} = ${param} @{action_params} ${match} ${param_name} ${param_value} ${param} (.+)=(.+) msg=Syntax error in parameters Fails if ``string`` does not match ``pattern`` as a regular expression. ${match},${param_name},${param_value} Logs the given message with the given level. ${params} SEPARATOR= ${params} "${param_name}":"${param_value}", Catenates the given items together and returns the resulted string. ${osm_ns_action_command} osm ns-action --action_name ${ns_action} --vnf_name ${vnf_member_index} --kdu_name ${kdu_name} Returns the given values which can then be assigned to a variables. ${osm_ns_action_command} = osm ns-action --action_name rollback --vnf_name openldap --kdu_name ldap ${osm_ns_action_command} ${osm_ns_action_command} --params '{${params}}' Catenates the given items together and returns the resulted string. ${osm_ns_action_command} ${osm_ns_action_command} Returns the given values which can then be assigned to a variables. ${osm_ns_action_command} = osm ns-action --action_name rollback --vnf_name openldap --kdu_name ldap ${osm_ns_action_command} ${osm_ns_action_command} ${ns_name} Catenates the given items together and returns the resulted string. ${osm_ns_action_command} = osm ns-action --action_name rollback --vnf_name openldap --kdu_name ldap ldap ${rc} ${stdout} ${osm_ns_action_command} Runs the given command in the system and returns the RC and output. Running command 'osm ns-action --action_name rollback --vnf_name openldap --kdu_name ldap ldap 2>&1'. ${rc} = 0 ${stdout} = 3a67adc9-a533-4e98-8832-0c04a77fe7fe ${rc} ${SUCCESS_RETURN_CODE} msg=${stdout} values=False Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${NS_ACTION_MAX_WAIT_TIME} ${NS_ACTION_POL_TIME} Check For NS Operation Ended ${stdout} Runs the specified keyword and retries if it fails. ${stdout} Check wheter the status of the desired operation is "FAILED" or "COMPLETED". ${ns_operation_id} Verifies that the given item is not empty. Length is 36 ${rc} ${stdout} osm ns-op-show ${ns_operation_id} --literal | yq -r .operationState Runs the given command in the system and returns the RC and output. Running command 'osm ns-op-show 3a67adc9-a533-4e98-8832-0c04a77fe7fe --literal | yq -r .operationState 2>&1'. ${rc} = 0 ${stdout} = PROCESSING ${stdout} Logs the given message with the given level. PROCESSING ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} FAILED COMPLETED msg=Timeout waiting for ns-action with id ${ns_operation_id} values=False Fails if ``container`` does not contain any of the ``*items``. Timeout waiting for ns-action with id 3a67adc9-a533-4e98-8832-0c04a77fe7fe ${stdout} Check wheter the status of the desired operation is "FAILED" or "COMPLETED". ${ns_operation_id} Verifies that the given item is not empty. Length is 36 ${rc} ${stdout} osm ns-op-show ${ns_operation_id} --literal | yq -r .operationState Runs the given command in the system and returns the RC and output. Running command 'osm ns-op-show 3a67adc9-a533-4e98-8832-0c04a77fe7fe --literal | yq -r .operationState 2>&1'. ${rc} = 0 ${stdout} = FAILED ${stdout} Logs the given message with the given level. FAILED ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} FAILED COMPLETED msg=Timeout waiting for ns-action with id ${ns_operation_id} values=False Fails if ``container`` does not contain any of the ``*items``. ${stdout} Check wheter the status of the desired operation is "COMPLETED" or not. ${ns_operation_id} Verifies that the given item is not empty. Length is 36 ${rc} ${stdout} osm ns-op-show ${ns_operation_id} --literal | yq -r .operationState Runs the given command in the system and returns the RC and output. Running command 'osm ns-op-show 3a67adc9-a533-4e98-8832-0c04a77fe7fe --literal | yq -r .operationState 2>&1'. ${rc} = 0 ${stdout} = FAILED ${stdout} Logs the given message with the given level. FAILED ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} COMPLETED msg=The ns-action with id ${ns_operation_id} was not completed values=False Fails if ``container`` does not contain ``item`` one or more times. The ns-action with id 3a67adc9-a533-4e98-8832-0c04a77fe7fe was not completed ${stdout} ${ns_op_id} Logs the given message with the given level. Perform OSM action to rollback the previous upgrade of the CNF. azure cluster_k8s daily k8s_04 regression sanity verify The ns-action with id 3a67adc9-a533-4e98-8832-0c04a77fe7fe was not completed ${NS_ID} msg=Network service instance is not available Fails unless the given variable exists within the current scope. ${count} ${VNF_ID} ${KDU_NAME} Return the number of KDU replicas (empty if none) of a VNF instance. ${vnf_id} Verifies that the given item is not empty. Length is 36 ${kdu_name} Verifies that the given item is not empty. Length is 4 ${rc} ${stdout} osm vnf-show ${vnf_id} --kdu ${kdu_name} | yq -r .config.replicaCount Runs the given command in the system and returns the RC and output. Running command 'osm vnf-show f8866f0e-1161-4ba5-aad2-20be63770388 --kdu ldap | yq -r .config.replicaCount 2>&1'. ${rc} = 0 ${stdout} = null ${rc} ${SUCCESS_RETURN_CODE} msg=${stdout} values=False Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${return} '${stdout}' == 'null' ${EMPTY} ${stdout} Sets variable based on the given condition. ${return} = ${return} ${count} = ${count} Logs the given message with the given level. ${count} Verifies that the given item is empty. Length is 0 Check that the number of replcias after the rollback is the expected one. azure cluster_k8s daily k8s_04 regression sanity verify ${NS_NAME} Delete a NS instance. ${ns_delete_max_wait_time} ${ns_delete_max_wait_time} result_format=number Converts between supported `time formats`. ${ns_delete_max_wait_time} = 240.0 ${ns_delete_max_wait_time} ${ns_delete_max_wait_time} * ${VIM_TIMEOUT_MULTIPLIER} Evaluates the given expression in Python and returns the result. ${ns_delete_max_wait_time} = 240.0 ${ns_delete_max_wait_time} Logs the given message with the given level. 240.0 ${rc} ${stdout} osm ns-delete ${ns} Runs the given command in the system and returns the RC and output. Running command 'osm ns-delete ldap 2>&1'. ${rc} = 0 ${stdout} = Deletion in progress ${stdout} Logs the given message with the given level. Deletion in progress ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${ns_delete_max_wait_time} ${NS_DELETE_POL_TIME} Check For NS Instance To Be Deleted ${ns} Runs the specified keyword and retries if it fails. ${ns} Check if a given NS instance is not present in OSM. ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ ${rc} ${stdout} osm ns-list | awk '{print $2}' | grep ${ns} Runs the given command in the system and returns the RC and output. Running command 'osm ns-list | awk '{print $2}' | grep ldap 2>&1'. ${rc} = 0 ${stdout} = ldap ${rc},${stdout} Logs the given message with the given level. 0,ldap ${stdout} ${ns} Fails if objects are equal after converting them to strings. ldap == ldap ${ns} Check if a given NS instance is not present in OSM. ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ ${rc} ${stdout} osm ns-list | awk '{print $2}' | grep ${ns} Runs the given command in the system and returns the RC and output. Running command 'osm ns-list | awk '{print $2}' | grep ldap 2>&1'. ${rc} = 1 ${stdout} = ${rc},${stdout} Logs the given message with the given level. 1, ${stdout} ${ns} Fails if objects are equal after converting them to strings. Delete NS instance. azure cleanup cluster_k8s daily k8s_04 regression sanity ${NSD_NAME} Delete a NS package from OSM. ${rc} ${stdout} Run And Return Rc And Output osm nspkg-delete ${nsd_id} Runs the keyword and continues execution even if a failure occurs. osm nspkg-delete ${nsd_id} Runs the given command in the system and returns the RC and output. Running command 'osm nspkg-delete openldap_ns 2>&1'. ${rc} = 0 ${stdout} = Deleted ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} Logs the given message with the given level. Deleted ${NSD_DELETE_MAX_WAIT_TIME} ${NSD_DELETE_POL_TIME} Check For NSD ${nsd_id} Runs the specified keyword and retries if it fails. ${nsd_id} Check that a NS package exists in OSM. ${rc} ${stdout} osm nspkg-list | awk '{print $2}' | grep ${nsd_id} Runs the given command in the system and returns the RC and output. Running command 'osm nspkg-list | awk '{print $2}' | grep openldap_ns 2>&1'. ${rc} = 1 ${stdout} = ${rc},${stdout} Logs the given message with the given level. 1, ${stdout} ${nsd_id} Fails if objects are equal after converting them to strings. Delete NS package from OSM. azure cleanup cluster_k8s daily k8s_04 regression sanity ${VNFD_NAME} Delete a VNF package from OSM. ${rc} ${stdout} osm vnfpkg-delete ${vnfd_id} Runs the given command in the system and returns the RC and output. Running command 'osm vnfpkg-delete openldap_knf 2>&1'. ${rc} = 0 ${stdout} = Deleted ${stdout} Logs the given message with the given level. Deleted ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${VNFD_DELETE_MAX_WAIT_TIME} ${VNFD_DELETE_POL_TIME} Check For VNFD ${vnfd_id} Runs the specified keyword and retries if it fails. ${vnfd_id} Check that a VNF package exists in OSM. ${rc} ${stdout} osm vnfpkg-list | awk '{print $2}' | grep ${vnfd_id} Runs the given command in the system and returns the RC and output. Running command 'osm vnfpkg-list | awk '{print $2}' | grep openldap_knf 2>&1'. ${rc} = 1 ${stdout} = ${rc},${stdout} Logs the given message with the given level. 1, ${stdout} ${vnfd_id} Fails if objects are unequal after converting them to strings. ${stdout} ${vnfd_id} Fails if objects are equal after converting them to strings. Delete NF package from OSM. azure cleanup cluster_k8s daily k8s_04 regression sanity Suite Cleanup Runs the given keyword with the given arguments and ignores possible error. Test Suit Cleanup: Deleting Descriptor, instance and vim Delete NS ${NS_NAME} Runs the given keyword with the given arguments, if one or more tests failed. ${NS_NAME} Delete a NS instance. ${ns_delete_max_wait_time} ${ns_delete_max_wait_time} result_format=number Converts between supported `time formats`. ${ns_delete_max_wait_time} = 240.0 ${ns_delete_max_wait_time} ${ns_delete_max_wait_time} * ${VIM_TIMEOUT_MULTIPLIER} Evaluates the given expression in Python and returns the result. ${ns_delete_max_wait_time} = 240.0 ${ns_delete_max_wait_time} Logs the given message with the given level. 240.0 ${rc} ${stdout} osm ns-delete ${ns} Runs the given command in the system and returns the RC and output. Running command 'osm ns-delete ldap 2>&1'. ${rc} = 1 ${stdout} = ERROR: ns 'ldap' not found ${stdout} Logs the given message with the given level. ERROR: ns 'ldap' not found ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> 1 != 0 ${ns_delete_max_wait_time} ${NS_DELETE_POL_TIME} Check For NS Instance To Be Deleted ${ns} Runs the specified keyword and retries if it fails. ${ns} Check if a given NS instance is not present in OSM. ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ ${rc} ${stdout} osm ns-list | awk '{print $2}' | grep ${ns} Runs the given command in the system and returns the RC and output. Running command 'osm ns-list | awk '{print $2}' | grep ldap 2>&1'. ${rc} = 1 ${stdout} = ${rc},${stdout} Logs the given message with the given level. 1, ${stdout} ${ns} Fails if objects are equal after converting them to strings. Delete NSD ${NSD_NAME} Runs the given keyword with the given arguments, if one or more tests failed. ${NSD_NAME} Delete a NS package from OSM. ${rc} ${stdout} Run And Return Rc And Output osm nspkg-delete ${nsd_id} Runs the keyword and continues execution even if a failure occurs. osm nspkg-delete ${nsd_id} Runs the given command in the system and returns the RC and output. Running command 'osm nspkg-delete openldap_ns 2>&1'. ${rc} = 1 ${stdout} = ERROR: nsd openldap_ns not found ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> 1 != 0 ${stdout} Logs the given message with the given level. ERROR: nsd openldap_ns not found ${NSD_DELETE_MAX_WAIT_TIME} ${NSD_DELETE_POL_TIME} Check For NSD ${nsd_id} Runs the specified keyword and retries if it fails. ${nsd_id} Check that a NS package exists in OSM. ${rc} ${stdout} osm nspkg-list | awk '{print $2}' | grep ${nsd_id} Runs the given command in the system and returns the RC and output. Running command 'osm nspkg-list | awk '{print $2}' | grep openldap_ns 2>&1'. ${rc} = 1 ${stdout} = ${rc},${stdout} Logs the given message with the given level. 1, ${stdout} ${nsd_id} Fails if objects are equal after converting them to strings. Delete VNFD ${VNFD_NAME} Runs the given keyword with the given arguments, if one or more tests failed. ${VNFD_NAME} Delete a VNF package from OSM. ${rc} ${stdout} osm vnfpkg-delete ${vnfd_id} Runs the given command in the system and returns the RC and output. Running command 'osm vnfpkg-delete openldap_knf 2>&1'. ${rc} = 1 ${stdout} = ERROR: vnfd openldap_knf not found ${stdout} Logs the given message with the given level. ERROR: vnfd openldap_knf not found ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> 1 != 0 ${VNFD_DELETE_MAX_WAIT_TIME} ${VNFD_DELETE_POL_TIME} Check For VNFD ${vnfd_id} Runs the specified keyword and retries if it fails. ${vnfd_id} Check that a VNF package exists in OSM. ${rc} ${stdout} osm vnfpkg-list | awk '{print $2}' | grep ${vnfd_id} Runs the given command in the system and returns the RC and output. Running command 'osm vnfpkg-list | awk '{print $2}' | grep openldap_knf 2>&1'. ${rc} = 1 ${stdout} = ${rc},${stdout} Logs the given message with the given level. 1, ${stdout} ${vnfd_id} Fails if objects are unequal after converting them to strings. ${stdout} ${vnfd_id} Fails if objects are equal after converting them to strings. [K8s-04] Openldap Helm chart. Suite Preparation Runs the given keyword with the given arguments and ignores possible error. Test Suite Preparation: Setting Prometheus Testsuite Variables Set Testsuite Prometheus Variables to be used in subsequent test cases ${local_prometheus_host} OSM_HOSTNAME Returns the value of an environment variable with the given name. ${PROMETHEUS_HOST} ${local_prometheus_host} Makes a variable available everywhere within the scope of the current suite. ${PROMETHEUS_HOST} 9091 Makes a variable available everywhere within the scope of the current suite. Invalid IF condition: Evaluating expression '172.21.249.192 == 'UNKNOWN'' failed: SyntaxError: invalid syntax (<string>, line 1) Variables in the original expression '${PROMETHEUS_HOST} == 'UNKNOWN'' were resolved before the expression was evaluated. Try using '$PROMETHEUS_HOST == 'UNKNOWN'' syntax to avoid that. See Evaluating Expressions appendix in Robot Framework User Guide for more details. ${PROMETHEUS_PORT} Logs the given message with the given level. ${PROMETHEUS_HOST} Logs the given message with the given level. ${PROMETHEUS_USER} Logs the given message with the given level. ${PROMETHEUS_PASSWORD} Logs the given message with the given level. '%{PACKAGES_FOLDER}/${VNFD_PKG}' Onboards ("creates") a NF Package into OSM. - Parameters: - vnfd_pkg: Name (and location) of the NF Package - overrides (optional): String with options to override the EPA and/or interface properties of the Package. This is very useful to allow to deploy e.g. non-EPA packages in EPA VIMs (or vice-versa). Valid strings are the same as in the command. E.g.: - `--override-epa`: adds EPA attributes to all VDUs. - `--override-nonepa`: removes all EPA attributes from all VDUs. - `--override-paravirt`: converts all interfaces to `PARAVIRT`. This one can be combined with the others above (e.g. '--override-nonepa --override-paravirt'). - Relevant environment variables: - OVERRIDES: If the environment variable "OVERRIDES" exists, it prevails over the value in the argument. This is often more convenient to enforce the same behaviour for every test run in a given VIM. ${overrides} OVERRIDES default=${overrides} Returns the value of an environment variable with the given name. ${overrides} = ${rc} ${stdout} osm vnfpkg-create ${overrides} ${vnfd_pkg} Runs the given command in the system and returns the RC and output. Running command 'osm vnfpkg-create '/robot-systest/osm-packages/hackfest_basic_metrics_vnf' 2>&1'. ${rc} = 0 ${stdout} = Validating package /robot-systest/osm-packages/hackfest_basic_metrics_vnf Validation OK List of charms in the descriptor: set() Adding File: hackfest_basic_metrics_vnf Package created: /robot-systest/... ${stdout} Logs the given message with the given level. Validating package /robot-systest/osm-packages/hackfest_basic_metrics_vnf Validation OK List of charms in the descriptor: set() Adding File: hackfest_basic_metrics_vnf Package created: /robot-systest/osm-packages/hackfest_basic_metrics_vnf.tar.gz Uploading package /robot-systest/osm-packages/hackfest_basic_metrics_vnf.tar.gz 4b8f801c-d851-4ba0-a096-802f4d2d2919 ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${lines} ${stdout} Returns and logs the number of lines in the given string. 7 lines ${lines} = 7 ${last} ${lines} - 1 Evaluates the given expression in Python and returns the result. ${last} = 6 ${id} ${stdout} ${last} Returns the specified line from the given ``string``. ${id} = 4b8f801c-d851-4ba0-a096-802f4d2d2919 ${id} Upload VNF package for the testsuite. azure cluster_sa daily regression sa_02 sanity ${rc} ${stdout} osm vnfpkg-show ${VNFD_NAME} --literal | yq -r '.df[0]."scaling-aspect"[0]."scaling-policy"[0]."scaling-criteria"[0]."scale-out-threshold"' Runs the given command in the system and returns the RC and output. Running command 'osm vnfpkg-show hackfest_basic_metrics-vnf --literal | yq -r '.df[0]."scaling-aspect"[0]."scaling-policy"[0]."scaling-criteria"[0]."scale-out-threshold"' 2>&1'. ${rc} = 0 ${stdout} = 60.0000000000 ${rc} ${SUCCESS_RETURN_CODE} msg=${stdout} values=False Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${scaleout_threshold} ${stdout} Converts the given item to a floating point number. ${scaleout_threshold} = 60.0 ${METRIC_THRESHOLD} ${scaleout_threshold} Makes a variable available everywhere within the scope of the current suite. ${METRIC_THRESHOLD} = 60.0 ${METRIC_THRESHOLD} Logs the given message with the given level. 60.0 ${rc} ${stdout} osm vnfpkg-show ${VNFD_NAME} --literal | yq -r '.df[0]."scaling-aspect"[0]."scaling-policy"[0]."threshold-time"' Runs the given command in the system and returns the RC and output. Running command 'osm vnfpkg-show hackfest_basic_metrics-vnf --literal | yq -r '.df[0]."scaling-aspect"[0]."scaling-policy"[0]."threshold-time"' 2>&1'. ${rc} = 0 ${stdout} = 1 ${rc} ${SUCCESS_RETURN_CODE} msg=${stdout} values=False Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${threshold_time_value} ${stdout} Converts the given item to a floating point number. ${threshold_time_value} = 1.0 ${THRESHOLD_TIME} ${threshold_time_value} Makes a variable available everywhere within the scope of the current suite. ${THRESHOLD_TIME} = 1.0 ${THRESHOLD_TIME} Logs the given message with the given level. 1.0 Read metric threshold and threshold time from VNF descriptor. azure cluster_sa daily regression sa_02 sanity '%{PACKAGES_FOLDER}/${NSD_PKG}' Upload a NS package to OSM and return the id. ${rc} ${stdout} osm nspkg-create ${nsd_pkg} Runs the given command in the system and returns the RC and output. Running command 'osm nspkg-create '/robot-systest/osm-packages/hackfest_basic_metrics_ns' 2>&1'. ${rc} = 0 ${stdout} = Validating package /robot-systest/osm-packages/hackfest_basic_metrics_ns Validation OK List of charms in the descriptor: set() Adding File: hackfest_basic_metrics_ns Package created: /robot-systest/os... ${stdout} Logs the given message with the given level. Validating package /robot-systest/osm-packages/hackfest_basic_metrics_ns Validation OK List of charms in the descriptor: set() Adding File: hackfest_basic_metrics_ns Package created: /robot-systest/osm-packages/hackfest_basic_metrics_ns.tar.gz eb52550b-6533-49a0-8d37-6b68a8725d50 ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${lines} ${stdout} Returns and logs the number of lines in the given string. 6 lines ${lines} = 6 ${last} ${lines} - 1 Evaluates the given expression in Python and returns the result. ${last} = 5 ${id} ${stdout} ${last} Returns the specified line from the given ``string``. ${id} = eb52550b-6533-49a0-8d37-6b68a8725d50 ${id} Upload NS package for the testsuite. azure cluster_sa daily regression sa_02 sanity ${id} ${NSD_NAME} %{VIM_TARGET} ${NS_NAME} ${NS_CONFIG} ${PUBLICKEY} Launch the instantation of a NS and verify in a loop that the NS instance is successfully created in a given time, and return the NS instance id. ${ns_launch_max_wait_time} ${ns_launch_max_wait_time} result_format=number Converts between supported `time formats`. ${ns_launch_max_wait_time} = 300.0 ${ns_launch_max_wait_time} ${ns_launch_max_wait_time} * ${VIM_TIMEOUT_MULTIPLIER} Evaluates the given expression in Python and returns the result. ${ns_launch_max_wait_time} = 300.0 ${ns_launch_max_wait_time} Logs the given message with the given level. 300.0 ${config_attr} '${ns_config}'!='${EMPTY}' --config '${ns_config}' ${EMPTY} Sets variable based on the given condition. ${config_attr} = --config '{vld: [ {name: mgmtnet, vim-network-name: osm-ext} ] }' ${sshkeys_attr} '${publickey}'!='${EMPTY}' --ssh_keys ${publickey} ${EMPTY} Sets variable based on the given condition. ${sshkeys_attr} = --ssh_keys /root/.ssh/id_rsa.pub ${config_file_attr} '${config_file}'!='${EMPTY}' --config_file '${config_file}' ${EMPTY} Sets variable based on the given condition. ${config_file_attr} = ${ns_id} ${ns_name} ${nsd} ${vim_name} ${config_attr} ${sshkeys_attr} ${config_file_attr} Launch the instantation of a NS, and return the NS instance id. ${rc} ${stdout} osm ns-create --ns_name ${ns_name} --nsd_name ${nsd} --vim_account ${vim_name} ${ns_extra_args} Runs the given command in the system and returns the RC and output. Running command 'osm ns-create --ns_name sa_02 --nsd_name hackfest_basic-ns-metrics --vim_account osm --config '{vld: [ {name: mgmtnet, vim-network-name: osm-ext} ] }' --ssh_keys /root/.ssh/id_rsa.pub 2>&1'. ${rc} = 0 ${stdout} = 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${stdout} Logs the given message with the given level. 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} ${ns_id} = 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${ns_id} Logs the given message with the given level. 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${ns_launch_max_wait_time} ${NS_LAUNCH_POL_TIME} Check For NS Instance To Configured ${ns_name} Runs the specified keyword and retries if it fails. ${ns_name} Check if a given NS instance has completed the instantiation, no matter if it succeeded (the status should be READY or BROKEN). ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ ${rc} ${stdout} osm ns-list --filter name="${ns_name}" Runs the given command in the system and returns the RC and output. Running command 'osm ns-list --filter name="sa_02" 2>&1'. ${rc} = 0 ${stdout} = +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ns instance name | id ... ${rc},${stdout} Logs the given message with the given level. 0,+------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ns instance name | id | date | ns state | current operation | error details | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | sa_02 | 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 | 2024-05-03T12:51:43 | BUILDING | INSTANTIATING (40339cbf-0d16-43a8-83c6-56d57fa8c3cf) | N/A | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID" ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} READY BROKEN Fails if ``container`` does not contain any of the ``*items``. '+------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | ns instance name | id | date | ns state | current operation | error details | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ | sa_02 | 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 | 2024-05-03T12:51:43 | BUILDING | INSTANTIATING (40339cbf-0d16-43a8-83c6-56d57fa8c3cf) | N/A | +------------------+--------------------------------------+---------------------+----------+------------------------------------------------------+---------------+ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID"' does not contain any of 'READY' or 'BROKEN' ${ns_name} Check if a given NS instance has completed the instantiation, no matter if it succeeded (the status should be READY or BROKEN). ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+---------------------------------------+--------+------------------------+-------------+-------------------------+ | ID | Name... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+---------------------------------------+--------+------------------------+-------------+-------------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+---------------------------------------+--------+------------------------+-------------+-------------------------+ | 9d5995f1-00e0-4f9c-a0f0-0e625533fecd | sa_02-vnf-hackfest_basic_metrics-VM-0 | ACTIVE | osm-ext=172.21.248.252 | ubuntu20.04 | simple_requires-1-1-flv | | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+---------------------------------------+--------+------------------------+-------------+-------------------------+ ${rc} ${stdout} osm ns-list --filter name="${ns_name}" Runs the given command in the system and returns the RC and output. Running command 'osm ns-list --filter name="sa_02" 2>&1'. ${rc} = 0 ${stdout} = +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | ns instance name | id | date ... ${rc},${stdout} Logs the given message with the given level. 0,+------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | ns instance name | id | date | ns state | current operation | error details | +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | sa_02 | 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 | 2024-05-03T12:51:43 | READY | IDLE (None) | N/A | +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID" ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} READY BROKEN Fails if ``container`` does not contain any of the ``*items``. ${ns_name} Check if a given NS instance has not failed in the instantiation (the status should not be BROKEN). ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+---------------------------------------+--------+------------------------+-------------+-------------------------+ | ID | Name... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+---------------------------------------+--------+------------------------+-------------+-------------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+---------------------------------------+--------+------------------------+-------------+-------------------------+ | 9d5995f1-00e0-4f9c-a0f0-0e625533fecd | sa_02-vnf-hackfest_basic_metrics-VM-0 | ACTIVE | osm-ext=172.21.248.252 | ubuntu20.04 | simple_requires-1-1-flv | | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+---------------------------------------+--------+------------------------+-------------+-------------------------+ ${rc} ${stdout} osm ns-list --filter name="${ns_name}" Runs the given command in the system and returns the RC and output. Running command 'osm ns-list --filter name="sa_02" 2>&1'. ${rc} = 0 ${stdout} = +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | ns instance name | id | date ... ${rc},${stdout} Logs the given message with the given level. 0,+------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | ns instance name | id | date | ns state | current operation | error details | +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ | sa_02 | 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 | 2024-05-03T12:51:43 | READY | IDLE (None) | N/A | +------------------+--------------------------------------+---------------------+----------+-------------------+---------------+ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID" ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} BROKEN Fails if ``container`` contains ``item`` one or more times. ${ns_id} ${id} = 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${NS_ID} ${id} Makes a variable available everywhere within the scope of the current suite. ${NS_ID} = 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 Instantiate the NS for the testsuite. azure cluster_sa daily regression sa_02 sanity @{vnfr_list} ${NS_ID} Return a list with the IDs of the VNF records of a NS instance. ${ns_id} Verifies that the given item is not empty. Length is 36 ${rc} ${stdout} osm vnf-list --ns ${ns_id} | grep ${ns_id} | awk '{print $2}' 2>&1 Runs the given command in the system and returns the RC and output. Running command 'osm vnf-list --ns 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 | grep 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 | awk '{print $2}' 2>&1'. ${rc} = 0 ${stdout} = 66454797-34ff-43f1-809c-9812bc0ef32a ${rc} ${SUCCESS_RETURN_CODE} msg=${stdout} values=False Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> @{vdur} ${stdout} Splits the ``string`` using ``separator`` as a delimiter string. @{vdur} = [ 66454797-34ff-43f1-809c-9812bc0ef32a ] @{vdur} @{vnfr_list} = [ 66454797-34ff-43f1-809c-9812bc0ef32a ] ${vnfr_list} Logs the length and contents of the ``list`` using given ``level``. List has one item: 66454797-34ff-43f1-809c-9812bc0ef32a ${VNF_ID} ${vnfr_list}[0] Makes a variable available everywhere within the scope of the current suite. ${VNF_ID} = 66454797-34ff-43f1-809c-9812bc0ef32a Retrieve VNF instance id to be used later on. azure cluster_sa daily regression sa_02 sanity ${ip_addr} ${NS_ID} ${VNF_MEMBER_INDEX} Get the mgmt IP address of a member VNF in a NS instance, and return it. ${ns_id} Verifies that the given item is not empty. Length is 36 ${vnf_member_index} Verifies that the given item is not empty. Length is 3 ${rc} ${stdout} osm vnf-list --filter member-vnf-index-ref=${vnf_member_index} | grep ${ns_id} | awk '{print $14}' 2>&1 Runs the given command in the system and returns the RC and output. Running command 'osm vnf-list --filter member-vnf-index-ref=vnf | grep 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 | awk '{print $14}' 2>&1'. ${rc} = 0 ${stdout} = 172.21.248.252 ${stdout} Logs the given message with the given level. 172.21.248.252 ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} ${ip_addr} = 172.21.248.252 ${ip_addr} Logs the given message with the given level. 172.21.248.252 ${VNF_IP_ADDR} ${ip_addr} Makes a variable available everywhere within the scope of the current suite. ${VNF_IP_ADDR} = 172.21.248.252 Get the mgmt IP address of the VNF to be used in later tests. azure cluster_sa daily regression sa_02 sanity ${PROMETHEUS_POLL_RETRIES} msg=Metric polling retries is not available Fails unless the given variable exists within the current scope. ${PROMETHEUS_POLL_TIMEOUT} msg=Metric polling timeout is not available Fails unless the given variable exists within the current scope. ${PROMETHEUS_HOST} msg=Prometheus address is not available Fails unless the given variable exists within the current scope. ${PROMETHEUS_PORT} msg=Prometheus port is not available Fails unless the given variable exists within the current scope. ${METRIC_NAME} msg=Prometheus metric name is not available Fails unless the given variable exists within the current scope. ${metric_filter} ns_id=${NS_ID} Returns the given values which can then be assigned to a variables. ${metric_filter} = ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${metric_value} ${PROMETHEUS_POLL_RETRIES} ${PROMETHEUS_POLL_TIMEOUT} Get Metric ${PROMETHEUS_HOST} ${PROMETHEUS_PORT} ${PROMETHEUS_USER} ${PROMETHEUS_PASSWORD} ${METRIC_NAME} ${metric_filter} Runs the specified keyword and retries if it fails. ${PROMETHEUS_HOST} ${PROMETHEUS_PORT} ${PROMETHEUS_USER} ${PROMETHEUS_PASSWORD} ${METRIC_NAME} ${metric_filter} Get the instant value of a metric from Prometheus using multiple filter parameters. The filter parameters are given to this function in key=value format (one argument per key/value pair). Fails if the metric is not found or has multiple values. Examples of execution: ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${param1}=${value1} ${param2}=${value2} ${filter} ${EMPTY} Returns the given values which can then be assigned to a variables. ${filter} = ${param} @{filter_parameters} ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match} ${param_name} ${param_value} ${param} (.+)=(.+) msg=Syntax error in filter parameters Fails if ``string`` does not match ``pattern`` as a regular expression. ${match} = ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${param_name} = ns_id ${param_value} = 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match},${param_name},${param_value} Logs the given message with the given level. ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798,ns_id,6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${filter} SEPARATOR= ${filter} ${param_name}="${param_value}", Catenates the given items together and returns the resulted string. ${filter} = ns_id="6aaa9e4c-75f5-4ae1-b0df-bea12f900798", ${resp} ${prometheus_ip} ${prometheus_port} ${prometheus_user} ${prometheus_password} query=${metric}{${filter}} Execute a Prometheus Instant Query using HTTP API. Return an inline json with the result of the query. The requested URL is the next: http://${prometheus_ip}:${prometheus_port}/api/v1/query?${querystring} ${auth} ${prometheus_user} ${prometheus_password} Returns a list containing given items. ${auth} = ['""', '""'] ${auth} None Returns the given values which can then be assigned to a variables. prometheus http://${prometheus_ip}:${prometheus_port} timeout=${TIMEOUT} max_retries=${MAX_RETRIES} verify=false auth=${auth} Create Session: create a HTTP session to a server Creating Session using : alias=prometheus, url=http://172.21.249.192:9091, headers={}, cookies={}, auth=<requests.auth.HTTPBasicAuth object at 0x7ff37dbd5780>, timeout=30, proxies=None, verify=False, debug=0 ${resp} prometheus /api/v1/query?${querystring} timeout=${TIMEOUT} Sends a GET request on a previously created HTTP Session. GET Request : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D path_url=/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D headers={'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic IiI6IiI='} body=None GET Response : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D status=200, reason=OK headers={'Content-Encoding': 'gzip', 'Content-Type': 'application/json', 'Date': 'Fri, 03 May 2024 12:52:26 GMT', 'Content-Length': '87'} body={"status":"success","data":{"resultType":"vector","result":[]}} ${resp} = <Response [200]> 200 ${resp} Fails if response status code is different than the expected. ${resp.json()} ${resp} = {'status': 'success', 'data': {'resultType': 'vector', 'result': []}} ${result_list} ${resp["data"]["result"]} Converts the given ``item`` to a Python ``list`` type. ${result_list} = [] ${results} ${result_list} Returns and logs the length of the given item as an integer. Length is 0 ${results} = 0 0 ${results} msg=Metric ${metric} not found values=false Fails if objects are equal after converting them to real numbers. Argument types are: <class 'str'> <class 'int'> Metric osm_cpu_utilization not found 1 ${results} msg=Metric ${metric} with multiple values values=false Fails if objects are unequal after converting them to integers. ${result_list[0]["value"][1]} ${PROMETHEUS_HOST} ${PROMETHEUS_PORT} ${PROMETHEUS_USER} ${PROMETHEUS_PASSWORD} ${METRIC_NAME} ${metric_filter} Get the instant value of a metric from Prometheus using multiple filter parameters. The filter parameters are given to this function in key=value format (one argument per key/value pair). Fails if the metric is not found or has multiple values. Examples of execution: ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${param1}=${value1} ${param2}=${value2} ${filter} ${EMPTY} Returns the given values which can then be assigned to a variables. ${filter} = ${param} @{filter_parameters} ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match} ${param_name} ${param_value} ${param} (.+)=(.+) msg=Syntax error in filter parameters Fails if ``string`` does not match ``pattern`` as a regular expression. ${match} = ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${param_name} = ns_id ${param_value} = 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match},${param_name},${param_value} Logs the given message with the given level. ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798,ns_id,6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${filter} SEPARATOR= ${filter} ${param_name}="${param_value}", Catenates the given items together and returns the resulted string. ${filter} = ns_id="6aaa9e4c-75f5-4ae1-b0df-bea12f900798", ${resp} ${prometheus_ip} ${prometheus_port} ${prometheus_user} ${prometheus_password} query=${metric}{${filter}} Execute a Prometheus Instant Query using HTTP API. Return an inline json with the result of the query. The requested URL is the next: http://${prometheus_ip}:${prometheus_port}/api/v1/query?${querystring} ${auth} ${prometheus_user} ${prometheus_password} Returns a list containing given items. ${auth} = ['""', '""'] ${auth} None Returns the given values which can then be assigned to a variables. prometheus http://${prometheus_ip}:${prometheus_port} timeout=${TIMEOUT} max_retries=${MAX_RETRIES} verify=false auth=${auth} Create Session: create a HTTP session to a server Creating Session using : alias=prometheus, url=http://172.21.249.192:9091, headers={}, cookies={}, auth=<requests.auth.HTTPBasicAuth object at 0x7ff37dbf1330>, timeout=30, proxies=None, verify=False, debug=0 ${resp} prometheus /api/v1/query?${querystring} timeout=${TIMEOUT} Sends a GET request on a previously created HTTP Session. GET Request : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D path_url=/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D headers={'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic IiI6IiI='} body=None GET Response : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D status=200, reason=OK headers={'Content-Encoding': 'gzip', 'Content-Type': 'application/json', 'Date': 'Fri, 03 May 2024 12:53:26 GMT', 'Content-Length': '87'} body={"status":"success","data":{"resultType":"vector","result":[]}} ${resp} = <Response [200]> 200 ${resp} Fails if response status code is different than the expected. ${resp.json()} ${resp} = {'status': 'success', 'data': {'resultType': 'vector', 'result': []}} ${result_list} ${resp["data"]["result"]} Converts the given ``item`` to a Python ``list`` type. ${result_list} = [] ${results} ${result_list} Returns and logs the length of the given item as an integer. Length is 0 ${results} = 0 0 ${results} msg=Metric ${metric} not found values=false Fails if objects are equal after converting them to real numbers. Argument types are: <class 'str'> <class 'int'> Metric osm_cpu_utilization not found 1 ${results} msg=Metric ${metric} with multiple values values=false Fails if objects are unequal after converting them to integers. ${result_list[0]["value"][1]} ${PROMETHEUS_HOST} ${PROMETHEUS_PORT} ${PROMETHEUS_USER} ${PROMETHEUS_PASSWORD} ${METRIC_NAME} ${metric_filter} Get the instant value of a metric from Prometheus using multiple filter parameters. The filter parameters are given to this function in key=value format (one argument per key/value pair). Fails if the metric is not found or has multiple values. Examples of execution: ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${param1}=${value1} ${param2}=${value2} ${filter} ${EMPTY} Returns the given values which can then be assigned to a variables. ${filter} = ${param} @{filter_parameters} ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match} ${param_name} ${param_value} ${param} (.+)=(.+) msg=Syntax error in filter parameters Fails if ``string`` does not match ``pattern`` as a regular expression. ${match} = ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${param_name} = ns_id ${param_value} = 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match},${param_name},${param_value} Logs the given message with the given level. ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798,ns_id,6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${filter} SEPARATOR= ${filter} ${param_name}="${param_value}", Catenates the given items together and returns the resulted string. ${filter} = ns_id="6aaa9e4c-75f5-4ae1-b0df-bea12f900798", ${resp} ${prometheus_ip} ${prometheus_port} ${prometheus_user} ${prometheus_password} query=${metric}{${filter}} Execute a Prometheus Instant Query using HTTP API. Return an inline json with the result of the query. The requested URL is the next: http://${prometheus_ip}:${prometheus_port}/api/v1/query?${querystring} ${auth} ${prometheus_user} ${prometheus_password} Returns a list containing given items. ${auth} = ['""', '""'] ${auth} None Returns the given values which can then be assigned to a variables. prometheus http://${prometheus_ip}:${prometheus_port} timeout=${TIMEOUT} max_retries=${MAX_RETRIES} verify=false auth=${auth} Create Session: create a HTTP session to a server Creating Session using : alias=prometheus, url=http://172.21.249.192:9091, headers={}, cookies={}, auth=<requests.auth.HTTPBasicAuth object at 0x7ff37dbd79d0>, timeout=30, proxies=None, verify=False, debug=0 ${resp} prometheus /api/v1/query?${querystring} timeout=${TIMEOUT} Sends a GET request on a previously created HTTP Session. GET Request : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D path_url=/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D headers={'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic IiI6IiI='} body=None GET Response : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D status=200, reason=OK headers={'Content-Encoding': 'gzip', 'Content-Type': 'application/json', 'Date': 'Fri, 03 May 2024 12:54:26 GMT', 'Content-Length': '87'} body={"status":"success","data":{"resultType":"vector","result":[]}} ${resp} = <Response [200]> 200 ${resp} Fails if response status code is different than the expected. ${resp.json()} ${resp} = {'status': 'success', 'data': {'resultType': 'vector', 'result': []}} ${result_list} ${resp["data"]["result"]} Converts the given ``item`` to a Python ``list`` type. ${result_list} = [] ${results} ${result_list} Returns and logs the length of the given item as an integer. Length is 0 ${results} = 0 0 ${results} msg=Metric ${metric} not found values=false Fails if objects are equal after converting them to real numbers. Argument types are: <class 'str'> <class 'int'> Metric osm_cpu_utilization not found 1 ${results} msg=Metric ${metric} with multiple values values=false Fails if objects are unequal after converting them to integers. ${result_list[0]["value"][1]} ${PROMETHEUS_HOST} ${PROMETHEUS_PORT} ${PROMETHEUS_USER} ${PROMETHEUS_PASSWORD} ${METRIC_NAME} ${metric_filter} Get the instant value of a metric from Prometheus using multiple filter parameters. The filter parameters are given to this function in key=value format (one argument per key/value pair). Fails if the metric is not found or has multiple values. Examples of execution: ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${param1}=${value1} ${param2}=${value2} ${filter} ${EMPTY} Returns the given values which can then be assigned to a variables. ${filter} = ${param} @{filter_parameters} ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match} ${param_name} ${param_value} ${param} (.+)=(.+) msg=Syntax error in filter parameters Fails if ``string`` does not match ``pattern`` as a regular expression. ${match} = ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${param_name} = ns_id ${param_value} = 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match},${param_name},${param_value} Logs the given message with the given level. ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798,ns_id,6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${filter} SEPARATOR= ${filter} ${param_name}="${param_value}", Catenates the given items together and returns the resulted string. ${filter} = ns_id="6aaa9e4c-75f5-4ae1-b0df-bea12f900798", ${resp} ${prometheus_ip} ${prometheus_port} ${prometheus_user} ${prometheus_password} query=${metric}{${filter}} Execute a Prometheus Instant Query using HTTP API. Return an inline json with the result of the query. The requested URL is the next: http://${prometheus_ip}:${prometheus_port}/api/v1/query?${querystring} ${auth} ${prometheus_user} ${prometheus_password} Returns a list containing given items. ${auth} = ['""', '""'] ${auth} None Returns the given values which can then be assigned to a variables. prometheus http://${prometheus_ip}:${prometheus_port} timeout=${TIMEOUT} max_retries=${MAX_RETRIES} verify=false auth=${auth} Create Session: create a HTTP session to a server Creating Session using : alias=prometheus, url=http://172.21.249.192:9091, headers={}, cookies={}, auth=<requests.auth.HTTPBasicAuth object at 0x7ff37dc30040>, timeout=30, proxies=None, verify=False, debug=0 ${resp} prometheus /api/v1/query?${querystring} timeout=${TIMEOUT} Sends a GET request on a previously created HTTP Session. GET Request : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D path_url=/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D headers={'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic IiI6IiI='} body=None GET Response : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D status=200, reason=OK headers={'Content-Encoding': 'gzip', 'Content-Type': 'application/json', 'Date': 'Fri, 03 May 2024 12:55:26 GMT', 'Content-Length': '357'} body={"status":"success","data":{"resultType":"vector","result":[{"metric":{"__name__":"osm_cpu_utilization","job":"airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf","metric_id":"vnf_cpu_util","ns_id":"6aaa9e4c-75f5-4ae1-b0df-bea12f900798","project_id":"fdd32cb5-0917-4202-a1f2-4b10e9b9656a","vdu_id":"hackfest_basic_metrics-VM","vdu_name":"sa_02-vnf-hackfest_basic_metrics-VM-0","vim_id":"30490a2c-1d18-4624-892a-1695d6c3d5bf","vm_id":"9d5995f1-00e0-4f9c-a0f0-0e625533fecd","vnf_member_index":"vnf"},"value":[1714740926.150,"0.18333333333333332"]}]}} ${resp} = <Response [200]> 200 ${resp} Fails if response status code is different than the expected. ${resp.json()} ${resp} = {'status': 'success', 'data': {'resultType': 'vector', 'result': [{'metric': {'__name__': 'osm_cpu_utilization', 'job': 'airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf', 'metric_id': 'vnf... ${result_list} ${resp["data"]["result"]} Converts the given ``item`` to a Python ``list`` type. ${result_list} = [{'metric': {'__name__': 'osm_cpu_utilization', 'job': 'airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf', 'metric_id': 'vnf_cpu_util', 'ns_id': '6aaa9e4c-75f5-4ae1-b0df-bea12f900798', 'pro... ${results} ${result_list} Returns and logs the length of the given item as an integer. Length is 1 ${results} = 1 0 ${results} msg=Metric ${metric} not found values=false Fails if objects are equal after converting them to real numbers. Argument types are: <class 'str'> <class 'int'> 1 ${results} msg=Metric ${metric} with multiple values values=false Fails if objects are unequal after converting them to integers. Argument types are: <class 'str'> <class 'int'> ${result_list[0]["value"][1]} ${metric_value} = 0.18333333333333332 msg=The metric '${METRIC_NAME}' value is '${metric_value}' Fails the test with the given message and optionally alters its tags. msg=The metric '${METRIC_NAME}' value is higher than '${METRIC_THRESHOLD}' before scaling Fails the test with the given message and optionally alters its tags. Get from Prometheus the VIM metric associated to the VNF auto-scaling group. azure cluster_sa daily regression sa_02 sanity ${PRIVATEKEY} msg=SSH private key not available Fails unless the given variable exists within the current scope. ${VNF_IP_ADDR} ${USERNAME} ${PASSWORD} ${PRIVATEKEY} for i in {1..9}; do yes &> /dev/null & done Execute via SSH a command in a remote host and, if the command succeeds, return the output. ${host} Opens a new SSH connection to the given ``host`` and ``port``. ${username} ${password} Logs into the SSH server with the given ``username`` and ``password``. Logging into '172.21.248.252:22' as 'ubuntu'. Read output: Welcome to Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-107-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage System information as of Fri May 3 12:55:26 UTC 2024 System load: 0.04 Processes: 104 Usage of /: 14.0% of 9.52GB Users logged in: 0 Memory usage: 20% IPv4 address for ens3: 172.21.248.252 Swap usage: 0% 1 update can be applied immediately. To see these additional updates run: apt list --upgradable The list of available updates is more than a week old. To check for new updates run: sudo apt update The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details. ubuntu@sa-02-vnf-hackfest-basic-metrics-vm-0:~$ ${username} ${privatekey} Logs into the SSH server using key-based authentication. ${stdout} ${rc} ${command} return_rc=True return_stdout=True Executes ``command`` on the remote machine and returns its outputs. Executing command 'for i in {1..9}; do yes &> /dev/null & done'. Command exited with return code 0. ${stdout} = ${rc} = 0 ${rc} Logs the given message with the given level. 0 ${stdout} Logs the given message with the given level. Closes all open connections. ${rc} 0 Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} Connect to the VNF via SSH and force VIM metric to increase. azure cluster_sa daily regression sa_02 sanity ${PROMETHEUS_POLL_RETRIES} msg=Metric polling retries is not available Fails unless the given variable exists within the current scope. ${PROMETHEUS_POLL_TIMEOUT} msg=Metric polling timeout is not available Fails unless the given variable exists within the current scope. ${PROMETHEUS_POLL_RETRIES} ${PROMETHEUS_POLL_TIMEOUT} Check VIM-based Metric Exceeds Threshold Runs the specified keyword and retries if it fails. Auxiliar keyword to check if metric exceeds threshold ${PROMETHEUS_HOST} msg=Prometheus address is not available Fails unless the given variable exists within the current scope. ${PROMETHEUS_PORT} msg=Prometheus port is not available Fails unless the given variable exists within the current scope. ${METRIC_NAME} msg=Prometheus metric name is not available Fails unless the given variable exists within the current scope. ${metric_filter} ns_id=${NS_ID} Returns the given values which can then be assigned to a variables. ${metric_filter} = ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${metric_value} ${PROMETHEUS_HOST} ${PROMETHEUS_PORT} ${PROMETHEUS_USER} ${PROMETHEUS_PASSWORD} ${METRIC_NAME} ${metric_filter} Get the instant value of a metric from Prometheus using multiple filter parameters. The filter parameters are given to this function in key=value format (one argument per key/value pair). Fails if the metric is not found or has multiple values. Examples of execution: ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${param1}=${value1} ${param2}=${value2} ${filter} ${EMPTY} Returns the given values which can then be assigned to a variables. ${filter} = ${param} @{filter_parameters} ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match} ${param_name} ${param_value} ${param} (.+)=(.+) msg=Syntax error in filter parameters Fails if ``string`` does not match ``pattern`` as a regular expression. ${match} = ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${param_name} = ns_id ${param_value} = 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match},${param_name},${param_value} Logs the given message with the given level. ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798,ns_id,6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${filter} SEPARATOR= ${filter} ${param_name}="${param_value}", Catenates the given items together and returns the resulted string. ${filter} = ns_id="6aaa9e4c-75f5-4ae1-b0df-bea12f900798", ${resp} ${prometheus_ip} ${prometheus_port} ${prometheus_user} ${prometheus_password} query=${metric}{${filter}} Execute a Prometheus Instant Query using HTTP API. Return an inline json with the result of the query. The requested URL is the next: http://${prometheus_ip}:${prometheus_port}/api/v1/query?${querystring} ${auth} ${prometheus_user} ${prometheus_password} Returns a list containing given items. ${auth} = ['""', '""'] ${auth} None Returns the given values which can then be assigned to a variables. prometheus http://${prometheus_ip}:${prometheus_port} timeout=${TIMEOUT} max_retries=${MAX_RETRIES} verify=false auth=${auth} Create Session: create a HTTP session to a server Creating Session using : alias=prometheus, url=http://172.21.249.192:9091, headers={}, cookies={}, auth=<requests.auth.HTTPBasicAuth object at 0x7ff37dc30dc0>, timeout=30, proxies=None, verify=False, debug=0 ${resp} prometheus /api/v1/query?${querystring} timeout=${TIMEOUT} Sends a GET request on a previously created HTTP Session. GET Request : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D path_url=/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D headers={'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic IiI6IiI='} body=None GET Response : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D status=200, reason=OK headers={'Content-Encoding': 'gzip', 'Content-Type': 'application/json', 'Date': 'Fri, 03 May 2024 12:55:28 GMT', 'Content-Length': '357'} body={"status":"success","data":{"resultType":"vector","result":[{"metric":{"__name__":"osm_cpu_utilization","job":"airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf","metric_id":"vnf_cpu_util","ns_id":"6aaa9e4c-75f5-4ae1-b0df-bea12f900798","project_id":"fdd32cb5-0917-4202-a1f2-4b10e9b9656a","vdu_id":"hackfest_basic_metrics-VM","vdu_name":"sa_02-vnf-hackfest_basic_metrics-VM-0","vim_id":"30490a2c-1d18-4624-892a-1695d6c3d5bf","vm_id":"9d5995f1-00e0-4f9c-a0f0-0e625533fecd","vnf_member_index":"vnf"},"value":[1714740928.778,"0.18333333333333332"]}]}} ${resp} = <Response [200]> 200 ${resp} Fails if response status code is different than the expected. ${resp.json()} ${resp} = {'status': 'success', 'data': {'resultType': 'vector', 'result': [{'metric': {'__name__': 'osm_cpu_utilization', 'job': 'airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf', 'metric_id': 'vnf... ${result_list} ${resp["data"]["result"]} Converts the given ``item`` to a Python ``list`` type. ${result_list} = [{'metric': {'__name__': 'osm_cpu_utilization', 'job': 'airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf', 'metric_id': 'vnf_cpu_util', 'ns_id': '6aaa9e4c-75f5-4ae1-b0df-bea12f900798', 'pro... ${results} ${result_list} Returns and logs the length of the given item as an integer. Length is 1 ${results} = 1 0 ${results} msg=Metric ${metric} not found values=false Fails if objects are equal after converting them to real numbers. Argument types are: <class 'str'> <class 'int'> 1 ${results} msg=Metric ${metric} with multiple values values=false Fails if objects are unequal after converting them to integers. Argument types are: <class 'str'> <class 'int'> ${result_list[0]["value"][1]} ${metric_value} = 0.18333333333333332 msg=The metric '${METRIC_NAME}' value is '${metric_value}' which is lower than '${METRIC_THRESHOLD}' Fails the test with the given message and optionally alters its tags. The metric 'osm_cpu_utilization' value is '0.18333333333333332' which is lower than '60.0' Auxiliar keyword to check if metric exceeds threshold ${PROMETHEUS_HOST} msg=Prometheus address is not available Fails unless the given variable exists within the current scope. ${PROMETHEUS_PORT} msg=Prometheus port is not available Fails unless the given variable exists within the current scope. ${METRIC_NAME} msg=Prometheus metric name is not available Fails unless the given variable exists within the current scope. ${metric_filter} ns_id=${NS_ID} Returns the given values which can then be assigned to a variables. ${metric_filter} = ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${metric_value} ${PROMETHEUS_HOST} ${PROMETHEUS_PORT} ${PROMETHEUS_USER} ${PROMETHEUS_PASSWORD} ${METRIC_NAME} ${metric_filter} Get the instant value of a metric from Prometheus using multiple filter parameters. The filter parameters are given to this function in key=value format (one argument per key/value pair). Fails if the metric is not found or has multiple values. Examples of execution: ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${param1}=${value1} ${param2}=${value2} ${filter} ${EMPTY} Returns the given values which can then be assigned to a variables. ${filter} = ${param} @{filter_parameters} ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match} ${param_name} ${param_value} ${param} (.+)=(.+) msg=Syntax error in filter parameters Fails if ``string`` does not match ``pattern`` as a regular expression. ${match} = ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${param_name} = ns_id ${param_value} = 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match},${param_name},${param_value} Logs the given message with the given level. ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798,ns_id,6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${filter} SEPARATOR= ${filter} ${param_name}="${param_value}", Catenates the given items together and returns the resulted string. ${filter} = ns_id="6aaa9e4c-75f5-4ae1-b0df-bea12f900798", ${resp} ${prometheus_ip} ${prometheus_port} ${prometheus_user} ${prometheus_password} query=${metric}{${filter}} Execute a Prometheus Instant Query using HTTP API. Return an inline json with the result of the query. The requested URL is the next: http://${prometheus_ip}:${prometheus_port}/api/v1/query?${querystring} ${auth} ${prometheus_user} ${prometheus_password} Returns a list containing given items. ${auth} = ['""', '""'] ${auth} None Returns the given values which can then be assigned to a variables. prometheus http://${prometheus_ip}:${prometheus_port} timeout=${TIMEOUT} max_retries=${MAX_RETRIES} verify=false auth=${auth} Create Session: create a HTTP session to a server Creating Session using : alias=prometheus, url=http://172.21.249.192:9091, headers={}, cookies={}, auth=<requests.auth.HTTPBasicAuth object at 0x7ff37dc33760>, timeout=30, proxies=None, verify=False, debug=0 ${resp} prometheus /api/v1/query?${querystring} timeout=${TIMEOUT} Sends a GET request on a previously created HTTP Session. GET Request : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D path_url=/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D headers={'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic IiI6IiI='} body=None GET Response : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D status=200, reason=OK headers={'Content-Encoding': 'gzip', 'Content-Type': 'application/json', 'Date': 'Fri, 03 May 2024 12:56:28 GMT', 'Content-Length': '358'} body={"status":"success","data":{"resultType":"vector","result":[{"metric":{"__name__":"osm_cpu_utilization","job":"airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf","metric_id":"vnf_cpu_util","ns_id":"6aaa9e4c-75f5-4ae1-b0df-bea12f900798","project_id":"fdd32cb5-0917-4202-a1f2-4b10e9b9656a","vdu_id":"hackfest_basic_metrics-VM","vdu_name":"sa_02-vnf-hackfest_basic_metrics-VM-0","vim_id":"30490a2c-1d18-4624-892a-1695d6c3d5bf","vm_id":"9d5995f1-00e0-4f9c-a0f0-0e625533fecd","vnf_member_index":"vnf"},"value":[1714740988.809,"0.18333333333333332"]}]}} ${resp} = <Response [200]> 200 ${resp} Fails if response status code is different than the expected. ${resp.json()} ${resp} = {'status': 'success', 'data': {'resultType': 'vector', 'result': [{'metric': {'__name__': 'osm_cpu_utilization', 'job': 'airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf', 'metric_id': 'vnf... ${result_list} ${resp["data"]["result"]} Converts the given ``item`` to a Python ``list`` type. ${result_list} = [{'metric': {'__name__': 'osm_cpu_utilization', 'job': 'airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf', 'metric_id': 'vnf_cpu_util', 'ns_id': '6aaa9e4c-75f5-4ae1-b0df-bea12f900798', 'pro... ${results} ${result_list} Returns and logs the length of the given item as an integer. Length is 1 ${results} = 1 0 ${results} msg=Metric ${metric} not found values=false Fails if objects are equal after converting them to real numbers. Argument types are: <class 'str'> <class 'int'> 1 ${results} msg=Metric ${metric} with multiple values values=false Fails if objects are unequal after converting them to integers. Argument types are: <class 'str'> <class 'int'> ${result_list[0]["value"][1]} ${metric_value} = 0.18333333333333332 msg=The metric '${METRIC_NAME}' value is '${metric_value}' which is lower than '${METRIC_THRESHOLD}' Fails the test with the given message and optionally alters its tags. The metric 'osm_cpu_utilization' value is '0.18333333333333332' which is lower than '60.0' Auxiliar keyword to check if metric exceeds threshold ${PROMETHEUS_HOST} msg=Prometheus address is not available Fails unless the given variable exists within the current scope. ${PROMETHEUS_PORT} msg=Prometheus port is not available Fails unless the given variable exists within the current scope. ${METRIC_NAME} msg=Prometheus metric name is not available Fails unless the given variable exists within the current scope. ${metric_filter} ns_id=${NS_ID} Returns the given values which can then be assigned to a variables. ${metric_filter} = ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${metric_value} ${PROMETHEUS_HOST} ${PROMETHEUS_PORT} ${PROMETHEUS_USER} ${PROMETHEUS_PASSWORD} ${METRIC_NAME} ${metric_filter} Get the instant value of a metric from Prometheus using multiple filter parameters. The filter parameters are given to this function in key=value format (one argument per key/value pair). Fails if the metric is not found or has multiple values. Examples of execution: ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${param1}=${value1} ${param2}=${value2} ${filter} ${EMPTY} Returns the given values which can then be assigned to a variables. ${filter} = ${param} @{filter_parameters} ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match} ${param_name} ${param_value} ${param} (.+)=(.+) msg=Syntax error in filter parameters Fails if ``string`` does not match ``pattern`` as a regular expression. ${match} = ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${param_name} = ns_id ${param_value} = 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match},${param_name},${param_value} Logs the given message with the given level. ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798,ns_id,6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${filter} SEPARATOR= ${filter} ${param_name}="${param_value}", Catenates the given items together and returns the resulted string. ${filter} = ns_id="6aaa9e4c-75f5-4ae1-b0df-bea12f900798", ${resp} ${prometheus_ip} ${prometheus_port} ${prometheus_user} ${prometheus_password} query=${metric}{${filter}} Execute a Prometheus Instant Query using HTTP API. Return an inline json with the result of the query. The requested URL is the next: http://${prometheus_ip}:${prometheus_port}/api/v1/query?${querystring} ${auth} ${prometheus_user} ${prometheus_password} Returns a list containing given items. ${auth} = ['""', '""'] ${auth} None Returns the given values which can then be assigned to a variables. prometheus http://${prometheus_ip}:${prometheus_port} timeout=${TIMEOUT} max_retries=${MAX_RETRIES} verify=false auth=${auth} Create Session: create a HTTP session to a server Creating Session using : alias=prometheus, url=http://172.21.249.192:9091, headers={}, cookies={}, auth=<requests.auth.HTTPBasicAuth object at 0x7ff37dbf2590>, timeout=30, proxies=None, verify=False, debug=0 ${resp} prometheus /api/v1/query?${querystring} timeout=${TIMEOUT} Sends a GET request on a previously created HTTP Session. GET Request : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D path_url=/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D headers={'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic IiI6IiI='} body=None GET Response : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D status=200, reason=OK headers={'Content-Encoding': 'gzip', 'Content-Type': 'application/json', 'Date': 'Fri, 03 May 2024 12:57:28 GMT', 'Content-Length': '358'} body={"status":"success","data":{"resultType":"vector","result":[{"metric":{"__name__":"osm_cpu_utilization","job":"airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf","metric_id":"vnf_cpu_util","ns_id":"6aaa9e4c-75f5-4ae1-b0df-bea12f900798","project_id":"fdd32cb5-0917-4202-a1f2-4b10e9b9656a","vdu_id":"hackfest_basic_metrics-VM","vdu_name":"sa_02-vnf-hackfest_basic_metrics-VM-0","vim_id":"30490a2c-1d18-4624-892a-1695d6c3d5bf","vm_id":"9d5995f1-00e0-4f9c-a0f0-0e625533fecd","vnf_member_index":"vnf"},"value":[1714741048.846,"0.18333333333333332"]}]}} ${resp} = <Response [200]> 200 ${resp} Fails if response status code is different than the expected. ${resp.json()} ${resp} = {'status': 'success', 'data': {'resultType': 'vector', 'result': [{'metric': {'__name__': 'osm_cpu_utilization', 'job': 'airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf', 'metric_id': 'vnf... ${result_list} ${resp["data"]["result"]} Converts the given ``item`` to a Python ``list`` type. ${result_list} = [{'metric': {'__name__': 'osm_cpu_utilization', 'job': 'airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf', 'metric_id': 'vnf_cpu_util', 'ns_id': '6aaa9e4c-75f5-4ae1-b0df-bea12f900798', 'pro... ${results} ${result_list} Returns and logs the length of the given item as an integer. Length is 1 ${results} = 1 0 ${results} msg=Metric ${metric} not found values=false Fails if objects are equal after converting them to real numbers. Argument types are: <class 'str'> <class 'int'> 1 ${results} msg=Metric ${metric} with multiple values values=false Fails if objects are unequal after converting them to integers. Argument types are: <class 'str'> <class 'int'> ${result_list[0]["value"][1]} ${metric_value} = 0.18333333333333332 msg=The metric '${METRIC_NAME}' value is '${metric_value}' which is lower than '${METRIC_THRESHOLD}' Fails the test with the given message and optionally alters its tags. The metric 'osm_cpu_utilization' value is '0.18333333333333332' which is lower than '60.0' Auxiliar keyword to check if metric exceeds threshold ${PROMETHEUS_HOST} msg=Prometheus address is not available Fails unless the given variable exists within the current scope. ${PROMETHEUS_PORT} msg=Prometheus port is not available Fails unless the given variable exists within the current scope. ${METRIC_NAME} msg=Prometheus metric name is not available Fails unless the given variable exists within the current scope. ${metric_filter} ns_id=${NS_ID} Returns the given values which can then be assigned to a variables. ${metric_filter} = ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${metric_value} ${PROMETHEUS_HOST} ${PROMETHEUS_PORT} ${PROMETHEUS_USER} ${PROMETHEUS_PASSWORD} ${METRIC_NAME} ${metric_filter} Get the instant value of a metric from Prometheus using multiple filter parameters. The filter parameters are given to this function in key=value format (one argument per key/value pair). Fails if the metric is not found or has multiple values. Examples of execution: ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${param1}=${value1} ${param2}=${value2} ${filter} ${EMPTY} Returns the given values which can then be assigned to a variables. ${filter} = ${param} @{filter_parameters} ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match} ${param_name} ${param_value} ${param} (.+)=(.+) msg=Syntax error in filter parameters Fails if ``string`` does not match ``pattern`` as a regular expression. ${match} = ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${param_name} = ns_id ${param_value} = 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match},${param_name},${param_value} Logs the given message with the given level. ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798,ns_id,6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${filter} SEPARATOR= ${filter} ${param_name}="${param_value}", Catenates the given items together and returns the resulted string. ${filter} = ns_id="6aaa9e4c-75f5-4ae1-b0df-bea12f900798", ${resp} ${prometheus_ip} ${prometheus_port} ${prometheus_user} ${prometheus_password} query=${metric}{${filter}} Execute a Prometheus Instant Query using HTTP API. Return an inline json with the result of the query. The requested URL is the next: http://${prometheus_ip}:${prometheus_port}/api/v1/query?${querystring} ${auth} ${prometheus_user} ${prometheus_password} Returns a list containing given items. ${auth} = ['""', '""'] ${auth} None Returns the given values which can then be assigned to a variables. prometheus http://${prometheus_ip}:${prometheus_port} timeout=${TIMEOUT} max_retries=${MAX_RETRIES} verify=false auth=${auth} Create Session: create a HTTP session to a server Creating Session using : alias=prometheus, url=http://172.21.249.192:9091, headers={}, cookies={}, auth=<requests.auth.HTTPBasicAuth object at 0x7ff37dbf2e90>, timeout=30, proxies=None, verify=False, debug=0 ${resp} prometheus /api/v1/query?${querystring} timeout=${TIMEOUT} Sends a GET request on a previously created HTTP Session. GET Request : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D path_url=/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D headers={'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic IiI6IiI='} body=None GET Response : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D status=200, reason=OK headers={'Content-Encoding': 'gzip', 'Content-Type': 'application/json', 'Date': 'Fri, 03 May 2024 12:58:28 GMT', 'Content-Length': '358'} body={"status":"success","data":{"resultType":"vector","result":[{"metric":{"__name__":"osm_cpu_utilization","job":"airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf","metric_id":"vnf_cpu_util","ns_id":"6aaa9e4c-75f5-4ae1-b0df-bea12f900798","project_id":"fdd32cb5-0917-4202-a1f2-4b10e9b9656a","vdu_id":"hackfest_basic_metrics-VM","vdu_name":"sa_02-vnf-hackfest_basic_metrics-VM-0","vim_id":"30490a2c-1d18-4624-892a-1695d6c3d5bf","vm_id":"9d5995f1-00e0-4f9c-a0f0-0e625533fecd","vnf_member_index":"vnf"},"value":[1714741108.884,"0.18333333333333332"]}]}} ${resp} = <Response [200]> 200 ${resp} Fails if response status code is different than the expected. ${resp.json()} ${resp} = {'status': 'success', 'data': {'resultType': 'vector', 'result': [{'metric': {'__name__': 'osm_cpu_utilization', 'job': 'airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf', 'metric_id': 'vnf... ${result_list} ${resp["data"]["result"]} Converts the given ``item`` to a Python ``list`` type. ${result_list} = [{'metric': {'__name__': 'osm_cpu_utilization', 'job': 'airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf', 'metric_id': 'vnf_cpu_util', 'ns_id': '6aaa9e4c-75f5-4ae1-b0df-bea12f900798', 'pro... ${results} ${result_list} Returns and logs the length of the given item as an integer. Length is 1 ${results} = 1 0 ${results} msg=Metric ${metric} not found values=false Fails if objects are equal after converting them to real numbers. Argument types are: <class 'str'> <class 'int'> 1 ${results} msg=Metric ${metric} with multiple values values=false Fails if objects are unequal after converting them to integers. Argument types are: <class 'str'> <class 'int'> ${result_list[0]["value"][1]} ${metric_value} = 0.18333333333333332 msg=The metric '${METRIC_NAME}' value is '${metric_value}' which is lower than '${METRIC_THRESHOLD}' Fails the test with the given message and optionally alters its tags. The metric 'osm_cpu_utilization' value is '0.18333333333333332' which is lower than '60.0' Auxiliar keyword to check if metric exceeds threshold ${PROMETHEUS_HOST} msg=Prometheus address is not available Fails unless the given variable exists within the current scope. ${PROMETHEUS_PORT} msg=Prometheus port is not available Fails unless the given variable exists within the current scope. ${METRIC_NAME} msg=Prometheus metric name is not available Fails unless the given variable exists within the current scope. ${metric_filter} ns_id=${NS_ID} Returns the given values which can then be assigned to a variables. ${metric_filter} = ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${metric_value} ${PROMETHEUS_HOST} ${PROMETHEUS_PORT} ${PROMETHEUS_USER} ${PROMETHEUS_PASSWORD} ${METRIC_NAME} ${metric_filter} Get the instant value of a metric from Prometheus using multiple filter parameters. The filter parameters are given to this function in key=value format (one argument per key/value pair). Fails if the metric is not found or has multiple values. Examples of execution: ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${param1}=${value1} ${param2}=${value2} ${filter} ${EMPTY} Returns the given values which can then be assigned to a variables. ${filter} = ${param} @{filter_parameters} ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match} ${param_name} ${param_value} ${param} (.+)=(.+) msg=Syntax error in filter parameters Fails if ``string`` does not match ``pattern`` as a regular expression. ${match} = ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${param_name} = ns_id ${param_value} = 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match},${param_name},${param_value} Logs the given message with the given level. ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798,ns_id,6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${filter} SEPARATOR= ${filter} ${param_name}="${param_value}", Catenates the given items together and returns the resulted string. ${filter} = ns_id="6aaa9e4c-75f5-4ae1-b0df-bea12f900798", ${resp} ${prometheus_ip} ${prometheus_port} ${prometheus_user} ${prometheus_password} query=${metric}{${filter}} Execute a Prometheus Instant Query using HTTP API. Return an inline json with the result of the query. The requested URL is the next: http://${prometheus_ip}:${prometheus_port}/api/v1/query?${querystring} ${auth} ${prometheus_user} ${prometheus_password} Returns a list containing given items. ${auth} = ['""', '""'] ${auth} None Returns the given values which can then be assigned to a variables. prometheus http://${prometheus_ip}:${prometheus_port} timeout=${TIMEOUT} max_retries=${MAX_RETRIES} verify=false auth=${auth} Create Session: create a HTTP session to a server Creating Session using : alias=prometheus, url=http://172.21.249.192:9091, headers={}, cookies={}, auth=<requests.auth.HTTPBasicAuth object at 0x7ff37dbd76d0>, timeout=30, proxies=None, verify=False, debug=0 ${resp} prometheus /api/v1/query?${querystring} timeout=${TIMEOUT} Sends a GET request on a previously created HTTP Session. GET Request : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D path_url=/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D headers={'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic IiI6IiI='} body=None GET Response : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D status=200, reason=OK headers={'Content-Encoding': 'gzip', 'Content-Type': 'application/json', 'Date': 'Fri, 03 May 2024 12:59:28 GMT', 'Content-Length': '357'} body={"status":"success","data":{"resultType":"vector","result":[{"metric":{"__name__":"osm_cpu_utilization","job":"airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf","metric_id":"vnf_cpu_util","ns_id":"6aaa9e4c-75f5-4ae1-b0df-bea12f900798","project_id":"fdd32cb5-0917-4202-a1f2-4b10e9b9656a","vdu_id":"hackfest_basic_metrics-VM","vdu_name":"sa_02-vnf-hackfest_basic_metrics-VM-0","vim_id":"30490a2c-1d18-4624-892a-1695d6c3d5bf","vm_id":"9d5995f1-00e0-4f9c-a0f0-0e625533fecd","vnf_member_index":"vnf"},"value":[1714741168.922,"0.18333333333333332"]}]}} ${resp} = <Response [200]> 200 ${resp} Fails if response status code is different than the expected. ${resp.json()} ${resp} = {'status': 'success', 'data': {'resultType': 'vector', 'result': [{'metric': {'__name__': 'osm_cpu_utilization', 'job': 'airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf', 'metric_id': 'vnf... ${result_list} ${resp["data"]["result"]} Converts the given ``item`` to a Python ``list`` type. ${result_list} = [{'metric': {'__name__': 'osm_cpu_utilization', 'job': 'airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf', 'metric_id': 'vnf_cpu_util', 'ns_id': '6aaa9e4c-75f5-4ae1-b0df-bea12f900798', 'pro... ${results} ${result_list} Returns and logs the length of the given item as an integer. Length is 1 ${results} = 1 0 ${results} msg=Metric ${metric} not found values=false Fails if objects are equal after converting them to real numbers. Argument types are: <class 'str'> <class 'int'> 1 ${results} msg=Metric ${metric} with multiple values values=false Fails if objects are unequal after converting them to integers. Argument types are: <class 'str'> <class 'int'> ${result_list[0]["value"][1]} ${metric_value} = 0.18333333333333332 msg=The metric '${METRIC_NAME}' value is '${metric_value}' which is lower than '${METRIC_THRESHOLD}' Fails the test with the given message and optionally alters its tags. The metric 'osm_cpu_utilization' value is '0.18333333333333332' which is lower than '60.0' Auxiliar keyword to check if metric exceeds threshold ${PROMETHEUS_HOST} msg=Prometheus address is not available Fails unless the given variable exists within the current scope. ${PROMETHEUS_PORT} msg=Prometheus port is not available Fails unless the given variable exists within the current scope. ${METRIC_NAME} msg=Prometheus metric name is not available Fails unless the given variable exists within the current scope. ${metric_filter} ns_id=${NS_ID} Returns the given values which can then be assigned to a variables. ${metric_filter} = ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${metric_value} ${PROMETHEUS_HOST} ${PROMETHEUS_PORT} ${PROMETHEUS_USER} ${PROMETHEUS_PASSWORD} ${METRIC_NAME} ${metric_filter} Get the instant value of a metric from Prometheus using multiple filter parameters. The filter parameters are given to this function in key=value format (one argument per key/value pair). Fails if the metric is not found or has multiple values. Examples of execution: ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${param1}=${value1} ${param2}=${value2} ${filter} ${EMPTY} Returns the given values which can then be assigned to a variables. ${filter} = ${param} @{filter_parameters} ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match} ${param_name} ${param_value} ${param} (.+)=(.+) msg=Syntax error in filter parameters Fails if ``string`` does not match ``pattern`` as a regular expression. ${match} = ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${param_name} = ns_id ${param_value} = 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match},${param_name},${param_value} Logs the given message with the given level. ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798,ns_id,6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${filter} SEPARATOR= ${filter} ${param_name}="${param_value}", Catenates the given items together and returns the resulted string. ${filter} = ns_id="6aaa9e4c-75f5-4ae1-b0df-bea12f900798", ${resp} ${prometheus_ip} ${prometheus_port} ${prometheus_user} ${prometheus_password} query=${metric}{${filter}} Execute a Prometheus Instant Query using HTTP API. Return an inline json with the result of the query. The requested URL is the next: http://${prometheus_ip}:${prometheus_port}/api/v1/query?${querystring} ${auth} ${prometheus_user} ${prometheus_password} Returns a list containing given items. ${auth} = ['""', '""'] ${auth} None Returns the given values which can then be assigned to a variables. prometheus http://${prometheus_ip}:${prometheus_port} timeout=${TIMEOUT} max_retries=${MAX_RETRIES} verify=false auth=${auth} Create Session: create a HTTP session to a server Creating Session using : alias=prometheus, url=http://172.21.249.192:9091, headers={}, cookies={}, auth=<requests.auth.HTTPBasicAuth object at 0x7ff37dc33e50>, timeout=30, proxies=None, verify=False, debug=0 ${resp} prometheus /api/v1/query?${querystring} timeout=${TIMEOUT} Sends a GET request on a previously created HTTP Session. GET Request : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D path_url=/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D headers={'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic IiI6IiI='} body=None GET Response : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D status=200, reason=OK headers={'Content-Encoding': 'gzip', 'Content-Type': 'application/json', 'Date': 'Fri, 03 May 2024 13:00:28 GMT', 'Content-Length': '357'} body={"status":"success","data":{"resultType":"vector","result":[{"metric":{"__name__":"osm_cpu_utilization","job":"airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf","metric_id":"vnf_cpu_util","ns_id":"6aaa9e4c-75f5-4ae1-b0df-bea12f900798","project_id":"fdd32cb5-0917-4202-a1f2-4b10e9b9656a","vdu_id":"hackfest_basic_metrics-VM","vdu_name":"sa_02-vnf-hackfest_basic_metrics-VM-0","vim_id":"30490a2c-1d18-4624-892a-1695d6c3d5bf","vm_id":"9d5995f1-00e0-4f9c-a0f0-0e625533fecd","vnf_member_index":"vnf"},"value":[1714741228.959,"99.89166666666665"]}]}} ${resp} = <Response [200]> 200 ${resp} Fails if response status code is different than the expected. ${resp.json()} ${resp} = {'status': 'success', 'data': {'resultType': 'vector', 'result': [{'metric': {'__name__': 'osm_cpu_utilization', 'job': 'airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf', 'metric_id': 'vnf... ${result_list} ${resp["data"]["result"]} Converts the given ``item`` to a Python ``list`` type. ${result_list} = [{'metric': {'__name__': 'osm_cpu_utilization', 'job': 'airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf', 'metric_id': 'vnf_cpu_util', 'ns_id': '6aaa9e4c-75f5-4ae1-b0df-bea12f900798', 'pro... ${results} ${result_list} Returns and logs the length of the given item as an integer. Length is 1 ${results} = 1 0 ${results} msg=Metric ${metric} not found values=false Fails if objects are equal after converting them to real numbers. Argument types are: <class 'str'> <class 'int'> 1 ${results} msg=Metric ${metric} with multiple values values=false Fails if objects are unequal after converting them to integers. Argument types are: <class 'str'> <class 'int'> ${result_list[0]["value"][1]} ${metric_value} = 99.89166666666665 msg=The metric '${METRIC_NAME}' value is '${metric_value}' which is lower than '${METRIC_THRESHOLD}' Fails the test with the given message and optionally alters its tags. Wait until the VIM metric exceeds threshold, which should lead to a scale up. azure cluster_sa daily regression sa_02 sanity ${threshold_time_sleep} ${THRESHOLD_TIME} + 1 Evaluates the given expression in Python and returns the result. ${threshold_time_sleep} = 2.0 ${threshold_time_sleep} minutes Wait scale-out threshold time plus 1 minute Pauses the test executed for the given time. Slept 2 minutes Wait scale-out threshold time plus 1 minute Wait until the VIM metric has exceeded threshold for the defined period in the descriptor. azure cluster_sa daily regression sa_02 sanity Auxiliar keyword to check if metric exceeds threshold ${PROMETHEUS_HOST} msg=Prometheus address is not available Fails unless the given variable exists within the current scope. ${PROMETHEUS_PORT} msg=Prometheus port is not available Fails unless the given variable exists within the current scope. ${METRIC_NAME} msg=Prometheus metric name is not available Fails unless the given variable exists within the current scope. ${metric_filter} ns_id=${NS_ID} Returns the given values which can then be assigned to a variables. ${metric_filter} = ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${metric_value} ${PROMETHEUS_HOST} ${PROMETHEUS_PORT} ${PROMETHEUS_USER} ${PROMETHEUS_PASSWORD} ${METRIC_NAME} ${metric_filter} Get the instant value of a metric from Prometheus using multiple filter parameters. The filter parameters are given to this function in key=value format (one argument per key/value pair). Fails if the metric is not found or has multiple values. Examples of execution: ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${metric}= Get Metric ${prometheus_ip} ${prometheus_port} "" ${metric} ${param1}=${value1} ${param2}=${value2} ${filter} ${EMPTY} Returns the given values which can then be assigned to a variables. ${filter} = ${param} @{filter_parameters} ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match} ${param_name} ${param_value} ${param} (.+)=(.+) msg=Syntax error in filter parameters Fails if ``string`` does not match ``pattern`` as a regular expression. ${match} = ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${param_name} = ns_id ${param_value} = 6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${match},${param_name},${param_value} Logs the given message with the given level. ns_id=6aaa9e4c-75f5-4ae1-b0df-bea12f900798,ns_id,6aaa9e4c-75f5-4ae1-b0df-bea12f900798 ${filter} SEPARATOR= ${filter} ${param_name}="${param_value}", Catenates the given items together and returns the resulted string. ${filter} = ns_id="6aaa9e4c-75f5-4ae1-b0df-bea12f900798", ${resp} ${prometheus_ip} ${prometheus_port} ${prometheus_user} ${prometheus_password} query=${metric}{${filter}} Execute a Prometheus Instant Query using HTTP API. Return an inline json with the result of the query. The requested URL is the next: http://${prometheus_ip}:${prometheus_port}/api/v1/query?${querystring} ${auth} ${prometheus_user} ${prometheus_password} Returns a list containing given items. ${auth} = ['""', '""'] ${auth} None Returns the given values which can then be assigned to a variables. prometheus http://${prometheus_ip}:${prometheus_port} timeout=${TIMEOUT} max_retries=${MAX_RETRIES} verify=false auth=${auth} Create Session: create a HTTP session to a server Creating Session using : alias=prometheus, url=http://172.21.249.192:9091, headers={}, cookies={}, auth=<requests.auth.HTTPBasicAuth object at 0x7ff37dc31210>, timeout=30, proxies=None, verify=False, debug=0 ${resp} prometheus /api/v1/query?${querystring} timeout=${TIMEOUT} Sends a GET request on a previously created HTTP Session. GET Request : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D path_url=/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D headers={'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic IiI6IiI='} body=None GET Response : url=http://172.21.249.192:9091/api/v1/query?query=osm_cpu_utilization%7Bns_id=%226aaa9e4c-75f5-4ae1-b0df-bea12f900798%22,%7D status=200, reason=OK headers={'Content-Encoding': 'gzip', 'Content-Type': 'application/json', 'Date': 'Fri, 03 May 2024 13:02:29 GMT', 'Content-Length': '357'} body={"status":"success","data":{"resultType":"vector","result":[{"metric":{"__name__":"osm_cpu_utilization","job":"airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf","metric_id":"vnf_cpu_util","ns_id":"6aaa9e4c-75f5-4ae1-b0df-bea12f900798","project_id":"fdd32cb5-0917-4202-a1f2-4b10e9b9656a","vdu_id":"hackfest_basic_metrics-VM","vdu_name":"sa_02-vnf-hackfest_basic_metrics-VM-0","vim_id":"30490a2c-1d18-4624-892a-1695d6c3d5bf","vm_id":"9d5995f1-00e0-4f9c-a0f0-0e625533fecd","vnf_member_index":"vnf"},"value":[1714741349.001,"99.89166666666665"]}]}} ${resp} = <Response [200]> 200 ${resp} Fails if response status code is different than the expected. ${resp.json()} ${resp} = {'status': 'success', 'data': {'resultType': 'vector', 'result': [{'metric': {'__name__': 'osm_cpu_utilization', 'job': 'airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf', 'metric_id': 'vnf... ${result_list} ${resp["data"]["result"]} Converts the given ``item`` to a Python ``list`` type. ${result_list} = [{'metric': {'__name__': 'osm_cpu_utilization', 'job': 'airflow_osm_vm_metrics_30490a2c-1d18-4624-892a-1695d6c3d5bf', 'metric_id': 'vnf_cpu_util', 'ns_id': '6aaa9e4c-75f5-4ae1-b0df-bea12f900798', 'pro... ${results} ${result_list} Returns and logs the length of the given item as an integer. Length is 1 ${results} = 1 0 ${results} msg=Metric ${metric} not found values=false Fails if objects are equal after converting them to real numbers. Argument types are: <class 'str'> <class 'int'> 1 ${results} msg=Metric ${metric} with multiple values values=false Fails if objects are unequal after converting them to integers. Argument types are: <class 'str'> <class 'int'> ${result_list[0]["value"][1]} ${metric_value} = 99.89166666666665 msg=The metric '${METRIC_NAME}' value is '${metric_value}' which is lower than '${METRIC_THRESHOLD}' Fails the test with the given message and optionally alters its tags. Check that the VIM metric has exceeded the threshold. azure cluster_sa daily regression sa_02 sanity 2 minutes Wait for auto-scale to take place Pauses the test executed for the given time. Slept 2 minutes Wait for auto-scale to take place @{vdur_list} ${VNF_ID} Return a list with the names of the VDU records of a VNF instance. ${vnf_id} Verifies that the given item is not empty. Length is 36 ${rc} ${stdout} osm vnf-show ${vnf_id} --literal | yq -r .vdur[].name Runs the given command in the system and returns the RC and output. Running command 'osm vnf-show 66454797-34ff-43f1-809c-9812bc0ef32a --literal | yq -r .vdur[].name 2>&1'. ${rc} = 0 ${stdout} = sa_02-vnf-hackfest_basic_metrics-VM-0 sa_02-vnf-hackfest_basic_metrics-VM-1 ${rc} ${SUCCESS_RETURN_CODE} msg=${stdout} values=False Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> @{vdur} ${stdout} Splits the ``string`` using ``separator`` as a delimiter string. @{vdur} = [ sa_02-vnf-hackfest_basic_metrics-VM-0 | sa_02-vnf-hackfest_basic_metrics-VM-1 ] @{vdur} @{vdur_list} = [ sa_02-vnf-hackfest_basic_metrics-VM-0 | sa_02-vnf-hackfest_basic_metrics-VM-1 ] ${vdur_list} Logs the length and contents of the ``list`` using given ``level``. List length is 2 and it contains following items: 0: sa_02-vnf-hackfest_basic_metrics-VM-0 1: sa_02-vnf-hackfest_basic_metrics-VM-1 ${vdurs} ${vdur_list} Returns and logs the length of the given item as an integer. Length is 2 ${vdurs} = 2 msg=There is no new VDU after auto-scaling Fails the test with the given message and optionally alters its tags. Check that the VNF has scaled up and the humber of VDUs has increased. azure cluster_sa daily regression sa_02 sanity ${NS_NAME} Delete a NS instance. ${ns_delete_max_wait_time} ${ns_delete_max_wait_time} result_format=number Converts between supported `time formats`. ${ns_delete_max_wait_time} = 240.0 ${ns_delete_max_wait_time} ${ns_delete_max_wait_time} * ${VIM_TIMEOUT_MULTIPLIER} Evaluates the given expression in Python and returns the result. ${ns_delete_max_wait_time} = 240.0 ${ns_delete_max_wait_time} Logs the given message with the given level. 240.0 ${rc} ${stdout} osm ns-delete ${ns} Runs the given command in the system and returns the RC and output. Running command 'osm ns-delete sa_02 2>&1'. ${rc} = 0 ${stdout} = Deletion in progress ${stdout} Logs the given message with the given level. Deletion in progress ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${ns_delete_max_wait_time} ${NS_DELETE_POL_TIME} Check For NS Instance To Be Deleted ${ns} Runs the specified keyword and retries if it fails. ${ns} Check if a given NS instance is not present in OSM. ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+---------------------------------------+--------+------------------------+-------------+-------------------------+ | ID | Name... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+---------------------------------------+--------+------------------------+-------------+-------------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+---------------------------------------+--------+------------------------+-------------+-------------------------+ | 22519aa2-095c-4cb3-aae7-98484738ae06 | sa_02-vnf-hackfest_basic_metrics-VM-1 | ACTIVE | osm-ext=172.21.249.138 | ubuntu20.04 | simple_requires-1-1-flv | | 9d5995f1-00e0-4f9c-a0f0-0e625533fecd | sa_02-vnf-hackfest_basic_metrics-VM-0 | ACTIVE | osm-ext=172.21.248.252 | ubuntu20.04 | simple_requires-1-1-flv | | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+---------------------------------------+--------+------------------------+-------------+-------------------------+ ${rc} ${stdout} osm ns-list | awk '{print $2}' | grep ${ns} Runs the given command in the system and returns the RC and output. Running command 'osm ns-list | awk '{print $2}' | grep sa_02 2>&1'. ${rc} = 0 ${stdout} = sa_02 ${rc},${stdout} Logs the given message with the given level. 0,sa_02 ${stdout} ${ns} Fails if objects are equal after converting them to strings. sa_02 == sa_02 ${ns} Check if a given NS instance is not present in OSM. ${rc} ${stdout} openstack server list Runs the given command in the system and returns the RC and output. Running command 'openstack server list 2>&1'. ${rc} = 0 ${stdout} = +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name ... ${rc},${stdout} Logs the given message with the given level. 0,+--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ | 9cb2d700-734b-4e94-bed8-8f0c6a91d95d | osm-master-12470 | ACTIVE | osm-ext=172.21.249.192 | ubuntu22.04 | osm.sanity | | d1c13b29-6684-4bd4-b0dd-e37f812251b6 | tfs-controller | ACTIVE | osm-ext=172.21.249.222 | ubuntu22.04 | 8CPU16RAM120DISK | | 50ff3fab-0638-4c0c-90f0-482fda44502d | connectivity-checker | ACTIVE | osm-ext=172.21.248.52 | ubuntu22.04 | m1.small | | efef733e-fa09-4a84-9166-be07e67991ee | osm-cicd-4 | ACTIVE | osm-ext=172.21.249.4 | ubuntu22.04 | cicd.stage-3 | | cdb8074d-4819-48c2-a653-48f58644103f | osm-cicd-3 | ACTIVE | osm-ext=172.21.249.3 | ubuntu22.04 | 16CPU32RAM200DISK | | c577acd0-532d-40b1-a55f-df851a7c10b5 | osm-cicd-2 | ACTIVE | osm-ext=172.21.249.2 | ubuntu22.04 | 16CPU32RAM200DISK | | d60af501-35ea-4cad-a30f-a4b163ee1647 | osm-cicd-1 | ACTIVE | osm-ext=172.21.249.1 | ubuntu22.04 | cicd.stage-1 | | e7335e3f-07d7-4f3d-9696-f74456db12ef | grafana | ACTIVE | osm-ext=172.21.249.69 | ubuntu20.04 | srsLTE-vdu-flv-7 | | 0ad5ca31-1201-46ba-b146-cd855ed154a8 | prometheus | ACTIVE | osm-ext=172.21.248.212 | ubuntu20.04 | srsLTE-vdu-flv-7 | | edd53c21-a6c0-4719-a6ee-291adfb9c011 | inframon-juju-controller | ACTIVE | osm-ext=172.21.249.111 | ubuntu20.04 | vThunder_vnfd-VM-flv | | 2244faf7-d023-40c2-b255-70c68eee9cc5 | inframon-tools | ACTIVE | osm-ext=172.21.248.15 | ubuntu22.04 | m1.small | +--------------------------------------+--------------------------+--------+------------------------+-------------+----------------------+ ${rc} ${stdout} osm ns-list | awk '{print $2}' | grep ${ns} Runs the given command in the system and returns the RC and output. Running command 'osm ns-list | awk '{print $2}' | grep sa_02 2>&1'. ${rc} = 1 ${stdout} = ${rc},${stdout} Logs the given message with the given level. 1, ${stdout} ${ns} Fails if objects are equal after converting them to strings. Delete NS instance. azure cleanup cluster_sa daily regression sa_02 sanity ${NSD_NAME} Delete a NS package from OSM. ${rc} ${stdout} Run And Return Rc And Output osm nspkg-delete ${nsd_id} Runs the keyword and continues execution even if a failure occurs. osm nspkg-delete ${nsd_id} Runs the given command in the system and returns the RC and output. Running command 'osm nspkg-delete hackfest_basic-ns-metrics 2>&1'. ${rc} = 0 ${stdout} = Deleted ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${stdout} Logs the given message with the given level. Deleted ${NSD_DELETE_MAX_WAIT_TIME} ${NSD_DELETE_POL_TIME} Check For NSD ${nsd_id} Runs the specified keyword and retries if it fails. ${nsd_id} Check that a NS package exists in OSM. ${rc} ${stdout} osm nspkg-list | awk '{print $2}' | grep ${nsd_id} Runs the given command in the system and returns the RC and output. Running command 'osm nspkg-list | awk '{print $2}' | grep hackfest_basic-ns-metrics 2>&1'. ${rc} = 1 ${stdout} = ${rc},${stdout} Logs the given message with the given level. 1, ${stdout} ${nsd_id} Fails if objects are equal after converting them to strings. Delete NS package from OSM. azure cleanup cluster_sa daily regression sa_02 sanity ${VNFD_NAME} Delete a VNF package from OSM. ${rc} ${stdout} osm vnfpkg-delete ${vnfd_id} Runs the given command in the system and returns the RC and output. Running command 'osm vnfpkg-delete hackfest_basic_metrics-vnf 2>&1'. ${rc} = 0 ${stdout} = Deleted ${stdout} Logs the given message with the given level. Deleted ${rc} ${SUCCESS_RETURN_CODE} Fails if objects are unequal after converting them to integers. Argument types are: <class 'int'> <class 'str'> ${VNFD_DELETE_MAX_WAIT_TIME} ${VNFD_DELETE_POL_TIME} Check For VNFD ${vnfd_id} Runs the specified keyword and retries if it fails. ${vnfd_id} Check that a VNF package exists in OSM. ${rc} ${stdout} osm vnfpkg-list | awk '{print $2}' | grep ${vnfd_id} Runs the given command in the system and returns the RC and output. Running command 'osm vnfpkg-list | awk '{print $2}' | grep hackfest_basic_metrics-vnf 2>&1'. ${rc} = 1 ${stdout} = ${rc},${stdout} Logs the given message with the given level. 1, ${stdout} ${vnfd_id} Fails if objects are unequal after converting them to strings. ${stdout} ${vnfd_id} Fails if objects are equal after converting them to strings. Delete VNF package from OSM. azure cleanup cluster_sa daily regression sa_02 sanity Suite Cleanup Runs the given keyword with the given arguments and ignores possible error. Test Suite Cleanup: Deleting descriptors and NS instance Delete NS ${NS_NAME} Runs the given keyword with the given arguments, if one or more tests failed. Delete NSD ${NSD_NAME} Runs the given keyword with the given arguments, if one or more tests failed. Delete VNFD ${VNFD_NAME} Runs the given keyword with the given arguments, if one or more tests failed. [SA-02] VNF with VIM-based metrics and auto-scaling. All Tests cluster_k8s cluster_main cluster_sa Testsuite Testsuite.Hackfest Basic Testsuite.Hackfest Cloudinit Testsuite.K8S 04-Openldap Helm Testsuite.Sa 02-Vnf With Vim Metrics And Autoscaling