Skip to content
Snippets Groups Projects
Commit 46b097a4 authored by pedrocjdpereira's avatar pedrocjdpereira
Browse files

Feature 10991: k8s_04 test now checks labels injected into Kubernetes objects...

Feature 10991: k8s_04 test now checks labels injected into Kubernetes objects before executing the upgrade operation

Change-Id: I89c9e281e2b851135545d4f72f21ed8820db5275
Signed-off-by: default avatarPedro Pereira <pedrocjdpereira@av.it.pt>
parent 17169ca5
No related branches found
No related tags found
No related merge requests found
......@@ -182,6 +182,22 @@ Get Vnf Vdur Names
@{vdur}= Split String ${stdout}
RETURN @{vdur}
Check Kdu Labels
[Documentation] Return the labels of the deployed Kubernetes objects associated with a NS instance.
[Arguments] ${ns_id} ${vnf_id} ${kdu_name}
Should Not Be Empty ${ns_id}
Should Not Be Empty ${vnf_id}
Should Not Be Empty ${kdu_name}
${rc} ${stdout}= Run And Return Rc And Output osm ns-show ${ns_id} --literal | yq -r '._admin.deployed.K8s[0]."detailed-status"' | yq -r '.manifest[0].metadata.labels'
Log ${stdout}
Should Be Equal As Integers ${rc} ${SUCCESS_RETURN_CODE} msg=${stdout} values=False
${labels}= Evaluate json.loads('''${stdout}''') json
Should Be Equal As Strings ${labels["managed-by"]} osm.etsi.org msg=${labels}
Should Be Equal As Strings ${labels["osm.etsi.org/ns-id"]} ${ns_id} msg=${labels}
Should Be Equal As Strings ${labels["osm.etsi.org/vnf-id"]} ${vnf_id} msg=${labels}
Should Be Equal As Strings ${labels["osm.etsi.org/kdu-name"]} ${kdu_name} msg=${labels}
RETURN ${labels}
Get Vnf Kdu Replica Count
[Documentation] Return the number of KDU replicas (empty if none) of a VNF instance.
[Arguments] ${vnf_id} ${kdu_name}
......
......@@ -84,6 +84,13 @@ Get Vnf Id
Log List ${vnfr_list}
Set Suite Variable ${VNF_ID} ${vnfr_list}[0]
Check Labels Injected Into Kubernetes Objects
[Documentation] Check that labels were correctly injected into the deployed Kubernetes objects.
[Tags] verify
Variable Should Exist ${NS_ID} msg=Network service instance is not available
${stdout}= Check Kdu Labels ${NS_ID} ${VNF_ID} ${KDU_NAME}
Log ${stdout}
Execute Upgrade Operation
[Documentation] Perform OSM action to upgrade the number of replicas of a deployment in the CNF.
[Tags] verify
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment