@{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}
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