+ [Documentation] Instantiate NS for the testsuite.
+ [Tags] prepare
+ ${id}= Create Network Service ${NSD_NAME} %{VIM_TARGET} ${NS_NAME} ${NS_CONFIG} ${PUBLICKEY}
+ Log ${id}
+
+Get Ns Id
+ [Documentation] Retrieve NS instance id to be used later on.
+ [Tags] verify
+ ${id}= Get Ns Id ${NS_NAME}
+ Set Suite Variable ${NS_ID} ${id}
+
+Get Vnf Id
+ [Documentation] Retrieve NF instance id to be used later on.
+ [Tags] verify
+ Variable Should Exist ${NS_ID} msg=Network service instance is not available
+ @{vnfr_list}= Get Ns Vnfr Ids ${NS_ID}
+ Log List ${vnfr_list}
+ Set Suite Variable ${VNF_ID} ${vnfr_list}[0]
+
+Execute Upgrade Operation
+ [Documentation] Perform OSM action to upgrade the number of replicas of a deployment in the CNF.
+ [Tags] verify
+ Variable Should Exist ${NS_ID} msg=Network service instance is not available
+ ${ns_op_id}= Execute NS K8s Action ${NS_NAME} ${UPGRADE_ACTION} ${VNF_MEMBER_INDEX} ${KDU_NAME} replicaCount=${REPLICA_COUNT}
+ Log ${ns_op_id}
+
+Check Replicas After Upgrade Operation
+ [Documentation] Check that the number of replicas after the upgrade is the expected one.
+ [Tags] verify
+ Variable Should Exist ${NS_ID} msg=Network service instance is not available
+ ${count}= Get Vnf Kdu Replica Count ${VNF_ID} ${KDU_NAME}
+ Log ${count}
+ Should Be Equal As Integers ${count} ${REPLICA_COUNT}
+
+Execute Rollback Operation
+ [Documentation] Perform OSM action to rollback the previous upgrade of the CNF.
+ [Tags] verify
+ Variable Should Exist ${NS_ID} msg=Network service instance is not available
+ ${ns_op_id}= Execute NS K8s Action ${NS_NAME} ${ROLLBACK_ACTION} ${VNF_MEMBER_INDEX} ${KDU_NAME}
+ Log ${ns_op_id}
+
+Check Replicas After Rollback Operation
+ [Documentation] Check that the number of replcias after the rollback is the expected one.
+ [Tags] verify
+ Variable Should Exist ${NS_ID} msg=Network service instance is not available
+ ${count}= Get Vnf Kdu Replica Count ${VNF_ID} ${KDU_NAME}
+ Log ${count}
+ Should Be Empty ${count}