summaryrefslogtreecommitdiffstats
path: root/kubernetes/config/docker/init/src/config/robot/robot/resources
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/config/docker/init/src/config/robot/robot/resources')
-rw-r--r--kubernetes/config/docker/init/src/config/robot/robot/resources/asdc_interface.robot21
-rw-r--r--kubernetes/config/docker/init/src/config/robot/robot/resources/policy_interface.robot2
-rw-r--r--kubernetes/config/docker/init/src/config/robot/robot/resources/sdngc_interface.robot29
3 files changed, 41 insertions, 11 deletions
diff --git a/kubernetes/config/docker/init/src/config/robot/robot/resources/asdc_interface.robot b/kubernetes/config/docker/init/src/config/robot/robot/resources/asdc_interface.robot
index 72407defe5..3020603ef8 100644
--- a/kubernetes/config/docker/init/src/config/robot/robot/resources/asdc_interface.robot
+++ b/kubernetes/config/docker/init/src/config/robot/robot/resources/asdc_interface.robot
@@ -68,8 +68,9 @@ Distribute Model From ASDC
Distribute ASDC Catalog Service ${catalog_service_id}
${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id}
${vf_module}= Find Element In Array ${loop_catalog_resource_resp['groups']} type org.openecomp.groups.VfModule
- [Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id}
Check Catalog Service Distributed ${catalog_service_resp['uuid']}
+ [Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id}
+
Setup ASDC Catalog Resource
[Documentation] Creates all the steps a vf needs for an asdc catalog resource and returns the id
[Arguments] ${model_zip_path}
@@ -289,13 +290,15 @@ Certify ASDC Catalog Resource
${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${ASDC_TESTER_USER_ID}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp.json()['uniqueId']}
+
Upload ASDC Heat Package
[Documentation] Creates an asdc Software Product and returns its id
[Arguments] ${software_product_id} ${file_path} ${version_id}=0.1
- ${file}= Get Binary File ${file_path}
- ${files}= Create Dictionary upload=${file}
+ ${files}= Create Dictionary
+ Create Multi Part ${files} upload ${file_path} contentType=application/zip
${resp}= Run ASDC Post Files Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${software_product_id}/versions/${version_id}${ASDC_VENDOR_SOFTWARE_UPLOAD_PATH} ${files} ${ASDC_DESIGNER_USER_ID}
Should Be Equal As Strings ${resp.status_code} 200
+
Add ASDC Catalog Service
[Documentation] Creates an asdc Catalog Service and returns its id
[Arguments] ${catalog_service_name}
@@ -431,6 +434,7 @@ Run ASDC Put Request
${resp}= Put Request asdc ${data_path} data=${data} headers=${headers}
Log Received response from asdc ${resp.text}
[Return] ${resp}
+
Run ASDC Post Files Request
[Documentation] Runs an ASDC post request
[Arguments] ${data_path} ${files} ${user}=${ASDC_DESIGNER_USER_ID}
@@ -442,6 +446,7 @@ Run ASDC Post Files Request
${resp}= Post Request asdc ${data_path} files=${files} headers=${headers}
Log Received response from asdc ${resp.text}
[Return] ${resp}
+
Run ASDC Post Request
[Documentation] Runs an ASDC post request
[Arguments] ${data_path} ${data} ${user}=${ASDC_DESIGNER_USER_ID}
@@ -471,9 +476,17 @@ Open ASDC GUI
##Setup Browser
Go To ${ASDC_FE_ENDPOINT}${PATH}
Maximize Browser Window
- Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
+
Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
Log Logging in to ${ASDC_FE_ENDPOINT}${PATH}
Title Should Be ASDC
Wait Until Page Contains Element xpath=//div/a[text()='SDC'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
Log Logged in to ${ASDC_FE_ENDPOINT}${PATH}
+
+
+Create Multi Part
+ [Arguments] ${addTo} ${partName} ${filePath} ${contentType}=${None}
+ ${fileData}= Get Binary File ${filePath}
+ ${fileDir} ${fileName}= Split Path ${filePath}
+ ${partData}= Create List ${fileName} ${fileData} ${contentType}
+ Set To Dictionary ${addTo} ${partName}=${partData}
diff --git a/kubernetes/config/docker/init/src/config/robot/robot/resources/policy_interface.robot b/kubernetes/config/docker/init/src/config/robot/robot/resources/policy_interface.robot
index 4798c91d60..6887ce6b56 100644
--- a/kubernetes/config/docker/init/src/config/robot/robot/resources/policy_interface.robot
+++ b/kubernetes/config/docker/init/src/config/robot/robot/resources/policy_interface.robot
@@ -57,4 +57,4 @@ Run Policy Get Configs Request
${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH}
${resp}= Post Request policy ${data_path} data=${data} headers=${headers}
Log Received response from policy ${resp.text}
- [Return] ${resp}
+ [Return] ${resp} \ No newline at end of file
diff --git a/kubernetes/config/docker/init/src/config/robot/robot/resources/sdngc_interface.robot b/kubernetes/config/docker/init/src/config/robot/robot/resources/sdngc_interface.robot
index a2693b8fba..07a8445221 100644
--- a/kubernetes/config/docker/init/src/config/robot/robot/resources/sdngc_interface.robot
+++ b/kubernetes/config/docker/init/src/config/robot/robot/resources/sdngc_interface.robot
@@ -111,13 +111,12 @@ Get From Mapping
${vf_module_name}= Get From DIctionary ${vf_module} name
:for ${template} in @{templates}
\ Return From Keyword If '${template['name_pattern']}' in '${vf_module_name}' ${template}
- [Return] None
-
-
+ [Return] None
+
Preload One Vnf Topology
[Arguments] ${service_type_uuid} ${generic_vnf_name} ${generic_vnf_type} ${vf_module_name} ${vf_module_type} ${service} ${filename} ${uuid}
Return From Keyword If '${filename}' == ''
- ${data_template}= OperatingSystem.Get File ${PRELOAD_VNF_TOPOLOGY_OPERATION_BODY}/${filename}
+ ${data_template}= OperatingSystem.Get File ${PRELOAD_VNF_TOPOLOGY_OPERATION_BODY}/preload.template
${parameters}= Get Template Parameters ${filename} ${uuid}
Set To Dictionary ${parameters} generic_vnf_name=${generic_vnf_name} generic_vnf_type=${generic_vnf_type} service_type=${service_type_uuid} vf_module_name=${vf_module_name} vf_module_type=${vf_module_type} uuid=${uuid}
${data}= Fill JSON Template ${data_template} ${parameters}
@@ -136,6 +135,11 @@ Get Template Parameters
${valuemap}= Create Dictionary
Set To Dictionary ${valuemap} artifacts_version=${GLOBAL_INJECTED_ARTIFACTS_VERSION}
Set To Dictionary ${valuemap} network=${GLOBAL_INJECTED_NETWORK}
+ Set To Dictionary ${valuemap} public_net_id=${GLOBAL_INJECTED_PUBLIC_NET_ID}
+ Set To Dictionary ${valuemap} cloud_env=${GLOBAL_INJECTED_CLOUD_ENV}
+ Set To Dictionary ${valuemap} install_script_version=${GLOBAL_INJECTED_INSTALL_SCRIPT_VERSION}
+ Set To Dictionary ${valuemap} vm_image_name=${GLOBAL_INJECTED_VM_IMAGE_NAME}
+ Set To Dictionary ${valuemap} vm_flavor_name=${GLOBAL_INJECTED_VM_FLAVOR_NAME}
# update the value map with unique values.
Set To Dictionary ${valuemap} uuid=${uuid} hostid=${hostid} ecompnet=${ecompnet}
${parameters}= Create Dictionary
@@ -143,7 +147,9 @@ Get Template Parameters
Resolve Values Into Dictionary ${valuemap} ${defaults} ${parameters}
${suite_templates}= Get From Dictionary ${GLOBAL_PRELOAD_PARAMETERS} ${suite}
${template}= Get From Dictionary ${suite_templates} ${template}
- Resolve Values Into Dictionary ${valuemap} ${template} ${parameters}
+ ${vnf_parameters}= Resolve VNF Parameters Into Array ${valuemap} ${template} ${parameters}
+ ${vnf_parameters_json}= Evaluate json.dumps(${vnf_parameters}) json
+ Set To Dictionary ${parameters} vnf_parameters=${vnf_parameters_json}
[Return] ${parameters}
Resolve Values Into Dictionary
@@ -153,6 +159,17 @@ Resolve Values Into Dictionary
\ ${value}= Get From Dictionary ${from} ${key}
\ ${value}= Template String ${value} ${valuemap}
\ Set To Dictionary ${to} ${key} ${value}
+
+Resolve VNF Parameters Into Array
+ [Arguments] ${valuemap} ${from} ${to}
+ ${vnf_parameters}= Create List
+ ${keys}= Get Dictionary Keys ${from}
+ :for ${key} in @{keys}
+ \ ${value}= Get From Dictionary ${from} ${key}
+ \ ${value}= Template String ${value} ${valuemap}
+ \ ${parameter}= Create Dictionary vnf-parameter-name=${key} vnf-parameter-value=${value}
+ \ Append To List ${vnf_parameters} ${parameter}
+ [Return] ${vnf_parameters}
Preload Vnf Profile
[Arguments] ${vnf_name}
@@ -202,4 +219,4 @@ Login To SDNGC Admin GUI
Input Password xpath=//input[@id='password'] ${shortened_uuid}
Click Button xpath=//button[@type='submit']
Title Should Be SDN-C AdminPortal
- Log Logged in to ${SDNGC_ADMIN_LOGIN_URL}
+ Log Logged in to ${SDNGC_ADMIN_LOGIN_URL} \ No newline at end of file