- `cluster_sa`: `sa_01`, `sa_02`, `sa_07`
- `cluster_slices`: `slice_01`, `slice_02`
- `cluster_heal`: `heal_01`, `heal_02`, `heal_03`, `heal_04`
- - `cluster_osm_rest`: `sol003_01`
- - `cluster_gitops`: `gitops_01`
+ - `cluster_sol003`: `sol003_01`, `sol003_02`
+ - `cluster_gitops`: `gitops_01`, `gitops_02`
- daily: for all testsuites that will run in the daily job
- regression: for all testsuites that should pass in the current stable branch
- sanity: for all testsuites that should be passed by each commit in the
[Documentation] Set a suite variable REST_API_HOST to be used in this library and the testsuites using it.
... This method must be used if the tests are run from any place outside the K8s cluster where OSM is running.
[Arguments] ${env_host}
- Set Suite Variable ${REST_API_HOST} https://${env_host}:9999
+ Set Suite Variable ${REST_API_HOST} https://${env_host}:443
-Read Directory
- [Documentation] Read Current Directory and return it
+Get Resource Directory
+ [Documentation] Return Directory corresponding to the resources folder
${Directory}= Replace String ${CURDIR} lib resources
${json_path}= Set Variable ${Directory}
RETURN ${json_path}
Resource ../lib/vnf_lib.resource
Resource ../lib/vim_lib.resource
-Test Tags sol003_01 cluster_osm_rest daily regression
+Test Tags sol003_01 cluster_sol003 daily regression
+Suite Setup Run Keyword And Ignore Error Suite Preparation
Suite Teardown Run Keyword And Ignore Error Suite Cleanup
${CREATED_VIM_ACCOUNT_ID}= Get VIM Target ID %{VIM_TARGET}
Set Suite Variable ${CREATED_VIM_ACCOUNT_ID}
Get Auth Token
- ${json_path}= Read Directory
- ${json_obj}= Load JSON From File ${json_path}/sol003_01-vnf-lifecycle-management.json
+ ${json_obj}= Load JSON From File ${RESOURCE_DIR}/sol003_01-vnf-lifecycle-management.json
${json_obj}= Get Variable Value ${json_obj['data'][0]}
${UPDATED_JSON_OBJ}= JSONLibrary.Update Value To Json ${json_obj} $..vimAccountId ${CREATED_VIM_ACCOUNT_ID}
Log ${UPDATED_JSON_OBJ}
Get Ns List
Get Vnf List
Get Auth Token
- ${json_path}= Read Directory
- ${json_obj}= Load JSON From File ${json_path}/sol003_01-vnf-lifecycle-management.json
+ ${json_obj}= Load JSON From File ${RESOURCE_DIR}/sol003_01-vnf-lifecycle-management.json
${json_obj}= Get Variable Value ${json_obj['data'][1]}
${UPDATED_JSON_OBJ}= JSONLibrary.Update Value To Json ${json_obj} $..vimAccountId ${CREATED_VIM_ACCOUNT_ID}
${UPDATED_JSON_OBJ}= JSONLibrary.Update Value To Json ${UPDATED_JSON_OBJ} $..vnfId ${CREATEID}
Scale VNF
[Documentation] Scale out VNF
Get Auth Token
- ${json_path}= Read Directory
- ${updated_json_obj}= Load JSON From File ${json_path}/sol003_01-vnf-lifecycle-management.json
+ ${updated_json_obj}= Load JSON From File ${RESOURCE_DIR}/sol003_01-vnf-lifecycle-management.json
${updated_json_obj}= Get Variable Value ${UPDATED_JSON_OBJ['data'][2]}
Set Test Variable ${UPDATED_JSON_OBJ}
Post Api Request ${VNF_INSTANCE_URI}/${CREATEID}/scale ${UPDATED_JSON_OBJ}
Terminate VNF
[Documentation] Test case to terminate the VNF
Get Auth Token
- ${json_path}= Read Directory
- ${updated_json_obj}= Load JSON From File ${json_path}/sol003_01-vnf-lifecycle-management.json
+ ${updated_json_obj}= Load JSON From File ${RESOURCE_DIR}/sol003_01-vnf-lifecycle-management.json
${updated_json_obj}= Get Variable Value ${UPDATED_JSON_OBJ['data'][3]}
Set Suite Variable ${UPDATED_JSON_OBJ}
Post Api Request ${VNF_INSTANCE_URI}/${CREATEID}/terminate ${UPDATED_JSON_OBJ}
*** Keywords ***
+Suite Preparation
+ [Documentation] Test Suite Preparation: Setting Prometheus Testsuite Variables
+ ${RESOURCE_DIR}= Get Resource Directory
+ Set Suite Variable ${RESOURCE_DIR}
+
Suite Cleanup
[Documentation] Test Suit Cleanup: Deleting Descriptor
Run Keyword If Any Tests Failed Delete VNFD ${VNFD_NAME}
Resource ../lib/vim_lib.resource
Resource ../lib/nsd_lib.resource
-Test Tags sol003_02 cluster_osm_rest daily
+Test Tags sol003_02 cluster_sol003 daily
+Suite Setup Run Keyword And Ignore Error Suite Preparation
Suite Teardown Run Keyword And Ignore Error Suite Cleanup
${CREATED_VIM_ACCOUNT_ID}= Get VIM Target ID %{VIM_TARGET}
Set Suite Variable ${CREATED_VIM_ACCOUNT_ID}
Get Auth Token
- ${json_path}= Read Directory
- ${json_obj}= Load JSON From File ${json_path}/sol003_02-dualstack_ip_vnfm.json
+ ${json_obj}= Load JSON From File ${RESOURCE_DIR}/sol003_02-dualstack_ip_vnfm.json
${json_obj}= Get Variable Value ${json_obj['data'][0]}
${NS_NAME}= Get Variable Value ${json_obj['vnfInstanceName']}
Set Suite Variable ${NS_NAME}
Get Ns List
Get Vnf List
Get Auth Token
- ${json_path}= Read Directory
- ${json_obj}= Load JSON From File ${json_path}/sol003_02-dualstack_ip_vnfm.json
+ ${json_obj}= Load JSON From File ${RESOURCE_DIR}/sol003_02-dualstack_ip_vnfm.json
${json_obj}= Get Variable Value ${json_obj['data'][1]}
${UPDATED_JSON_OBJ}= JSONLibrary.Update Value To Json ${json_obj} $..vimAccountId ${CREATED_VIM_ACCOUNT_ID}
${UPDATED_JSON_OBJ}= JSONLibrary.Update Value To Json ${UPDATED_JSON_OBJ} $..vnfId ${CREATEID}
Terminate VNF
[Documentation] Test case to terminate the VNF
Get Auth Token
- ${json_path}= Read Directory
- ${UPDATED_JSON_OBJ}= Load JSON From File ${json_path}/sol003_02-dualstack_ip_vnfm.json
+ ${UPDATED_JSON_OBJ}= Load JSON From File ${RESOURCE_DIR}/sol003_02-dualstack_ip_vnfm.json
${UPDATED_JSON_OBJ}= Get Variable Value ${UPDATED_JSON_OBJ['data'][3]}
Set Suite Variable ${UPDATED_JSON_OBJ}
Post Api Request ${VNF_INSTANCE_URI}/${CREATEID}/terminate ${UPDATED_JSON_OBJ}
*** Keywords ***
+Suite Preparation
+ [Documentation] Test Suite Preparation: Setting Prometheus Testsuite Variables
+ ${RESOURCE_DIR}= Get Resource Directory
+ Set Suite Variable ${RESOURCE_DIR}
+
Suite Cleanup
[Documentation] Test Suit Cleanup: Deleting Descriptor
Run Keyword If Any Tests Failed Delete VNFD ${VNFD_NAME}