Add Xtesting for API conformance based on NFV-TST 39/9539/5 g-release
authorKoichi Edagawa <edagawa.kc@nec.com>
Wed, 9 Nov 2022 08:27:46 +0000 (17:27 +0900)
committerMahesh Jethanandani <mjethanandani@gmail.com>
Mon, 21 Nov 2022 16:46:42 +0000 (16:46 +0000)
This patch adds Xtesting code which integrates API conformance testing
based on ETSI NFV-TST 010 with O-RAN SC testing.

Issue-ID: SMO-77
Signed-off-by: Koichi Edagawa <edagawa.kc@nec.com>
Change-Id: I90922a7f76f7aa022ea6d27447b908494d894ac1

16 files changed:
tacker/tacker/tests/xtesting/api-tests/SOL003/CNFDeployment/CnfLcmMntOperationKeywords.robot [new file with mode: 0644]
tacker/tacker/tests/xtesting/api-tests/SOL003/CNFDeployment/IndividualCnfLcmOperationOccurrence.robot [new file with mode: 0644]
tacker/tacker/tests/xtesting/api-tests/SOL003/CNFDeployment/environment/configuration.txt [new file with mode: 0644]
tacker/tacker/tests/xtesting/api-tests/SOL003/CNFDeployment/environment/scaleVariables.txt [new file with mode: 0644]
tacker/tacker/tests/xtesting/api-tests/SOL003/CNFDeployment/environment/variables.txt [new file with mode: 0644]
tacker/tacker/tests/xtesting/api-tests/SOL003/cnflcm/cnflcm.robot [new file with mode: 0644]
tacker/tacker/tests/xtesting/api-tests/SOL003/cnflcm/cnflcm_keywords.robot [new file with mode: 0644]
tacker/tacker/tests/xtesting/api-tests/SOL003/cnflcm/environment/configuration.txt [new file with mode: 0644]
tacker/tacker/tests/xtesting/api-tests/SOL003/cnflcm/environment/scaleVariables.txt [new file with mode: 0644]
tacker/tacker/tests/xtesting/api-tests/SOL003/cnflcm/environment/variables.txt [new file with mode: 0644]
tacker/tacker/tests/xtesting/api-tests/SOL003/cnflcm/jsons/inst.json [new file with mode: 0644]
tacker/tacker/tests/xtesting/api-tests/SOL005/CNFPrecondition/packageTest.sh [new file with mode: 0755]
tacker/tacker/tests/xtesting/api-tests/SOL005/CNFPrecondition/package_without_helm.zip [new file with mode: 0644]
tacker/tacker/tests/xtesting/api-tests/SOL005/CNFPrecondition/vnfpackage.zip [new file with mode: 0644]
tacker/tacker/tests/xtesting/requirements.txt [new file with mode: 0644]
tacker/tacker/tests/xtesting/testcases.yaml [new file with mode: 0644]

