summaryrefslogtreecommitdiffstats
path: root/resources/config/robot
diff options
context:
space:
mode:
authorMandeep Khinda <mandeep.khinda@amdocs.com>2018-04-17 03:26:26 +0000
committerMandeep Khinda <mandeep.khinda@amdocs.com>2018-04-17 13:59:30 +0000
commit15b8fc55f8c290f83a32fdd4d4200b3f99915e5b (patch)
treee9b6d49d0d59522e20cb4f7a2c502f6f3ccc1443 /resources/config/robot
parentfd63a1566eed843659da9151fad0b832220cd6ba (diff)
Synching robot up with Beijing code
-updating configmaps with master -parameterizing auth -removing asdc interface fork. no longer needed as be/fe are split -fixing spaces -aligning with templates better -adding comments to values that need overriding per environment -injecting demo project into container in /share/heat on startup -addressing comment on demo-k8s.sh Issue-ID: OOM-795 Change-Id: Iebc959c20491e3e2ca8cf64f22444918650d1970 Signed-off-by: Mandeep Khinda <mandeep.khinda@amdocs.com>
Diffstat (limited to 'resources/config/robot')
-rw-r--r--resources/config/robot/resources/asdc_interface.robot495
-rw-r--r--resources/config/robot/resources/policy_interface.robot7
-rw-r--r--resources/config/robot/resources/sdngc_interface.robot96
3 files changed, 62 insertions, 536 deletions
diff --git a/resources/config/robot/resources/asdc_interface.robot b/resources/config/robot/resources/asdc_interface.robot
deleted file mode 100644
index 5b69a66..0000000
--- a/resources/config/robot/resources/asdc_interface.robot
+++ /dev/null
@@ -1,495 +0,0 @@
-*** Settings ***
-Documentation The main interface for interacting with ASDC. It handles low level stuff like managing the http request library and DCAE required fields
-Library RequestsLibrary
-Library UUID
-Library JSONUtils
-Library OperatingSystem
-Library Collections
-Library ExtendedSelenium2Library
-Resource global_properties.robot
-Resource browser_setup.robot
-Resource json_templater.robot
-*** Variables ***
-${ASDC_DESIGNER_USER_ID} cs0008
-${ASDC_TESTER_USER_ID} jm0007
-${ASDC_GOVERNOR_USER_ID} gv0001
-${ASDC_OPS_USER_ID} op0001
-${ASDC_HEALTH_CHECK_PATH} /sdc1/rest/healthCheck
-${ASDC_VENDOR_LICENSE_MODEL_PATH} /onboarding-api/v1.0/vendor-license-models
-${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH} /onboarding-api/v1.0/vendor-software-products
-${ASDC_VENDOR_KEY_GROUP_PATH} /license-key-groups
-${ASDC_VENDOR_ENTITLEMENT_POOL_PATH} /entitlement-pools
-${ASDC_VENDOR_FEATURE_GROUP_PATH} /feature-groups
-${ASDC_VENDOR_LICENSE_AGREEMENT_PATH} /license-agreements
-${ASDC_VENDOR_ACTIONS_PATH} /actions
-${ASDC_VENDOR_SOFTWARE_UPLOAD_PATH} /orchestration-template-candidate
-${ASDC_CATALOG_RESOURCES_PATH} /sdc2/rest/v1/catalog/resources
-${ASDC_CATALOG_SERVICES_PATH} /sdc2/rest/v1/catalog/services
-${ASDC_CATALOG_INACTIVE_RESOURCES_PATH} /sdc2/rest/v1/inactiveComponents/resource
-${ASDC_CATALOG_INACTIVE_SERVICES_PATH} /sdc2/rest/v1/inactiveComponents/service
-${ASDC_CATALOG_LIFECYCLE_PATH} /lifecycleState
-${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} /resourceInstance
-${ASDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH} /distribution-state
-${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH} /distribution
-${ASDC_DISTRIBUTION_STATE_APPROVE_PATH} /approve
-${ASDC_CATALOG_SERVICE_DISTRIBUTION_ACTIVATE_PATH} /distribution/PROD/activate
-${ASDC_LICENSE_MODEL_TEMPLATE} robot/assets/templates/asdc/license_model.template
-${ASDC_KEY_GROUP_TEMPLATE} robot/assets/templates/asdc/key_group.template
-${ASDC_ENTITLEMENT_POOL_TEMPLATE} robot/assets/templates/asdc/entitlement_pool.template
-${ASDC_FEATURE_GROUP_TEMPLATE} robot/assets/templates/asdc/feature_group.template
-${ASDC_LICENSE_AGREEMENT_TEMPLATE} robot/assets/templates/asdc/license_agreement.template
-${ASDC_ACTION_TEMPLATE} robot/assets/templates/asdc/action.template
-${ASDC_SOFTWARE_PRODUCT_TEMPLATE} robot/assets/templates/asdc/software_product.template
-${ASDC_CATALOG_RESOURCE_TEMPLATE} robot/assets/templates/asdc/catalog_resource.template
-${ASDC_USER_REMARKS_TEMPLATE} robot/assets/templates/asdc/user_remarks.template
-${ASDC_CATALOG_SERVICE_TEMPLATE} robot/assets/templates/asdc/catalog_service.template
-${ASDC_RESOURCE_INSTANCE_TEMPLATE} robot/assets/templates/asdc/resource_instance.template
-${ASDC_FE_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_FE_IP_ADDR}:${GLOBAL_ASDC_FE_PORT}
-${ASDC_BE_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_BE_IP_ADDR}:${GLOBAL_ASDC_BE_PORT}
-
-*** Keywords ***
-Distribute Model From ASDC
- [Documentation] goes end to end creating all the asdc objects based ona model and distributing it to the systems. it then returns the service name, vf name and vf module name
- [Arguments] ${model_zip_path} ${catalog_service_name}=
- ${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name}
- ${catalog_resource_ids}= Create List
- ${catalog_resources}= Create Dictionary
- : FOR ${zip} IN @{model_zip_path}
- \ ${loop_catalog_resource_id}= Setup ASDC Catalog Resource ${zip}
- \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id}
- \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id}
- \ Add ASDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${loop_catalog_resource_resp['name']}
- \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp}
- ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id}
- Checkin ASDC Catalog Service ${catalog_service_id}
- Request Certify ASDC Catalog Service ${catalog_service_id}
- Start Certify ASDC Catalog Service ${catalog_service_id}
- # on certify it gets a new id
- ${catalog_service_id}= Certify ASDC Catalog Service ${catalog_service_id}
- Approve ASDC Catalog Service ${catalog_service_id}
- 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
- 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} ${catalog_resources}
-
-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}
- ${license_model_id}= Add ASDC License Model
- ${key_group_id}= Add ASDC License Group ${license_model_id}
- ${pool_id}= Add ASDC Entitlement Pool ${license_model_id}
- ${feature_group_id}= Add ASDC Feature Group ${license_model_id} ${key_group_id} ${pool_id}
- ${license_agreement_id}= Add ASDC License Agreement ${license_model_id} ${feature_group_id}
- Checkin ASDC License Model ${license_model_id}
- Submit ASDC License Model ${license_model_id}
- ${license_model_resp}= Get ASDC License Model ${license_model_id} 1.0
- ${software_product_id}= Add ASDC Software Product ${license_agreement_id} ${feature_group_id} ${license_model_resp['vendorName']} ${license_model_id}
- Upload ASDC Heat Package ${software_product_id} ${model_zip_path}
- Validate ASDC Software Product ${software_product_id}
- Checkin ASDC Software Product ${software_product_id}
- Submit ASDC Software Product ${software_product_id}
- Package ASDC Software Product ${software_product_id}
- ${software_product_resp}= Get ASDC Software Product ${software_product_id} 1.0
- ${catalog_resource_id}= Add ASDC Catalog Resource ${license_agreement_id} ${software_product_resp['name']} ${license_model_resp['vendorName']} ${software_product_id}
- Checkin ASDC Catalog Resource ${catalog_resource_id}
- Request Certify ASDC Catalog Resource ${catalog_resource_id}
- Start Certify ASDC Catalog Resource ${catalog_resource_id}
- # on certify it gets a new id
- [Return] ${catalog_resource_id}
- ${catalog_resource_id}= Certify ASDC Catalog Resource ${catalog_resource_id}
-Add ASDC License Model
- [Documentation] Creates an asdc license model and returns its id
- ${uuid}= Generate UUID
- ${shortened_uuid}= Evaluate str("${uuid}")[:23]
- ${map}= Create Dictionary vendor_name=${shortened_uuid}
- ${data}= Fill JSON Template File ${ASDC_LICENSE_MODEL_TEMPLATE} ${map}
- ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH} ${data}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()['value']}
-Get ASDC License Model
- [Documentation] gets an asdc license model by its id
- [Arguments] ${id} ${version_id}=0.1
- ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}
- [Return] ${resp.json()}
-Get ASDC License Models
- [Documentation] gets an asdc license model by its id
- ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}
- [Return] ${resp.json()}
-Checkin ASDC License Model
- [Documentation] checksin an asdc license model by its id
- [Arguments] ${id} ${version_id}=0.1
- ${map}= Create Dictionary action=Checkin
- ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map}
- ${resp}= Run ASDC Put Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()}
-Submit ASDC License Model
- [Documentation] submits an asdc license model by its id
- [Arguments] ${id} ${version_id}=0.1
- ${map}= Create Dictionary action=Submit
- ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map}
- ${resp}= Run ASDC Put Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()}
-Checkin ASDC Software Product
- [Documentation] checksin an asdc Software Product by its id
- [Arguments] ${id} ${version_id}=0.1
- ${map}= Create Dictionary action=Checkin
- ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map}
- ${resp}= Run ASDC Put Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()}
-Validate ASDC Software Product
- [Documentation] checksin an asdc Software Product by its id
- [Arguments] ${id} ${version_id}=0.1
- ${data}= Catenate
- ${resp}= Run ASDC Put Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}/orchestration-template-candidate/process ${data}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()}
-Submit ASDC Software Product
- [Documentation] submits an asdc Software Product by its id
- [Arguments] ${id} ${version_id}=0.1
- ${map}= Create Dictionary action=Submit
- ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map}
- ${resp}= Run ASDC Put Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()}
-Package ASDC Software Product
- [Documentation] creates_package on an asdc Software Product by its id
- [Arguments] ${id} ${version_id}=0.1
- ${map}= Create Dictionary action=Create_Package
- ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map}
- ${resp}= Run ASDC Put Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()}
-Add ASDC Entitlement Pool
- [Documentation] Creates an asdc Entitlement Pool and returns its id
- [Arguments] ${license_model_id} ${version_id}=0.1
- ${uuid}= Generate UUID
- ${shortened_uuid}= Evaluate str("${uuid}")[:23]
- ${map}= Create Dictionary entitlement_pool_name=${shortened_uuid}
- ${data}= Fill JSON Template File ${ASDC_ENTITLEMENT_POOL_TEMPLATE} ${map}
- ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_ENTITLEMENT_POOL_PATH} ${data}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()['value']}
-Get ASDC Entitlement Pool
- [Documentation] gets an asdc Entitlement Pool by its id
- [Arguments] ${license_model_id} ${pool_id}
- ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${ASDC_VENDOR_ENTITLEMENT_POOL_PATH}/${pool_id}
- [Return] ${resp.json()}
-Add ASDC License Group
- [Documentation] Creates an asdc license group and returns its id
- [Arguments] ${license_model_id} ${version_id}=0.1
- ${uuid}= Generate UUID
- ${shortened_uuid}= Evaluate str("${uuid}")[:23]
- ${map}= Create Dictionary key_group_name=${shortened_uuid}
- ${data}= Fill JSON Template File ${ASDC_KEY_GROUP_TEMPLATE} ${map}
- ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_KEY_GROUP_PATH} ${data}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()['value']}
-Get ASDC License Group
- [Documentation] gets an asdc license group by its id
- [Arguments] ${license_model_id} ${group_id} ${version_id}
- ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_KEY_GROUP_PATH}/${group_id}
- [Return] ${resp.json()}
-Add ASDC Feature Group
- [Documentation] Creates an asdc Feature Group and returns its id
- [Arguments] ${license_model_id} ${key_group_id} ${entitlement_pool_id} ${version_id}=0.1
- ${uuid}= Generate UUID
- ${shortened_uuid}= Evaluate str("${uuid}")[:23]
- ${map}= Create Dictionary feature_group_name=${shortened_uuid} key_group_id=${key_group_id} entitlement_pool_id=${entitlement_pool_id} manufacturer_reference_number=mrn${shortened_uuid}
- ${data}= Fill JSON Template File ${ASDC_FEATURE_GROUP_TEMPLATE} ${map}
- ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_FEATURE_GROUP_PATH} ${data}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()['value']}
-Get ASDC Feature Group
- [Documentation] gets an asdc Feature Group by its id
- [Arguments] ${license_model_id} ${group_id}
- ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${ASDC_VENDOR_FEATURE_GROUP_PATH}/${group_id}
- [Return] ${resp.json()}
-Add ASDC License Agreement
- [Documentation] Creates an asdc License Agreement and returns its id
- [Arguments] ${license_model_id} ${feature_group_id} ${version_id}=0.1
- ${uuid}= Generate UUID
- ${shortened_uuid}= Evaluate str("${uuid}")[:23]
- ${map}= Create Dictionary license_agreement_name=${shortened_uuid} feature_group_id=${feature_group_id}
- ${data}= Fill JSON Template File ${ASDC_LICENSE_AGREEMENT_TEMPLATE} ${map}
- ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_LICENSE_AGREEMENT_PATH} ${data}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()['value']}
-Get ASDC License Agreement
- [Documentation] gets an asdc License Agreement by its id
- [Arguments] ${license_model_id} ${agreement_id}
- ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${ASDC_VENDOR_LICENSE_AGREEMENT_PATH}/${agreement_id}
- [Return] ${resp.json()}
-Add ASDC Software Product
- [Documentation] Creates an asdc Software Product and returns its id
- [Arguments] ${license_agreement_id} ${feature_group_id} ${license_model_name} ${license_model_id}
- ${uuid}= Generate UUID
- ${shortened_uuid}= Evaluate str("${uuid}")[:23]
- ${map}= Create Dictionary software_product_name=${shortened_uuid} feature_group_id=${feature_group_id} license_agreement_id=${license_agreement_id} vendor_name=${license_model_name} vendor_id=${license_model_id}
- ${data}= Fill JSON Template File ${ASDC_SOFTWARE_PRODUCT_TEMPLATE} ${map}
- ${resp}= Run ASDC Post Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH} ${data}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()['vspId']}
-Get ASDC Software Product
- [Documentation] gets an asdc Software Product by its id
- [Arguments] ${software_product_id} ${version_id}=0.1
- ${resp}= Run ASDC Get Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${software_product_id}/versions/${version_id}
- [Return] ${resp.json()}
-Add ASDC Catalog Resource
- [Documentation] Creates an asdc Catalog Resource and returns its id
- [Arguments] ${license_agreement_id} ${software_product_name} ${license_model_name} ${software_product_id}
- ${map}= Create Dictionary software_product_id=${software_product_id} software_product_name=${software_product_name} license_agreement_id=${license_agreement_id} vendor_name=${license_model_name}
- ${data}= Fill JSON Template File ${ASDC_CATALOG_RESOURCE_TEMPLATE} ${map}
- ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH} ${data} ${ASDC_DESIGNER_USER_ID}
- Should Be Equal As Strings ${resp.status_code} 201
- [Return] ${resp.json()['uniqueId']}
-Mark ASDC Catalog Resource Inactive
- [Documentation] deletes an asdc Catalog Resource
- [Arguments] ${catalog_resource_id}
- ${resp}= Run ASDC Delete Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id} ${ASDC_DESIGNER_USER_ID}
- Should Be Equal As Strings ${resp.status_code} 204
- [Return] ${resp}
-Delete Inactive ASDC Catalog Resources
- [Documentation] delete all asdc Catalog Resources that are inactive
- ${resp}= Run ASDC Delete Request ${ASDC_CATALOG_INACTIVE_RESOURCES_PATH} ${ASDC_DESIGNER_USER_ID}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()}
-Get ASDC Catalog Resource
- [Documentation] gets an asdc Catalog Resource by its id
- [Arguments] ${catalog_resource_id}
- ${resp}= Run ASDC Get Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id} ${ASDC_DESIGNER_USER_ID}
- [Return] ${resp.json()}
-Checkin ASDC Catalog Resource
- [Documentation] checksin an asdc Catalog Resource by its id
- [Arguments] ${catalog_resource_id}
- ${map}= Create Dictionary user_remarks=Robot remarks
- ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
- ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} ${ASDC_DESIGNER_USER_ID}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()}
-Request Certify ASDC Catalog Resource
- [Documentation] requests certify on an asdc Catalog Resource by its id
- [Arguments] ${catalog_resource_id}
- ${map}= Create Dictionary user_remarks=Robot remarks
- ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
- ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${ASDC_DESIGNER_USER_ID}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()}
-Start Certify ASDC Catalog Resource
- [Documentation] start certify an asdc Catalog Resource by its id
- [Arguments] ${catalog_resource_id}
- ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/startCertification ${None} ${ASDC_TESTER_USER_ID}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()}
-Certify ASDC Catalog Resource
- [Documentation] start certify an asdc Catalog Resource by its id and returns the new id
- [Arguments] ${catalog_resource_id}
- ${map}= Create Dictionary user_remarks=Robot remarks
- ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
- ${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
- ${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}
- ${uuid}= Generate UUID
- ${shortened_uuid}= Evaluate str("${uuid}")[:23]
- ${catalog_service_name}= Set Variable If '${catalog_service_name}' =='' ${shortened_uuid} ${catalog_service_name}
- ${map}= Create Dictionary service_name=${catalog_service_name}
- ${data}= Fill JSON Template File ${ASDC_CATALOG_SERVICE_TEMPLATE} ${map}
- ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH} ${data} ${ASDC_DESIGNER_USER_ID}
- Should Be Equal As Strings ${resp.status_code} 201
- [Return] ${resp.json()['uniqueId']}
-Mark ASDC Catalog Service Inactive
- [Documentation] Deletes an asdc Catalog Service
- [Arguments] ${catalog_service_id}
- ${resp}= Run ASDC Delete Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id} ${ASDC_DESIGNER_USER_ID}
- Should Be Equal As Strings ${resp.status_code} 204
- [Return] ${resp}
-Delete Inactive ASDC Catalog Services
- [Documentation] delete all asdc Catalog Serivces that are inactive
- ${resp}= Run ASDC Delete Request ${ASDC_CATALOG_INACTIVE_SERVICES_PATH} ${ASDC_DESIGNER_USER_ID}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()}
-Get ASDC Catalog Service
- [Documentation] gets an asdc Catalog Service by its id
- [Arguments] ${catalog_service_id}
- ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id} ${ASDC_DESIGNER_USER_ID}
- [Return] ${resp.json()}
-Checkin ASDC Catalog Service
- [Documentation] checksin an asdc Catalog Service by its id
- [Arguments] ${catalog_service_id}
- ${map}= Create Dictionary user_remarks=Robot remarks
- ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
- ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} ${ASDC_DESIGNER_USER_ID}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()}
-Request Certify ASDC Catalog Service
- [Documentation] requests certify on an asdc Catalog Service by its id
- [Arguments] ${catalog_service_id}
- ${map}= Create Dictionary user_remarks=Robot remarks
- ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
- ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${ASDC_DESIGNER_USER_ID}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()}
-Start Certify ASDC Catalog Service
- [Documentation] start certify an asdc Catalog Service by its id
- [Arguments] ${catalog_service_id}
- ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/startCertification ${None} ${ASDC_TESTER_USER_ID}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()}
-Certify ASDC Catalog Service
- [Documentation] start certify an asdc Catalog Service by its id and returns the new id
- [Arguments] ${catalog_service_id}
- ${map}= Create Dictionary user_remarks=Robot remarks
- ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
- ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${ASDC_TESTER_USER_ID}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()['uniqueId']}
-Approve ASDC Catalog Service
- [Documentation] approve an asdc Catalog Service by its id
- [Arguments] ${catalog_service_id}
- ${map}= Create Dictionary user_remarks=Robot remarks
- ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
- ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH}${ASDC_DISTRIBUTION_STATE_APPROVE_PATH} ${data} ${ASDC_GOVERNOR_USER_ID}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()}
-Distribute ASDC Catalog Service
- [Documentation] distribute an asdc Catalog Service by its id
- [Arguments] ${catalog_service_id}
- ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_DISTRIBUTION_ACTIVATE_PATH} ${None} ${ASDC_OPS_USER_ID}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()}
-Add ASDC Resource Instance
- [Documentation] Creates an asdc Resource Instance and returns its id
- [Arguments] ${catalog_service_id} ${catalog_resource_id} ${catalog_resource_name}
- ${milli_timestamp}= Generate MilliTimestamp UUID
- ${map}= Create Dictionary catalog_resource_id=${catalog_resource_id} catalog_resource_name=${catalog_resource_name} milli_timestamp=${milli_timestamp}
- ${data}= Fill JSON Template File ${ASDC_RESOURCE_INSTANCE_TEMPLATE} ${map}
- ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} ${data} ${ASDC_DESIGNER_USER_ID}
- Should Be Equal As Strings ${resp.status_code} 201
- [Return] ${resp.json()['uniqueId']}
-Get Catalog Service Distribution
- [Documentation] gets an asdc catalog Service distrbution
- [Arguments] ${catalog_service_uuid}
- ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_uuid}${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH} ${ASDC_OPS_USER_ID}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()}
-Check Catalog Service Distributed
- [Documentation] gets an asdc catalog Service distrbution
- [Arguments] ${catalog_service_uuid}
- ${dist_resp}= Get Catalog Service Distribution ${catalog_service_uuid}
- Should Be Equal As Strings ${dist_resp['distributionStatusOfServiceList'][0]['deployementStatus']} Distributed
- Sleep 3 minutes
- ${det_resp}= Get Catalog Service Distribution Details ${dist_resp['distributionStatusOfServiceList'][0]['distributionID']}
- @{ITEMS}= Copy List ${det_resp['distributionStatusList']}
- :FOR ${ELEMENT} IN @{ITEMS}
- \ Log ${ELEMENT['status']}
- \ Should Match Regexp ${ELEMENT['status']} ^(DEPLOY_OK|NOTIFIED|DOWNLOAD_OK|NOT_NOTIFIED)$
-Get Catalog Service Distribution Details
- [Documentation] gets an asdc catalog Service distrbution details
- [Arguments] ${catalog_service_distribution_id}
- ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH}/${catalog_service_distribution_id} ${ASDC_OPS_USER_ID}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()}
-Run ASDC Health Check
- [Documentation] Runs a ASDC health check
- ${session}= Create Session asdc ${ASDC_FE_ENDPOINT}
- ${uuid}= Generate UUID
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
- ${resp}= Get Request asdc ${ASDC_HEALTH_CHECK_PATH} headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 200
- @{ITEMS}= Copy List ${resp.json()['componentsInfo']}
- :FOR ${ELEMENT} IN @{ITEMS}
- \ Log ${ELEMENT['healthCheckStatus']}
- \ Should Be Equal As Strings ${ELEMENT['healthCheckStatus']} UP
-Run ASDC Get Request
- [Documentation] Runs an ASDC get request
- [Arguments] ${data_path} ${user}=${ASDC_DESIGNER_USER_ID}
- ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
- Log Creating session ${ASDC_BE_ENDPOINT}
- ${session}= Create Session asdc ${ASDC_BE_ENDPOINT} auth=${auth}
- ${uuid}= Generate UUID
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
- ${resp}= Get Request asdc ${data_path} headers=${headers}
- Log Received response from asdc ${resp.text}
- [Return] ${resp}
-Run ASDC Put Request
- [Documentation] Runs an ASDC put request
- [Arguments] ${data_path} ${data} ${user}=${ASDC_DESIGNER_USER_ID}
- ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
- Log Creating session ${ASDC_BE_ENDPOINT}
- ${session}= Create Session asdc ${ASDC_BE_ENDPOINT} auth=${auth}
- ${uuid}= Generate UUID
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
- ${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}
- ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
- Log Creating session ${ASDC_BE_ENDPOINT}
- ${session}= Create Session asdc ${ASDC_BE_ENDPOINT} auth=${auth}
- ${uuid}= Generate UUID
- ${headers}= Create Dictionary Accept=application/json Content-Type=multipart/form-data USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
- ${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}
- ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
- Log Creating session ${ASDC_BE_ENDPOINT}
- ${session}= Create Session asdc ${ASDC_BE_ENDPOINT} auth=${auth}
- ${uuid}= Generate UUID
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
- ${resp}= Post Request asdc ${data_path} data=${data} headers=${headers}
- Log Received response from asdc ${resp.text}
- [Return] ${resp}
-Run ASDC Delete Request
- [Documentation] Runs an ASDC delete request
- [Arguments] ${data_path} ${user}=${ASDC_DESIGNER_USER_ID}
- ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
- Log Creating session ${ASDC_BE_ENDPOINT}
- ${session}= Create Session asdc ${ASDC_BE_ENDPOINT} auth=${auth}
- ${uuid}= Generate UUID
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
- ${resp}= Delete Request asdc ${data_path} headers=${headers}
- Log Received response from asdc ${resp.text}
- [Return] ${resp}
-Open ASDC GUI
- [Documentation] Logs in to ASDC GUI
- [Arguments] ${PATH}
- ## Setup Browever now being managed by the test case
- ##Setup Browser
- Go To ${ASDC_FE_ENDPOINT}${PATH}
- Maximize Browser Window
-
- 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/resources/config/robot/resources/policy_interface.robot b/resources/config/robot/resources/policy_interface.robot
index 9193fe4..9656b7b 100644
--- a/resources/config/robot/resources/policy_interface.robot
+++ b/resources/config/robot/resources/policy_interface.robot
@@ -28,6 +28,7 @@ Run Policy Health Check
:FOR ${ELEMENT} IN @{ITEMS}
\ Should Be Equal As Strings ${ELEMENT['code']} 200
\ Should Be True ${ELEMENT['healthy']}
+
Run Policy Put Request
[Documentation] Runs Policy Put request
[Arguments] ${data_path} ${data}
@@ -37,6 +38,7 @@ Run Policy Put Request
${resp}= Put Request policy ${data_path} data=${data} headers=${headers}
Log Received response from policy ${resp.text}
[Return] ${resp}
+
Run Policy Delete Request
[Documentation] Runs Policy Delete request
[Arguments] ${data_path} ${data}
@@ -46,12 +48,13 @@ Run Policy Delete Request
${resp}= Delete Request policy ${data_path} data=${data} headers=${headers}
Log Received response from policy ${resp.text}
[Return] ${resp}
+
Run Policy Get Configs Request
[Documentation] Runs Policy Get Configs request
[Arguments] ${data_path} ${data}
Log Creating session ${POLICY_ENDPOINT}
${session}= Create Session policy ${POLICY_ENDPOINT}
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH}
+ ${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/resources/config/robot/resources/sdngc_interface.robot b/resources/config/robot/resources/sdngc_interface.robot
index 5b79f9a..57198db 100644
--- a/resources/config/robot/resources/sdngc_interface.robot
+++ b/resources/config/robot/resources/sdngc_interface.robot
@@ -1,7 +1,7 @@
*** Settings ***
Documentation The main interface for interacting with SDN-GC. It handles low level stuff like managing the http request library and SDN-GC required fields
Library RequestsLibrary
-Library UUID
+Library UUID
Library OperatingSystem
Library ExtendedSelenium2Library
Library Collections
@@ -30,7 +30,7 @@ Run SDNGC Health Check
[Documentation] Runs an SDNGC healthcheck
${resp}= Run SDNGC Post Request ${SDNGC_INDEX PATH}${SDNCGC_HEALTHCHECK_OPERATION_PATH} ${None}
Should Be Equal As Strings ${resp.status_code} 200
- Should Be Equal As Strings ${resp.json()['output']['response-code']} 200
+ Should Be Equal As Strings ${resp.json()['output']['response-code']} 200
Run SDNGC Get Request
[Documentation] Runs an SDNGC get request
@@ -43,7 +43,7 @@ Run SDNGC Get Request
${resp}= Get Request sdngc ${data_path} headers=${headers}
Log Received response from sdngc ${resp.text}
[Return] ${resp}
-
+
Run SDNGC Put Request
[Documentation] Runs an SDNGC put request
[Arguments] ${data_path} ${data}
@@ -66,8 +66,8 @@ Run SDNGC Post Request
${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
${resp}= Post Request sdngc ${data_path} data=${data} headers=${headers}
Log Received response from sdngc ${resp.text}
- [Return] ${resp}
-
+ [Return] ${resp}
+
Run SDNGC Delete Request
[Documentation] Runs an SDNGC delete request
[Arguments] ${data_path}
@@ -83,7 +83,7 @@ Run SDNGC Delete Request
Preload Vnf
[Arguments] ${service_type_uuid} ${generic_vnf_name} ${generic_vnf_type} ${vf_module_name} ${vf_modules} ${service} ${uuid}
- ${base_vf_module_type}= Catenate ''
+ ${base_vf_module_type}= Catenate
${closedloop_vf_module}= Create Dictionary
${templates}= Get From Dictionary ${GLOBAL_SERVICE_TEMPLATE_MAPPING} ${service}
:for ${vf_module} in @{vf_modules}
@@ -92,36 +92,36 @@ Preload Vnf
\ ${filename}= Get From Dictionary ${dict} template
\ ${base_vf_module_type}= Set Variable If '${dict['isBase']}' == 'true' ${vf_module_type} ${base_vf_module_type}
\ ${closedloop_vf_module}= Set Variable If '${dict['isBase']}' == 'false' ${vf_module} ${closedloop_vf_module}
- \ ${vf_name}= Update Module Name ${dict} ${vf_module_name}
- \ Preload Vnf Profile ${vf_module_type}
+ \ ${vf_name}= Update Module Name ${dict} ${vf_module_name}
+ \ Preload Vnf Profile ${vf_module_type}
\ Preload One Vnf Topology ${service_type_uuid} ${generic_vnf_name} ${generic_vnf_type} ${vf_name} ${vf_module_type} ${service} ${filename} ${uuid}
- [Return] ${base_vf_module_type} ${closedloop_vf_module}
+ [Return] ${base_vf_module_type} ${closedloop_vf_module}
Update Module Name
[Arguments] ${dict} ${vf_module_name}
Return From Keyword If 'prefix' not in ${dict} ${vf_module_name}
Return From Keyword If '${dict['prefix']}' == '' ${vf_module_name}
- ${name}= Replace String ${vf_module_name} Vfmodule_ ${dict['prefix']}
- [Return] ${name}
+ ${name}= Replace String ${vf_module_name} Vfmodule_ ${dict['prefix']}
+ [Return] ${name}
Get From Mapping
- [Documentation] Retrieve the appropriate prelad template entry for the passed vf_module
+ [Documentation] Retrieve the appropriate prelad template entry for the passed vf_module
[Arguments] ${templates} ${vf_module}
${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
-
+ :for ${template} in @{templates}
+ \ Return From Keyword If '${template['name_pattern']}' in '${vf_module_name}' ${template}
+ [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}/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}
+ 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}
+ ${data}= Fill JSON Template ${data_template} ${parameters}
${put_resp}= Run SDNGC Post Request ${SDNGC_INDEX_PATH}${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH} ${data}
- Should Be Equal As Strings ${put_resp.json()['output']['response-code']} 200
+ Should Be Equal As Strings ${put_resp.json()['output']['response-code']} 200
${get_resp}= Run SDNGC Get Request ${SDNGC_INDEX_PATH}${PRELOAD_VNF_CONFIG_PATH}/${vf_module_name}/${vf_module_type}
Should Be Equal As Strings ${get_resp.status_code} 200
@@ -130,29 +130,47 @@ Get Template Parameters
${rest} ${suite}= Split String From Right ${SUITE NAME} . 1
${uuid}= Catenate ${uuid}
${hostid}= Get Substring ${uuid} -4
- ${ecompnet}= Evaluate ${GLOBAL_BUILD_NUMBER}%255
+ ${ecompnet}= Evaluate (${GLOBAL_BUILD_NUMBER}%128)+128
+
+
# Initialize the value map with the properties generated from the Robot VM /opt/config folder
- ${valuemap}= Create Dictionary
+ ${valuemap}= Copy Dictionary ${GLOBAL_INJECTED_PROPERTIES}
+
+ # These should be deprecated by the above....
Set To Dictionary ${valuemap} artifacts_version=${GLOBAL_INJECTED_ARTIFACTS_VERSION}
- Set To Dictionary ${valuemap} network=${GLOBAL_INJECTED_NETWORK}
+ 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_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}
+
+
# update the value map with unique values.
Set To Dictionary ${valuemap} uuid=${uuid} hostid=${hostid} ecompnet=${ecompnet}
- ${parameters}= Create Dictionary
- ${defaults}= Get From Dictionary ${GLOBAL_PRELOAD_PARAMETERS} defaults
- Resolve Values Into Dictionary ${valuemap} ${defaults} ${parameters}
+
+ #
+ # Mash together the defaults dict with the test case dict to create the set of
+ # preload parameters
+ #
${suite_templates}= Get From Dictionary ${GLOBAL_PRELOAD_PARAMETERS} ${suite}
${template}= Get From Dictionary ${suite_templates} ${template}
- ${vnf_parameters}= Resolve VNF Parameters Into Array ${valuemap} ${template} ${parameters}
+ ${defaults}= Get From Dictionary ${GLOBAL_PRELOAD_PARAMETERS} defaults
+ # add all of the defaults to template...
+ @{keys}= Get Dictionary Keys ${defaults}
+ :for ${key} in @{keys}
+ \ ${value}= Get From Dictionary ${defaults} ${key}
+ \ Set To Dictionary ${template} ${key} ${value}
+
+ #
+ # Get the vnf_parameters to preload
+ #
+ ${vnf_parameters}= Resolve VNF Parameters Into Array ${valuemap} ${template}
${vnf_parameters_json}= Evaluate json.dumps(${vnf_parameters}) json
- Set To Dictionary ${parameters} vnf_parameters=${vnf_parameters_json}
+ ${parameters}= Create Dictionary vnf_parameters=${vnf_parameters_json}
[Return] ${parameters}
-
-Resolve Values Into Dictionary
+
+Resolve Values Into Dictionary
[Arguments] ${valuemap} ${from} ${to}
${keys}= Get Dictionary Keys ${from}
:for ${key} in @{keys}
@@ -161,7 +179,7 @@ Resolve Values Into Dictionary
\ Set To Dictionary ${to} ${key} ${value}
Resolve VNF Parameters Into Array
- [Arguments] ${valuemap} ${from} ${to}
+ [Arguments] ${valuemap} ${from}
${vnf_parameters}= Create List
${keys}= Get Dictionary Keys ${from}
:for ${key} in @{keys}
@@ -170,7 +188,7 @@ Resolve VNF Parameters Into Array
\ ${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}
Login To SDNGC Admin GUI
@@ -180,25 +198,25 @@ Preload Vnf Profile
Input Text xpath=//input[@id='nf_availability_zone_count'] 999
Input Text xpath=//input[@id='nf_equipment_role'] robot-ete-test
Click Button xpath=//button[contains(.,'Submit')]
- Page Should Contain VNF Profile
+ Page Should Contain VNF Profile
Input Text xpath=//div[@id='vnf_profile_filter']//input ${vnf_name}
- Page Should Contain ${vnf_name}
+ Page Should Contain ${vnf_name}
Delete Vnf Profile
[Arguments] ${vnf_name}
Login To SDNGC Admin GUI
Go To ${SDNGC_ADMIN_VNF_PROFILE_URL}
- Page Should Contain VNF Profile
+ Page Should Contain VNF Profile
Input Text xpath=//div[@id='vnf_profile_filter']//input ${vnf_name}
Page Should Contain ${vnf_name}
- Click Button xpath=//button[contains(@onclick, '${vnf_name}')]
+ Click Button xpath=//button[contains(@onclick, '${vnf_name}')]
Page Should Contain Are you sure you want to delete VNF_PROFILE
Click Button xpath=//button[contains(text(), 'Yes')]
Page Should Not Contain ${vnf_name}
-
+
Login To SDNGC Admin GUI
[Documentation] Login To SDNGC Admin GUI
- ## Setup Browser is now being managed by the test case
+ ## Setup Browser is now being managed by the test case
## Setup Browser
Go To ${SDNGC_ADMIN_SIGNUP_URL}
##Maximize Browser Window
@@ -207,7 +225,7 @@ Login To SDNGC Admin GUI
Log Logging in to ${SDNGC_ADMIN_LOGIN_URL}
Handle Proxy Warning
Title Should Be AdminPortal
- ${uuid}= Generate UUID
+ ${uuid}= Generate UUID
${shortened_uuid}= Evaluate str("${uuid}")[:12]
${email}= Catenate ${shortened_uuid}@robotete.com
Input Text xpath=//input[@id='nf_email'] ${email}
@@ -219,4 +237,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