sleep $i
done
+# print catalog config
+docker cp vfc-catalog:/service/vfc/nfvo/catalog/catalog/pub/config/config.py ./
+cat config.py
+
+# print catalog log
docker cp vfc-catalog:/service/vfc/nfvo/catalog/logs/runtime_catalog.log ./
cat runtime_catalog.log
# Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v MSB_IP:${MSB_IP} -v CATALOG_IP:${CATALOG_IP} -v MSB_DISCOVERY_IP:${DISCOVERY_IP}"
+ROBOT_VARIABLES="-v MSB_IP:${MSB_IP} -v CATALOG_IP:${CATALOG_IP} -v MSB_DISCOVERY_IP:${DISCOVERY_IP} -v SCRIPTS:${SCRIPTS}"
+++ /dev/null
-#!/bin/bash
-#
-# Copyright (C) 2019 Nokia Intellectual Property. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Place the scripts in run order:
-
-/usr/bin/Xvfb :0 -screen 0 1024x768x24&
-export DISPLAY=:0
-
-source ${SCRIPTS}/common_functions.sh
-source ${WORKSPACE}/scripts/vid/clone_and_setup_vid_data.sh
-source ${WORKSPACE}/scripts/vid/start_vid_containers.sh
-
-echo "Obtaining ip of VID server..."
-VID_IP=`get-instance-ip.sh vid-server`
-SO_SIMULATOR_IP=`get-instance-ip.sh so-simulator`
-
-bypass_ip_address ${VID_IP}
-bypass_ip_address ${SO_SIMULATOR_IP}
-
-echo VID_IP=${VID_IP}
-echo SO_SIMULATOR_IP=${SO_SIMULATOR_IP}
-
-
-# Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v VID_IP:${VID_IP} -v SO_SIMULATOR_IP:${SO_SIMULATOR_IP}"
-
-pip install assertpy
-pip install requests
\ No newline at end of file
+++ /dev/null
-#!/bin/bash
-#
-# Copyright (C) 2019 Nokia Intellectual Property. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-source ${WORKSPACE}/scripts/vid/kill_containers_and_remove_dataFolders.sh
\ No newline at end of file
+++ /dev/null
-# Test suites are relative paths under [integration/csit.git]/tests/.
-# Place the suites in run order.
-
-vid/newVNFChange
\ No newline at end of file
vid/healthCheck
vid/login
vid/https-connection
-vid/scaleOut
\ No newline at end of file
+vid/scaleOut
+vid/newVNFChange
\ No newline at end of file
--- /dev/null
+{
+ "filters": {
+ "notificationTypes": [
+ "VnfPackageOnboardingNotification"
+ ],
+ "vnfProductsFromProviders": {
+ "vnfProvider": "string",
+ "vnfProducts": {
+ "vnfProductName": "string",
+ "versions": {
+ "vnfSoftwareVersion": "string",
+ "vnfdVersions": [
+ "string"
+ ]
+ }
+ }
+ },
+ "vnfdId": [
+ "3fa85f64-5717-4562-b3fc-2c963f66afa6"
+ ],
+ "vnfPkgId": [
+ "3fa85f64-5717-4562-b3fc-2c963f66afa6"
+ ],
+ "operationalState": [
+ "ENABLED"
+ ],
+ "usageState": [
+ "IN_USE"
+ ]
+ },
+ "callbackUri": "http://127.0.0.1:8806/api/catalog/v1/callback_sample",
+ "authentication": {
+ "authType": [
+ "BASIC"
+ ],
+ "paramsBasic": {
+ "userName": "string",
+ "password": "string"
+ }
+ }
+}
*** settings ***
+Resource ../../common.robot
Library Collections
Library RequestsLibrary
Library OperatingSystem
Library json
+Library HttpLibrary.HTTP
*** Variables ***
-@{return_ok_list}= 200 201 202
+@{return_ok_list}= 200 201 202 204
+${catalog_port} 8806
${queryswagger_url} /api/catalog/v1/swagger.json
${queryVNFPackage_url} /api/catalog/v1/vnfpackages
${queryNSPackages_url} /api/catalog/v1/nspackages
${healthcheck_url} /api/catalog/v1/health_check
+${create_subs_url} /api/vnfpkgm/v1/subscriptions
+${delete_subs_url} /api/vnfpkgm/v1/subscriptions
+
+#json files
+${vnf_subscription_json} ${SCRIPTS}/../tests/vfc/nfvo-catalog/jsons/vnf_subscription.json
+
+#global variables
+${subscriptionId}
*** Test Cases ***
GetVNFPackages
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${CATALOG_IP}:8806 headers=${headers}
+ Create Session web_session http://${CATALOG_IP}:${catalog_port} headers=${headers}
${resp}= Get Request web_session ${queryVNFPackage_url}
${responese_code}= Convert To String ${resp.status_code}
List Should Contain Value ${return_ok_list} ${responese_code}
CatalogHealthCheckTest
[Documentation] check health for catalog by MSB
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${CATALOG_IP}:8806 headers=${headers}
+ Create Session web_session http://${CATALOG_IP}:${catalog_port} headers=${headers}
${resp}= Get Request web_session ${healthcheck_url}
${responese_code}= Convert To String ${resp.status_code}
List Should Contain Value ${return_ok_list} ${responese_code}
${response_json} json.loads ${resp.content}
${health_status}= Convert To String ${response_json['status']}
Should Be Equal ${health_status} active
+
+CreateVnfSubscriptionTest
+ [Documentation] Create Vnf Subscription function test
+ ${json_value}= json_from_file ${vnf_subscription_json}
+ ${json_string}= string_from_json ${json_value}
+ ${headers} Create Dictionary Content-Type=application/json Accept=application/json
+ Create Session web_session http://${CATALOG_IP}:${catalog_port} headers=${headers}
+ Set Request Body ${json_string}
+ ${resp}= Post Request web_session ${create_subs_url} ${json_string}
+ ${responese_code}= Convert To String ${resp.status_code}
+ List Should Contain Value ${return_ok_list} ${responese_code}
+ ${response_json} json.loads ${resp.content}
+ ${callback_uri}= Convert To String ${response_json['callbackUri']}
+ Should Be Equal ${callback_uri} http://127.0.0.1:${catalog_port}/api/catalog/v1/callback_sample
+ ${subscriptionId}= Convert To String ${response_json['id']}
+ Set Global Variable ${subscriptionId}
+
+DeleteVnfSubscriptionTest
+ [Documentation] Delete Vnf Subscription function test
+ ${headers} Create Dictionary Content-Type=application/json Accept=application/json
+ Create Session web_session http://${CATALOG_IP}:${catalog_port} headers=${headers}
+ ${resp}= Delete Request web_session ${delete_subs_url}/${subscriptionId}
+ ${responese_code}= Convert To String ${resp.status_code}
+ List Should Contain Value ${return_ok_list} ${responese_code}
Click Element xpath=//a[contains(text(),'vnf-ws')]
Select From List xpath=//select[@name='workflow'] VNF In Place Software Update
- #temp solution
- #Click Button xpath=//button[@id='cancel']
Wait Until Page Contains Operations timeout ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
Input Text xpath=//input[@id='internal-workflow-parameter-text-2'] 10
Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${dc}
Setup Browser Chrome
- #${os}= Get Normalized Os
- #Log Normalized OS=${os}
${chrome options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys
Call Method ${chrome options} add_argument no-sandbox
${dc} Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.CHROME sys, selenium.webdriver