diff --git a/tacker/tacker/tests/xtesting/api-tests/SOL003/CNFDeployment/CnfLcmMntOperationKeywords.robot b/tacker/tacker/tests/xtesting/api-tests/SOL003/CNFDeployment/CnfLcmMntOperationKeywords.robot
new file mode 100644 (file)
index 0000000..70b5246
--- /dev/null
@@ -0,0 +1,26 @@
+*** 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}
diff --git a/tacker/tacker/tests/xtesting/api-tests/SOL003/CNFDeployment/IndividualCnfLcmOperationOccurrence.robot b/tacker/tacker/tests/xtesting/api-tests/SOL003/CNFDeployment/IndividualCnfLcmOperationOccurrence.robot
new file mode 100644 (file)
index 0000000..1e02e42
--- /dev/null
@@ -0,0 +1,28 @@
+*** 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
diff --git a/tacker/tacker/tests/xtesting/api-tests/SOL003/CNFDeployment/environment/configuration.txt b/tacker/tacker/tests/xtesting/api-tests/SOL003/CNFDeployment/environment/configuration.txt
new file mode 100644 (file)
index 0000000..c890d4f
--- /dev/null
@@ -0,0 +1,39 @@
+*** 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
diff --git a/tacker/tacker/tests/xtesting/api-tests/SOL003/CNFDeployment/environment/scaleVariables.txt b/tacker/tacker/tests/xtesting/api-tests/SOL003/CNFDeployment/environment/scaleVariables.txt
new file mode 100644 (file)
index 0000000..50d42ad
--- /dev/null
@@ -0,0 +1,6 @@
+*** variables ***
+${LccnSubscriptions}
+${scaleInfo}
+${element}
+${aspectId}
+${scaleOutResponse}
diff --git a/tacker/tacker/tests/xtesting/api-tests/SOL003/CNFDeployment/environment/variables.txt b/tacker/tacker/tests/xtesting/api-tests/SOL003/CNFDeployment/environment/variables.txt
new file mode 100644 (file)
index 0000000..0cf01d7
--- /dev/null
@@ -0,0 +1,57 @@
+*** 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
diff --git a/tacker/tacker/tests/xtesting/api-tests/SOL003/cnflcm/cnflcm.robot b/tacker/tacker/tests/xtesting/api-tests/SOL003/cnflcm/cnflcm.robot
new file mode 100644 (file)
index 0000000..d7454e0
--- /dev/null
@@ -0,0 +1,13 @@
+*** 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
diff --git a/tacker/tacker/tests/xtesting/api-tests/SOL003/cnflcm/cnflcm_keywords.robot b/tacker/tacker/tests/xtesting/api-tests/SOL003/cnflcm/cnflcm_keywords.robot
new file mode 100644 (file)
index 0000000..c798c88
--- /dev/null
@@ -0,0 +1,46 @@
+*** 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}
diff --git a/tacker/tacker/tests/xtesting/api-tests/SOL003/cnflcm/environment/configuration.txt b/tacker/tacker/tests/xtesting/api-tests/SOL003/cnflcm/environment/configuration.txt
new file mode 100644 (file)
index 0000000..f6e0c54
--- /dev/null
@@ -0,0 +1,45 @@
+*** 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
diff --git a/tacker/tacker/tests/xtesting/api-tests/SOL003/cnflcm/environment/scaleVariables.txt b/tacker/tacker/tests/xtesting/api-tests/SOL003/cnflcm/environment/scaleVariables.txt
new file mode 100644 (file)
index 0000000..50d42ad
--- /dev/null
@@ -0,0 +1,6 @@
+*** variables ***
+${LccnSubscriptions}
+${scaleInfo}
+${element}
+${aspectId}
+${scaleOutResponse}
diff --git a/tacker/tacker/tests/xtesting/api-tests/SOL003/cnflcm/environment/variables.txt b/tacker/tacker/tests/xtesting/api-tests/SOL003/cnflcm/environment/variables.txt
new file mode 100644 (file)
index 0000000..1275453
--- /dev/null
@@ -0,0 +1,59 @@
+*** 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
diff --git a/tacker/tacker/tests/xtesting/api-tests/SOL003/cnflcm/jsons/inst.json b/tacker/tacker/tests/xtesting/api-tests/SOL003/cnflcm/jsons/inst.json
new file mode 100644 (file)
index 0000000..0af036e
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "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"
+    }
+  ]
+}
diff --git a/tacker/tacker/tests/xtesting/api-tests/SOL005/CNFPrecondition/packageTest.sh b/tacker/tacker/tests/xtesting/api-tests/SOL005/CNFPrecondition/packageTest.sh
new file mode 100755 (executable)
index 0000000..46d0f44
--- /dev/null
@@ -0,0 +1,43 @@
+#!/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
diff --git a/tacker/tacker/tests/xtesting/api-tests/SOL005/CNFPrecondition/package_without_helm.zip b/tacker/tacker/tests/xtesting/api-tests/SOL005/CNFPrecondition/package_without_helm.zip
new file mode 100644 (file)
index 0000000..36d497b
Binary files /dev/null and b/tacker/tacker/tests/xtesting/api-tests/SOL005/CNFPrecondition/package_without_helm.zip differ
diff --git a/tacker/tacker/tests/xtesting/api-tests/SOL005/CNFPrecondition/vnfpackage.zip b/tacker/tacker/tests/xtesting/api-tests/SOL005/CNFPrecondition/vnfpackage.zip
new file mode 100644 (file)
index 0000000..9c74075
Binary files /dev/null and b/tacker/tacker/tests/xtesting/api-tests/SOL005/CNFPrecondition/vnfpackage.zip differ
diff --git a/tacker/tacker/tests/xtesting/requirements.txt b/tacker/tacker/tests/xtesting/requirements.txt
new file mode 100644 (file)
index 0000000..945b8c1
--- /dev/null
@@ -0,0 +1,7 @@
+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
diff --git a/tacker/tacker/tests/xtesting/testcases.yaml b/tacker/tacker/tests/xtesting/testcases.yaml
new file mode 100644 (file)
index 0000000..12582e7
--- /dev/null
@@ -0,0 +1,30 @@
+---
+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
+