--- /dev/null
+*** Settings ***
+Resource environment/configuration.txt
+Resource environment/variables.txt
+Library MockServerLibrary
+Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
+Library OperatingSystem
+Library BuiltIn
+Library JSONLibrary
+Library Collections
+Library JSONSchemaLibrary schemas/
+Library Process
+Library String
+
+*** Keywords ***
+Get All Pods
+ Log Status information for all the pods.
+ GET api/v1/pods
+ ${outputResponse}= Output response
+ Log ${outputResponse}
+ Set Global Variable ${response} ${outputResponse}
+
+Get Specific Pod
+ Log Status information of a specific Pod.
+ GET ${PODS_SCHEMA}://${PODS_HOST}:${PODS_PORT}/api/v1/namespaces/${namespaces}/pods/${name}
+ ${outputResponse}= Output response
+ Set Global Variable ${response} ${outputResponse}
--- /dev/null
+*** Settings ***
+Resource environment/configuration.txt
+Resource environment/variables.txt
+Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
+Library JSONLibrary
+Library JSONSchemaLibrary schemas/
+Resource CnfLcmMntOperationKeywords.robot
+
+*** Test Cases ***
+Get All Pods
+ [Documentation] Test ID: 7.3.1.12.7
+ ... Test title: Get All Pods
+ ... Test objective: The objective is to get the data of All Pods
+ ... Pre-conditions: none
+ ... Config ID: Config_prod_VNFM
+ ... Applicability: none
+ ... Post-Conditions: none
+ Get All Pods
+
+Get Specific Pod
+ [Documentation] Test ID: 7.3.1.12.8
+ ... Test title: Get Specific Pod
+ ... Test objective: The objective is to get the data of a specific Pod
+ ... Pre-conditions: none
+ ... Config ID: Config_prod_VNFM
+ ... Applicability: none
+ ... Post-Conditions: none
+ Get Specific Pod
--- /dev/null
+*** Variables ***
+${VNFM_HOST} localhost # Hostname of the VNFM
+${VNFM_PORT} 8080 # Listening port of the VNFM
+${VNFM_SCHEMA} http
+${ACCEPT} application/json
+${ACCEPT_JSON} application/json
+${CONTENT_TYPE} application/json
+${AUTHORIZATION_HEADER} Authorization
+${AUTHORIZATION_TOKEN} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
+${AUTH_USAGE} 1
+${CONTENT_TYPE_PATCH} application/merge-patch+json
+
+${PODS_SCHEMA} http
+${PODS_HOST} localhost # Hostname of the VNFM
+${PODS_PORT} 8080 # Listening port of the VNFM
+
+${apiRoot} /
+${apiName} vnflcm
+${apiVersion} v1
+
+${CancelMode} GRACEFUL
+${VNFM_DUPLICATION} 0
+
+${NFVO_HOST} localhost # Hostname of the NFVO
+${NFVO_PORT} 8081 # Listening port of the NFVO
+${NFVO_SCHEMA} https
+${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX
+${SINGLE_FILE_VNFD} 1 # If VNFD is PLAIN TEXT
+${ACCEPT_PLAIN} text/plain
+${ACCEPT_ZIP} application/zip
+${vnfPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c
+${ARTIFACT_TYPE} application/octet-stream
+${ARTIFACT_ID} artifactId
+${WRONG_ACCEPT} application/json
+${SYNC_MODE} 0
+${sleep_interval} 20s
+${callback_uri} http://localhost
+${callback_port} 9091
+${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar
--- /dev/null
+*** variables ***
+${LccnSubscriptions}
+${scaleInfo}
+${element}
+${aspectId}
+${scaleOutResponse}
--- /dev/null
+*** Variables ***
+${instantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
+${anotherInstantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
+${notInstantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
+${notExistingVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
+${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
+${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
+${conflicVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
+
+${invalid_etag} invalid etag
+
+${namespaces} default
+${name} vdu2
+
+${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
+${notExistingVnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
+${vnfLcmOpOccIdNotStartingProcessingRollingback} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
+${vnfLcmOpOccIdNotFailedTemp} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
+
+${VnfLcmOperationOccurrenceNotification} {}
+${VnfIdentifierCreationNotification} {}
+${VnfIdentifierDeletionNotification} {}
+${response} {}
+${json} {}
+${requestedFlavour} test
+
+${sub_filter} filter
+${sub_filter_invalid} filter_invalid
+
+${fields} criteria,objectInstanceIds
+
+${vnfInstanceName} Test-VnfInstance
+${vnfInstanceDescription} description vnf
+${vnfInstanceDescription_Update} Updated description vnf
+${vnfPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c
+
+${changeVnfFlavourRequest} {}
+${changeVnfOperateRequest} {}
+${requestedState} test
+${changeVnfExtConnectivityRequest} {}
+${patchBodyRequest} {}
+${total_polling_time} 2 min
+${polling_interval} 10 sec
+
+${notification_request} []
+${notification_response} []
+
+${sleep_interval} 20s
+
+${callback_endpoint} /endpoint
+${callback_endpoint_fwd} /endpoint/check
+${callback_endpoint_error} /endpoint_404
+
+${callback_uri} http://localhost
+${callback_port} 9091
+
+${nextPageUri} someuri
--- /dev/null
+*** Settings ***
+Resource environment/configuration.txt
+Resource environment/variables.txt
+Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
+Library JSONLibrary
+Library JSONSchemaLibrary schemas/
+Resource cnflcm_keywords.robot
+
+*** Test Cases ***
+Create and Instantiate a new VNFInstance
+ [Documentation] Test ID: 7.3.1.12.2
+ Create a new cnfInstance
+ POST instantiate individual cnfInstance
--- /dev/null
+*** Settings ***
+Resource environment/configuration.txt
+Resource environment/variables.txt
+Resource environment/scaleVariables.txt
+Library MockServerLibrary
+Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
+Library OperatingSystem
+Library BuiltIn
+Library JSONLibrary
+Library Collections
+Library JSONSchemaLibrary schemas/
+Library Process
+Library String
+
+*** Keywords ***
+Create a new cnfInstance
+ Run Process curl -X POST -H 'Content-Type:${ACCEPT_JSON}' --data ${TOKEN_DATA} -i ${TOKEN_API} shell=True alias=result
+ ${result} Get Process Result result stdout=true
+ ${lines} = Get Lines Matching Pattern ${result} X-Subject-Token*
+ ${X-Subject-Token}= Run echo ${lines} | cut -d ' ' -f 2
+ Log to Console ${vnfdId}
+ Run Process curl -g -i -X POST ${vnf_instance_api} -H "Accept: ${ACCEPT}" -H "Content-Type: ${ACCEPT_JSON}" -H "X-Auth-Token: ${X-Subject-Token}" -d '{"vnfdId": "${vnfdId}"}' shell=True alias=result
+ ${result} Get Process Result result stdout=true
+ ${line} = Get Line ${result} 7
+ ${lines1} Create List ${line}
+ ${x} = Get From List ${lines1} 0
+ ${json}= evaluate json.loads('''${x}''') json
+ ${Instance_ID} = Get From Dictionary ${json} id
+ Log to Console ${Instance_ID}
+ Set Global Variable ${Instance_ID}
+
+
+POST instantiate individual cnfInstance
+ Log Trying to Instantiate a vnf Instance
+ Run Process curl -X POST -H 'Content-Type:${ACCEPT_JSON}' --data ${TOKEN_DATA} -i ${TOKEN_API} shell=True alias=result
+ ${result} Get Process Result result stdout=true
+ ${lines} = Get Lines Matching Pattern ${result} X-Subject-Token*
+ ${X-Subject-Token}= Run echo ${lines} | cut -d ' ' -f 2
+ Set Headers {"Accept":"${ACCEPT}"}
+ Set Headers {"Content-pe": "${ACCEPT_JSON}"}
+ Set Headers {"${AUTHORIZATION_HEADER}":"${X-Subject-Token}"}
+ ${body}= Get File api-tests/SOL003/cnflcm/jsons/inst.json
+ Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${Instance_ID}/instantiate ${body}
+ ${outputResponse}= Output response
+ Set Global Variable ${response} ${outputResponse}
+ Log to Console ${outputResponse}
--- /dev/null
+*** Variables ***
+${VNFM_HOST} localhost # Hostname of the VNFM
+${VNFM_PORT} 9890 # Listening port of the VNFM
+${VNFM_SCHEMA} http
+${ACCEPT} application/json
+${ACCEPT_JSON} application/json
+${CONTENT_TYPE} application/json
+${AUTHORIZATION_HEADER} X-Auth-Token
+${AUTHORIZATION_TOKEN} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
+${AUTH_USAGE} 1
+${CONTENT_TYPE_PATCH} application/merge-patch+json
+
+${PODS_SCHEMA} http
+${PODS_HOST} localhost # Hostname of the VNFM
+${PODS_PORT} 8080 # Listening port of the VNFM
+
+${vnf_instance_api} http://localhost:9890/vnflcm/v1/vnf_instances
+
+${apiRoot} /
+${apiName} vnflcm
+${apiVersion} v1
+
+${CancelMode} GRACEFUL
+${VNFM_DUPLICATION} 0
+
+${TOKEN_DATA} '{"auth": {"scope": {"project": {"domain": {"id": "default"}, "name": "nfv"}}, "identity": {"password": {"user": {"domain": {"id": "default"}, "password": "devstack", "name": "nfv_user"}}, "methods": ["password"]}}}'
+
+${TOKEN_API} http://localhost/identity/v3/auth/tokens
+
+${NFVO_HOST} localhost # Hostname of the NFVO
+${NFVO_PORT} 8081 # Listening port of the NFVO
+${NFVO_SCHEMA} https
+${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX
+${SINGLE_FILE_VNFD} 1 # If VNFD is PLAIN TEXT
+${ACCEPT_PLAIN} text/plain
+${ACCEPT_ZIP} application/zip
+${vnfPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c
+${ARTIFACT_TYPE} application/octet-stream
+${ARTIFACT_ID} artifactId
+${WRONG_ACCEPT} application/json
+${SYNC_MODE} 0
+${sleep_interval} 20s
+${callback_uri} http://localhost
+${callback_port} 9091
+${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar
--- /dev/null
+*** variables ***
+${LccnSubscriptions}
+${scaleInfo}
+${element}
+${aspectId}
+${scaleOutResponse}
--- /dev/null
+*** Variables ***
+${instantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
+${anotherInstantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
+${notInstantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
+${notExistingVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
+${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
+${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
+${conflicVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
+
+${invalid_etag} invalid etag
+
+${namespaces} namespace
+${name} name
+
+${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
+${notExistingVnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
+${vnfLcmOpOccIdNotStartingProcessingRollingback} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
+${vnfLcmOpOccIdNotFailedTemp} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
+
+${VnfLcmOperationOccurrenceNotification} {}
+${VnfIdentifierCreationNotification} {}
+${VnfIdentifierDeletionNotification} {}
+${response} {}
+${json} {}
+${requestedFlavour} test
+
+${sub_filter} filter
+${sub_filter_invalid} filter_invalid
+
+${fields} criteria,objectInstanceIds
+
+${vnfInstanceName} Test-VnfInstance
+${vnfInstanceDescription} description vnf
+${vnfInstanceDescription_Update} Updated description vnf
+${vnfPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c
+
+${changeVnfFlavourRequest} {}
+${changeVnfOperateRequest} {}
+${requestedState} test
+${changeVnfExtConnectivityRequest} {}
+${patchBodyRequest} {}
+${total_polling_time} 2 min
+${polling_interval} 10 sec
+
+${notification_request} []
+${notification_response} []
+
+${sleep_interval} 20s
+
+${callback_endpoint} /endpoint
+${callback_endpoint_fwd} /endpoint/check
+${callback_endpoint_error} /endpoint_404
+
+${callback_uri} http://localhost
+${callback_port} 9091
+
+${nextPageUri} someuri
+${vnfPkgId} bf6ce418-af04-472d-89e0-66227115fae9
+${vnfdId} f671f008-908b-47b6-9c76-b9b30b2523f8
--- /dev/null
+{
+ "flavourId": "simple",
+ "additionalParams": {
+ "lcm-kubernetes-def-files": [
+ "Files/kubernetes/deployment.yaml"
+ ],
+ "namespace": "default"
+ },
+ "vimConnectionInfo": [
+ {
+ "id": "8a3adb69-0784-43c7-833e-aab0b6ab4470",
+ "vimId": "08260b52-c3f6-47a9-bb1f-cec1f0d3956a",
+ "vimType": "kubernetes"
+ }
+ ]
+}
--- /dev/null
+#!/bin/sh
+
+variableFile=$1
+#curl command for token generation
+curl -X POST -H 'Content-Type:application/json' --data '{"auth": {"scope":
+ {"project": {"domain": {"id": "default"}, "name": "nfv"}}, "identity":
+ {"password": {"user": {"domain": {"id": "default"}, "password":
+ "devstack", "name": "nfv_user"}}, "methods": ["password"]}}}' \
+ -i http://localhost/identity/v3/auth/tokens > outtoken 2>&1
+
+dos2unix outtoken 2>/dev/null
+token=$(cat ./outtoken | grep "X-Subject-Token" | cut -d ' ' -f 2)
+
+#curl command for vnf package create
+curl -g -i -X POST http://localhost:9890/vnfpkgm/v1/vnf_packages \
+ -H "Accept: application/json" -H "Content-Type: application/json" \
+ -H "X-Auth-Token: $token" -d '{}' > outtoken 2>&1
+dos2unix outtoken 2>/dev/null
+
+Packageid=$(cat ./outtoken | grep id | cut -d ' ' -f 2 |sed 's/.$//'|tail -c +2 | head -c -2)
+
+echo "$Packageid created"
+#curl command for vnf package upload
+curl -g -i -X PUT http://localhost:9890/vnfpkgm/v1/vnf_packages/$Packageid/package_content \
+ -H "Accept: application/zip" -H "Content-Type: application/zip" \
+ -H "User-Agent: python-tackerclient" -H "X-Auth-Token: $token" --data-binary "@vnfpackage.zip"
+
+echo "$Packageid uploaded"
+
+sleep 1
+curl -g -i -X GET http://localhost:9890/vnfpkgm/v1/vnf_packages/$Packageid \
+ -H "Accept: application/json" -H "User-Agent: python-tackerclient" \
+ -H "X-Auth-Token: $token" > outtoken 2>&1
+dos2unix outtoken 2>/dev/null
+
+vnfdid=$(cat ./outtoken | grep vnfdId | cut -d ' ' -f 15 |sed 's/.$//'|tail -c +2 | head -c -2)
+
+rm -rf outtoken
+sed -i '/${vnfPkgId}/d' $variableFile
+sed -i '/${vnfdId}/d' $variableFile
+
+echo "\${vnfPkgId} $Packageid" >> $variableFile # $variableFile environment file path where package ID will be added
+echo "\${vnfdId} $vnfdid" >> $variableFile
--- /dev/null
+git+https://github.com/etsi-cti-admin/RESTinstance
+robotframework==5.0.1
+robotframework-dependencylibrary==1.0.0.post1
+robotframework-jsonlibrary==0.3
+robotframework-jsonschemalibrary==1.0
+robotframework-mockserver==0.0.7
+robotframework-requests==0.8.0
--- /dev/null
+---
+tiers:
+ - name: samples
+ description: ''
+ testcases:
+ - case_name: first
+ project_name: xtesting
+ criteria: 100
+ blocking: true
+ clean_flag: false
+ description: ''
+ run:
+ name: robotframework
+ args:
+ suites:
+ - >-
+ /opt/stack/tacker/tacker/tests/xtesting/api-tests/SOL003/cnflcm/cnflcm.robot
+ - case_name: second
+ project_name: xtesting
+ criteria: 100
+ blocking: true
+ clean_flag: false
+ description: ''
+ run:
+ name: robotframework
+ args:
+ suites:
+ - >-
+ /opt/stack/tacker/tacker/tests/xtesting/api-tests/SOL003/CNFDeployment/IndividualCnfLcmOperationOccurrence.robot
+