DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation The main interface for interacting with ASDC. It handles low level stuff like managing the http request library and DCAE required fields |
| 3 | Library RequestsLibrary |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 4 | Library UUID |
| 5 | Library JSONUtils |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 6 | Library OperatingSystem |
| 7 | Library Collections |
| 8 | Library ExtendedSelenium2Library |
| 9 | Resource global_properties.robot |
| 10 | Resource browser_setup.robot |
| 11 | Resource json_templater.robot |
| 12 | *** Variables *** |
| 13 | ${ASDC_DESIGNER_USER_ID} cs0008 |
| 14 | ${ASDC_TESTER_USER_ID} jm0007 |
| 15 | ${ASDC_GOVERNOR_USER_ID} gv0001 |
| 16 | ${ASDC_OPS_USER_ID} op0001 |
| 17 | ${ASDC_HEALTH_CHECK_PATH} /sdc1/rest/healthCheck |
| 18 | ${ASDC_VENDOR_LICENSE_MODEL_PATH} /onboarding-api/v1.0/vendor-license-models |
| 19 | ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH} /onboarding-api/v1.0/vendor-software-products |
| 20 | ${ASDC_VENDOR_KEY_GROUP_PATH} /license-key-groups |
| 21 | ${ASDC_VENDOR_ENTITLEMENT_POOL_PATH} /entitlement-pools |
| 22 | ${ASDC_VENDOR_FEATURE_GROUP_PATH} /feature-groups |
| 23 | ${ASDC_VENDOR_LICENSE_AGREEMENT_PATH} /license-agreements |
| 24 | ${ASDC_VENDOR_ACTIONS_PATH} /actions |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 25 | ${ASDC_VENDOR_SOFTWARE_UPLOAD_PATH} /orchestration-template-candidate |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 26 | ${ASDC_FE_CATALOG_RESOURCES_PATH} /sdc1/feProxy/rest/v1/catalog/resources |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 27 | ${ASDC_CATALOG_RESOURCES_PATH} /sdc2/rest/v1/catalog/resources |
| 28 | ${ASDC_CATALOG_SERVICES_PATH} /sdc2/rest/v1/catalog/services |
| 29 | ${ASDC_CATALOG_INACTIVE_RESOURCES_PATH} /sdc2/rest/v1/inactiveComponents/resource |
| 30 | ${ASDC_CATALOG_INACTIVE_SERVICES_PATH} /sdc2/rest/v1/inactiveComponents/service |
| 31 | ${ASDC_CATALOG_LIFECYCLE_PATH} /lifecycleState |
| 32 | ${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} /resourceInstance |
| 33 | ${ASDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH} /distribution-state |
| 34 | ${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH} /distribution |
| 35 | ${ASDC_DISTRIBUTION_STATE_APPROVE_PATH} /approve |
| 36 | ${ASDC_CATALOG_SERVICE_DISTRIBUTION_ACTIVATE_PATH} /distribution/PROD/activate |
| 37 | ${ASDC_LICENSE_MODEL_TEMPLATE} robot/assets/templates/asdc/license_model.template |
| 38 | ${ASDC_KEY_GROUP_TEMPLATE} robot/assets/templates/asdc/key_group.template |
| 39 | ${ASDC_ENTITLEMENT_POOL_TEMPLATE} robot/assets/templates/asdc/entitlement_pool.template |
| 40 | ${ASDC_FEATURE_GROUP_TEMPLATE} robot/assets/templates/asdc/feature_group.template |
| 41 | ${ASDC_LICENSE_AGREEMENT_TEMPLATE} robot/assets/templates/asdc/license_agreement.template |
| 42 | ${ASDC_ACTION_TEMPLATE} robot/assets/templates/asdc/action.template |
| 43 | ${ASDC_SOFTWARE_PRODUCT_TEMPLATE} robot/assets/templates/asdc/software_product.template |
| 44 | ${ASDC_CATALOG_RESOURCE_TEMPLATE} robot/assets/templates/asdc/catalog_resource.template |
| 45 | ${ASDC_USER_REMARKS_TEMPLATE} robot/assets/templates/asdc/user_remarks.template |
| 46 | ${ASDC_CATALOG_SERVICE_TEMPLATE} robot/assets/templates/asdc/catalog_service.template |
| 47 | ${ASDC_RESOURCE_INSTANCE_TEMPLATE} robot/assets/templates/asdc/resource_instance.template |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 48 | ${ASDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE} robot/assets/templates/asdc/catalog_vnf_properties.template |
| 49 | ${ASDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE} robot/assets/templates/asdc/catalog_vnf_inputs.template |
Brian Freeman | f508ab2 | 2018-03-15 21:19:41 -0500 | [diff] [blame] | 50 | ${ASDC_FE_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_FE_IP_ADDR}:${GLOBAL_ASDC_FE_PORT} |
| 51 | ${ASDC_BE_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_BE_IP_ADDR}:${GLOBAL_ASDC_BE_PORT} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 52 | ${ASDC_BE_ONBOARD_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_BE_ONBOARD_IP_ADDR}:${GLOBAL_ASDC_BE_ONBOARD_PORT} |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 53 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 54 | *** Keywords *** |
| 55 | Distribute Model From ASDC |
| 56 | [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 |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 57 | [Arguments] ${model_zip_path} ${catalog_service_name}= ${cds}= |
jf9860 | 75010a4 | 2017-02-22 16:52:54 -0500 | [diff] [blame] | 58 | ${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 59 | ${catalog_resource_ids}= Create List |
Jerry Flood | 3a169a3 | 2017-12-01 12:39:10 -0500 | [diff] [blame] | 60 | ${catalog_resources}= Create Dictionary |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 61 | : FOR ${zip} IN @{model_zip_path} |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 62 | \ ${loop_catalog_resource_id}= Setup ASDC Catalog Resource ${zip} ${cds} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 63 | \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 64 | \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id} |
| 65 | \ Add ASDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${loop_catalog_resource_resp['name']} |
Jerry Flood | 3a169a3 | 2017-12-01 12:39:10 -0500 | [diff] [blame] | 66 | \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 67 | ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id} |
| 68 | Checkin ASDC Catalog Service ${catalog_service_id} |
| 69 | Request Certify ASDC Catalog Service ${catalog_service_id} |
| 70 | Start Certify ASDC Catalog Service ${catalog_service_id} |
| 71 | # on certify it gets a new id |
| 72 | ${catalog_service_id}= Certify ASDC Catalog Service ${catalog_service_id} |
| 73 | Approve ASDC Catalog Service ${catalog_service_id} |
Brian Freeman | 796b9eb | 2018-10-08 08:23:20 -0500 | [diff] [blame] | 74 | : FOR ${DIST_INDEX} IN RANGE 1 |
Brian Freeman | 18df891 | 2018-05-25 13:27:29 -0500 | [diff] [blame] | 75 | \ Log Distribution Attempt ${DIST_INDEX} |
| 76 | \ Distribute ASDC Catalog Service ${catalog_service_id} |
| 77 | \ ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id} |
| 78 | \ ${vf_module}= Find Element In Array ${loop_catalog_resource_resp['groups']} type org.openecomp.groups.VfModule |
Brian Freeman | f940ee9 | 2018-05-25 21:09:05 -0500 | [diff] [blame] | 79 | \ ${status} ${_} = Run Keyword And Ignore Error Loop Over Check Catalog Service Distributed ${catalog_service_resp['uuid']} |
| 80 | \ Exit For Loop If '${status}'=='PASS' |
Brian Freeman | 8c002d5 | 2018-07-30 19:35:36 -0500 | [diff] [blame] | 81 | Should Be Equal As Strings ${status} PASS |
Jerry Flood | 3a169a3 | 2017-12-01 12:39:10 -0500 | [diff] [blame] | 82 | [Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} |
Brian Freeman | 18df891 | 2018-05-25 13:27:29 -0500 | [diff] [blame] | 83 | |
| 84 | Loop Over Check Catalog Service Distributed |
Gary Wu | 58d5853 | 2018-07-27 16:02:51 -0700 | [diff] [blame] | 85 | [Arguments] ${catalog_service_id} |
Brian Freeman | adaa237 | 2018-10-24 12:25:22 -0500 | [diff] [blame] | 86 | # SO watchdog timeout is 300 seconds need buffer |
| 87 | ${dist_status}= Set Variable FAIL |
| 88 | : FOR ${CHECK_INDEX} IN RANGE 20 |
| 89 | \ ${status} ${_} = Run Keyword And Ignore Error Check Catalog Service Distributed ${catalog_service_id} ${dist_status} |
Gary Wu | 58d5853 | 2018-07-27 16:02:51 -0700 | [diff] [blame] | 90 | \ Sleep 20s |
Brian Freeman | f940ee9 | 2018-05-25 21:09:05 -0500 | [diff] [blame] | 91 | \ Return From Keyword If '${status}'=='PASS' |
Brian Freeman | adaa237 | 2018-10-24 12:25:22 -0500 | [diff] [blame] | 92 | \ Exit For Loop If '${dist_status}'=='EXIT' |
Brian Freeman | 8c002d5 | 2018-07-30 19:35:36 -0500 | [diff] [blame] | 93 | Should Be Equal As Strings ${status} PASS |
Brian Freeman | 18df891 | 2018-05-25 13:27:29 -0500 | [diff] [blame] | 94 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 95 | Setup ASDC Catalog Resource |
| 96 | [Documentation] Creates all the steps a vf needs for an asdc catalog resource and returns the id |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 97 | [Arguments] ${model_zip_path} ${cds}= |
Brian Freeman | b568e5e | 2018-04-05 21:03:38 -0500 | [diff] [blame] | 98 | ${license_model_id} ${license_model_version_id}= Add ASDC License Model |
| 99 | ${key_group_id}= Add ASDC License Group ${license_model_id} ${license_model_version_id} |
| 100 | ${pool_id}= Add ASDC Entitlement Pool ${license_model_id} ${license_model_version_id} |
| 101 | ${feature_group_id}= Add ASDC Feature Group ${license_model_id} ${key_group_id} ${pool_id} ${license_model_version_id} |
| 102 | ${license_agreement_id}= Add ASDC License Agreement ${license_model_id} ${feature_group_id} ${license_model_version_id} |
| 103 | Submit ASDC License Model ${license_model_id} ${license_model_version_id} |
| 104 | ${license_model_resp}= Get ASDC License Model ${license_model_id} ${license_model_version_id} |
| 105 | ${software_product_id} ${software_product_version_id}= Add ASDC Software Product ${license_agreement_id} ${feature_group_id} ${license_model_resp['vendorName']} ${license_model_id} ${license_model_version_id} |
| 106 | Upload ASDC Heat Package ${software_product_id} ${model_zip_path} ${software_product_version_id} |
| 107 | Validate ASDC Software Product ${software_product_id} ${software_product_version_id} |
| 108 | Submit ASDC Software Product ${software_product_id} ${software_product_version_id} |
| 109 | Package ASDC Software Product ${software_product_id} ${software_product_version_id} |
| 110 | ${software_product_resp}= Get ASDC Software Product ${software_product_id} ${software_product_version_id} |
| 111 | ${catalog_resource_id}= Add ASDC Catalog Resource ${license_agreement_id} ${software_product_resp['name']} ${license_model_resp['vendorName']} ${software_product_id} |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 112 | # Check if need to set up CDS properties |
| 113 | Run Keyword If '${cds}' == 'vfwng' Setup ASDC Catalog Resource CDS Properties ${catalog_resource_id} |
| 114 | |
Brian Freeman | 391680a | 2018-08-11 15:20:58 -0500 | [diff] [blame] | 115 | ${catalog_resource_id}= Certify ASDC Catalog Resource ${catalog_resource_id} ${ASDC_DESIGNER_USER_ID} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 116 | [Return] ${catalog_resource_id} |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 117 | Setup ASDC Catalog Resource CDS Properties |
| 118 | [Documentation] Set up vfwng VNF properties and inputs for CDS |
| 119 | [Arguments] ${catalog_resource_id} |
| 120 | # Set vnf module properties |
| 121 | ${resp}= Get ASDC Catalog Resource Component Instances ${catalog_resource_id} |
| 122 | :FOR ${comp} in @{resp['componentInstances']} |
| 123 | \ ${name} Set Variable ${comp['name']} |
| 124 | \ ${uniqueId} Set Variable ${comp['uniqueId']} |
| 125 | \ ${actualComponentUid} Set Variable ${comp['actualComponentUid']} |
| 126 | \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${name} abstract_ |
| 127 | \ Run Keyword If '${test}' == 'FAIL' Continue For Loop |
| 128 | \ ${response}= Get ASDC Catalog Resource Component Instance Properties ${catalog_resource_id} ${uniqueId} ${actualComponentUid} |
| 129 | \ ${dict}= Create Dictionary parent_id=${response[6]['parentUniqueId']} |
| 130 | \ Run Keyword If '${name}'=='abstract_vfw' Set To Dictionary ${dict} nfc_function=vfw nfc_naming_policy=SDNC_Policy.ONAP_VFW_NAMING_TIMESTAMP |
| 131 | \ Run Keyword If '${name}'=='abstract_vpg' Set To Dictionary ${dict} nfc_function=vpg nfc_naming_policy=SDNC_Policy.ONAP_VPG_NAMING_TIMESTAMP |
| 132 | \ Run Keyword If '${name}'=='abstract_vsn' Set To Dictionary ${dict} nfc_function=vsn nfc_naming_policy=SDNC_Policy.ONAP_VSN_NAMING_TIMESTAMP |
| 133 | \ ${data}= Fill JSON Template File ${ASDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE} ${dict} |
| 134 | \ ${response}= Set ASDC Catalog Resource Component Instance Properties ${catalog_resource_id} ${uniqueId} ${data} |
| 135 | \ Log To Console resp=${response} |
| 136 | |
| 137 | # Set vnf inputs |
| 138 | ${resp}= Get ASDC Catalog Resource Inputs ${catalog_resource_id} |
| 139 | ${dict}= Create Dictionary |
| 140 | :FOR ${comp} in @{resp['inputs']} |
| 141 | \ ${name} Set Variable ${comp['name']} |
| 142 | \ ${uid} Set Variable ${comp['uniqueId']} |
| 143 | \ Run Keyword If '${name}'=='nf_function' Set To Dictionary ${dict} nf_function=ONAP-FIREWALL nf_function_uid=${uid} |
| 144 | \ Run Keyword If '${name}'=='nf_type' Set To Dictionary ${dict} nf_type=FIREWALL nf_type_uid=${uid} |
| 145 | \ Run Keyword If '${name}'=='nf_naming_code' Set To Dictionary ${dict} nf_naming_code=vfw nf_naming_code_uid=${uid} |
| 146 | \ Run Keyword If '${name}'=='nf_role' Set To Dictionary ${dict} nf_role=vFW nf_role_uid=${uid} |
| 147 | \ Run Keyword If '${name}'=='cloud_env' Set To Dictionary ${dict} cloud_env=openstack cloud_env_uid=${uid} |
| 148 | ${data}= Fill JSON Template File ${ASDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE} ${dict} |
| 149 | ${response}= Set ASDC Catalog Resource VNF Inputs ${catalog_resource_id} ${data} |
| 150 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 151 | Add ASDC License Model |
| 152 | [Documentation] Creates an asdc license model and returns its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 153 | ${uuid}= Generate UUID |
| 154 | ${shortened_uuid}= Evaluate str("${uuid}")[:23] |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 155 | ${map}= Create Dictionary vendor_name=${shortened_uuid} |
| 156 | ${data}= Fill JSON Template File ${ASDC_LICENSE_MODEL_TEMPLATE} ${map} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 157 | ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 158 | Should Be Equal As Strings ${resp.status_code} 200 |
Brian Freeman | b568e5e | 2018-04-05 21:03:38 -0500 | [diff] [blame] | 159 | [Return] ${resp.json()['itemId']} ${resp.json()['version']['id']} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 160 | Get ASDC License Model |
| 161 | [Documentation] gets an asdc license model by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 162 | [Arguments] ${id} ${version_id}=0.1 |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 163 | ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 164 | [Return] ${resp.json()} |
| 165 | Get ASDC License Models |
| 166 | [Documentation] gets an asdc license model by its id |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 167 | ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} |
| 168 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 169 | [Return] ${resp.json()} |
| 170 | Checkin ASDC License Model |
| 171 | [Documentation] checksin an asdc license model by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 172 | [Arguments] ${id} ${version_id}=0.1 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 173 | ${map}= Create Dictionary action=Checkin |
| 174 | ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 175 | ${resp}= Run ASDC Put Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 176 | Should Be Equal As Strings ${resp.status_code} 200 |
| 177 | [Return] ${resp.json()} |
| 178 | Submit ASDC License Model |
| 179 | [Documentation] submits an asdc license model by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 180 | [Arguments] ${id} ${version_id}=0.1 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 181 | ${map}= Create Dictionary action=Submit |
| 182 | ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 183 | ${resp}= Run ASDC Put Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 184 | Should Be Equal As Strings ${resp.status_code} 200 |
| 185 | [Return] ${resp.json()} |
| 186 | Checkin ASDC Software Product |
| 187 | [Documentation] checksin an asdc Software Product by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 188 | [Arguments] ${id} ${version_id}=0.1 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 189 | ${map}= Create Dictionary action=Checkin |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 190 | ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 191 | ${resp}= Run ASDC Put Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 192 | Should Be Equal As Strings ${resp.status_code} 200 |
| 193 | [Return] ${resp.json()} |
| 194 | Validate ASDC Software Product |
| 195 | [Documentation] checksin an asdc Software Product by its id |
| 196 | [Arguments] ${id} ${version_id}=0.1 |
| 197 | ${data}= Catenate |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 198 | ${resp}= Run ASDC Put Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}/orchestration-template-candidate/process ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 199 | Should Be Equal As Strings ${resp.status_code} 200 |
| 200 | [Return] ${resp.json()} |
| 201 | Submit ASDC Software Product |
| 202 | [Documentation] submits an asdc Software Product by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 203 | [Arguments] ${id} ${version_id}=0.1 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 204 | ${map}= Create Dictionary action=Submit |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 205 | ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 206 | ${resp}= Run ASDC Put Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 207 | Should Be Equal As Strings ${resp.status_code} 200 |
| 208 | [Return] ${resp.json()} |
| 209 | Package ASDC Software Product |
| 210 | [Documentation] creates_package on an asdc Software Product by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 211 | [Arguments] ${id} ${version_id}=0.1 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 212 | ${map}= Create Dictionary action=Create_Package |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 213 | ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 214 | ${resp}= Run ASDC Put Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 215 | Should Be Equal As Strings ${resp.status_code} 200 |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 216 | [Return] ${resp.json()} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 217 | Add ASDC Entitlement Pool |
| 218 | [Documentation] Creates an asdc Entitlement Pool and returns its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 219 | [Arguments] ${license_model_id} ${version_id}=0.1 |
| 220 | ${uuid}= Generate UUID |
| 221 | ${shortened_uuid}= Evaluate str("${uuid}")[:23] |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 222 | ${map}= Create Dictionary entitlement_pool_name=${shortened_uuid} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 223 | ${data}= Fill JSON Template File ${ASDC_ENTITLEMENT_POOL_TEMPLATE} ${map} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 224 | ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_ENTITLEMENT_POOL_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 225 | Should Be Equal As Strings ${resp.status_code} 200 |
| 226 | [Return] ${resp.json()['value']} |
| 227 | Get ASDC Entitlement Pool |
| 228 | [Documentation] gets an asdc Entitlement Pool by its id |
| 229 | [Arguments] ${license_model_id} ${pool_id} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 230 | ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${ASDC_VENDOR_ENTITLEMENT_POOL_PATH}/${pool_id} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 231 | [Return] ${resp.json()} |
| 232 | Add ASDC License Group |
| 233 | [Documentation] Creates an asdc license group and returns its id |
Brian Freeman | b568e5e | 2018-04-05 21:03:38 -0500 | [diff] [blame] | 234 | [Arguments] ${license_model_id} ${version_id}=1.0 |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 235 | ${uuid}= Generate UUID |
| 236 | ${shortened_uuid}= Evaluate str("${uuid}")[:23] |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 237 | ${map}= Create Dictionary key_group_name=${shortened_uuid} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 238 | ${data}= Fill JSON Template File ${ASDC_KEY_GROUP_TEMPLATE} ${map} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 239 | ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_KEY_GROUP_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 240 | Should Be Equal As Strings ${resp.status_code} 200 |
| 241 | [Return] ${resp.json()['value']} |
| 242 | Get ASDC License Group |
| 243 | [Documentation] gets an asdc license group by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 244 | [Arguments] ${license_model_id} ${group_id} ${version_id} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 245 | ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_KEY_GROUP_PATH}/${group_id} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 246 | [Return] ${resp.json()} |
| 247 | Add ASDC Feature Group |
| 248 | [Documentation] Creates an asdc Feature Group and returns its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 249 | [Arguments] ${license_model_id} ${key_group_id} ${entitlement_pool_id} ${version_id}=0.1 |
| 250 | ${uuid}= Generate UUID |
| 251 | ${shortened_uuid}= Evaluate str("${uuid}")[:23] |
Jerry Flood | 80ff985 | 2017-08-11 06:47:14 -0400 | [diff] [blame] | 252 | ${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} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 253 | ${data}= Fill JSON Template File ${ASDC_FEATURE_GROUP_TEMPLATE} ${map} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 254 | ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_FEATURE_GROUP_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 255 | Should Be Equal As Strings ${resp.status_code} 200 |
| 256 | [Return] ${resp.json()['value']} |
| 257 | Get ASDC Feature Group |
| 258 | [Documentation] gets an asdc Feature Group by its id |
| 259 | [Arguments] ${license_model_id} ${group_id} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 260 | ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${ASDC_VENDOR_FEATURE_GROUP_PATH}/${group_id} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 261 | [Return] ${resp.json()} |
| 262 | Add ASDC License Agreement |
| 263 | [Documentation] Creates an asdc License Agreement and returns its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 264 | [Arguments] ${license_model_id} ${feature_group_id} ${version_id}=0.1 |
| 265 | ${uuid}= Generate UUID |
| 266 | ${shortened_uuid}= Evaluate str("${uuid}")[:23] |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 267 | ${map}= Create Dictionary license_agreement_name=${shortened_uuid} feature_group_id=${feature_group_id} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 268 | ${data}= Fill JSON Template File ${ASDC_LICENSE_AGREEMENT_TEMPLATE} ${map} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 269 | ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_LICENSE_AGREEMENT_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 270 | Should Be Equal As Strings ${resp.status_code} 200 |
| 271 | [Return] ${resp.json()['value']} |
| 272 | Get ASDC License Agreement |
| 273 | [Documentation] gets an asdc License Agreement by its id |
| 274 | [Arguments] ${license_model_id} ${agreement_id} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 275 | ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${ASDC_VENDOR_LICENSE_AGREEMENT_PATH}/${agreement_id} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 276 | [Return] ${resp.json()} |
| 277 | Add ASDC Software Product |
| 278 | [Documentation] Creates an asdc Software Product and returns its id |
Brian Freeman | b568e5e | 2018-04-05 21:03:38 -0500 | [diff] [blame] | 279 | [Arguments] ${license_agreement_id} ${feature_group_id} ${license_model_name} ${license_model_id} ${license_model_version_id} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 280 | ${uuid}= Generate UUID |
| 281 | ${shortened_uuid}= Evaluate str("${uuid}")[:23] |
Brian Freeman | b568e5e | 2018-04-05 21:03:38 -0500 | [diff] [blame] | 282 | ${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} version_id=${license_model_version_id} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 283 | ${data}= Fill JSON Template File ${ASDC_SOFTWARE_PRODUCT_TEMPLATE} ${map} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 284 | ${resp}= Run ASDC Post Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 285 | Should Be Equal As Strings ${resp.status_code} 200 |
Brian Freeman | b568e5e | 2018-04-05 21:03:38 -0500 | [diff] [blame] | 286 | [Return] ${resp.json()['itemId']} ${resp.json()['version']['id']} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 287 | Get ASDC Software Product |
| 288 | [Documentation] gets an asdc Software Product by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 289 | [Arguments] ${software_product_id} ${version_id}=0.1 |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 290 | ${resp}= Run ASDC Get Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${software_product_id}/versions/${version_id} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 291 | [Return] ${resp.json()} |
| 292 | Add ASDC Catalog Resource |
| 293 | [Documentation] Creates an asdc Catalog Resource and returns its id |
| 294 | [Arguments] ${license_agreement_id} ${software_product_name} ${license_model_name} ${software_product_id} |
| 295 | ${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} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 296 | ${data}= Fill JSON Template File ${ASDC_CATALOG_RESOURCE_TEMPLATE} ${map} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 297 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH} ${data} ${ASDC_DESIGNER_USER_ID} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 298 | Should Be Equal As Strings ${resp.status_code} 201 |
| 299 | [Return] ${resp.json()['uniqueId']} |
| 300 | Mark ASDC Catalog Resource Inactive |
| 301 | [Documentation] deletes an asdc Catalog Resource |
| 302 | [Arguments] ${catalog_resource_id} |
| 303 | ${resp}= Run ASDC Delete Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id} ${ASDC_DESIGNER_USER_ID} |
| 304 | Should Be Equal As Strings ${resp.status_code} 204 |
| 305 | [Return] ${resp} |
| 306 | Delete Inactive ASDC Catalog Resources |
| 307 | [Documentation] delete all asdc Catalog Resources that are inactive |
| 308 | ${resp}= Run ASDC Delete Request ${ASDC_CATALOG_INACTIVE_RESOURCES_PATH} ${ASDC_DESIGNER_USER_ID} |
| 309 | Should Be Equal As Strings ${resp.status_code} 200 |
| 310 | [Return] ${resp.json()} |
| 311 | Get ASDC Catalog Resource |
| 312 | [Documentation] gets an asdc Catalog Resource by its id |
| 313 | [Arguments] ${catalog_resource_id} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 314 | ${resp}= Run ASDC Get Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id} ${ASDC_DESIGNER_USER_ID} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 315 | [Return] ${resp.json()} |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 316 | Get ASDC Catalog Resource Component Instances |
| 317 | [Documentation] gets asdc Catalog Resource Component Instances by its id |
| 318 | [Arguments] ${catalog_resource_id} |
| 319 | ${resp}= Run ASDC Get Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstances ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT} |
| 320 | [Return] ${resp.json()} |
| 321 | Get ASDC Catalog Resource Inputs |
| 322 | [Documentation] gets asdc Catalog Inputs by its id |
| 323 | [Arguments] ${catalog_resource_id} |
| 324 | ${resp}= Run ASDC Get Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=inputs ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT} |
| 325 | [Return] ${resp.json()} |
| 326 | Get ASDC Catalog Resource Component Instance Properties |
| 327 | [Documentation] gets an asdc Catalog Resource properties by its id |
| 328 | [Arguments] ${catalog_resource_id} ${component_instance_id} ${component_id} |
| 329 | ${resp}= Run ASDC Get Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/componentInstances/${component_instance_id}/${component_id}/inputs ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT} |
| 330 | [Return] ${resp.json()} |
| 331 | Set ASDC Catalog Resource Component Instance Properties |
| 332 | [Documentation] sets an asdc Catalog Resource by its id |
| 333 | [Arguments] ${catalog_resource_id} ${component_instance_id} ${data} |
| 334 | ${resp}= Run ASDC Post Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/resourceInstance/${component_instance_id}/inputs ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT} |
| 335 | [Return] ${resp.json()} |
| 336 | Set ASDC Catalog Resource VNF Inputs |
| 337 | [Documentation] sets an asdc Catalog Resource by its id |
| 338 | [Arguments] ${catalog_resource_id} ${data} |
| 339 | ${resp}= Run ASDC Post Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/update/inputs ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT} |
| 340 | [Return] ${resp.json()} |
Brian Freeman | 79b00ce | 2018-11-01 14:57:53 -0500 | [diff] [blame] | 341 | Get SDC Demo Vnf Catalog Resource |
| 342 | [Documentation] gets resource id's for demonstration VNFs for instantiate |
| 343 | [Arguments] ${service_name} |
| 344 | ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/serviceName/${service_name}/serviceVersion/1.0 |
| 345 | @{ITEMS}= Copy List ${resp.json()['componentInstances']} |
| 346 | ${demo_catalog_resource}= Create Dictionary |
| 347 | :FOR ${ELEMENT} IN @{ITEMS} |
| 348 | \ Log ${ELEMENT['name']} |
| 349 | \ Log ${ELEMENT['groupInstances'][0]['groupName']} |
| 350 | \ ${vnf}= Get VNF From Group Name ${ELEMENT['groupInstances'][0]['groupName']} ${service_name} |
| 351 | \ ${vnf_data}= Create Dictionary vnf_type=${ELEMENT['name']} vf_module=${ELEMENT['groupInstances'][0]['groupName']} |
| 352 | \ LOG ${vnf_data} |
| 353 | \ Set To Dictionary ${demo_catalog_resource} ${vnf}=${vnf_data} |
| 354 | \ LOG ${demo_catalog_resource} |
| 355 | [Return] ${demo_catalog_resource} |
| 356 | |
| 357 | Get VNF From Group Name |
| 358 | [Documentation] looks up vnf key from service mapping for a regex on groupName and service_name |
| 359 | [Arguments] ${group_name} ${service_name} |
| 360 | ${vnf}= Set Variable If |
| 361 | ... ('${service_name}'=='demoVFWCL') and ('base_vfw' in '${group_name}') vFWSNK |
| 362 | ... ('${service_name}'=='demoVFWCL') and ('base_vpkg' in '${group_name}') vPKG |
| 363 | ... ('${service_name}'=='demoVLB') and ('base_vlb' in '${group_name}') vLB |
| 364 | [Return] ${vnf} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 365 | Checkin ASDC Catalog Resource |
| 366 | [Documentation] checksin an asdc Catalog Resource by its id |
| 367 | [Arguments] ${catalog_resource_id} |
| 368 | ${map}= Create Dictionary user_remarks=Robot remarks |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 369 | ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 370 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} ${ASDC_DESIGNER_USER_ID} |
| 371 | Should Be Equal As Strings ${resp.status_code} 200 |
| 372 | [Return] ${resp.json()} |
| 373 | Request Certify ASDC Catalog Resource |
| 374 | [Documentation] requests certify on an asdc Catalog Resource by its id |
| 375 | [Arguments] ${catalog_resource_id} |
| 376 | ${map}= Create Dictionary user_remarks=Robot remarks |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 377 | ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 378 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${ASDC_DESIGNER_USER_ID} |
| 379 | Should Be Equal As Strings ${resp.status_code} 200 |
| 380 | [Return] ${resp.json()} |
| 381 | Start Certify ASDC Catalog Resource |
| 382 | [Documentation] start certify an asdc Catalog Resource by its id |
| 383 | [Arguments] ${catalog_resource_id} |
| 384 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/startCertification ${None} ${ASDC_TESTER_USER_ID} |
| 385 | Should Be Equal As Strings ${resp.status_code} 200 |
| 386 | [Return] ${resp.json()} |
| 387 | Certify ASDC Catalog Resource |
| 388 | [Documentation] start certify an asdc Catalog Resource by its id and returns the new id |
Brian Freeman | db1e741 | 2018-08-01 12:46:01 -0500 | [diff] [blame] | 389 | [Arguments] ${catalog_resource_id} ${user_id}=${ASDC_TESTER_USER_ID} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 390 | ${map}= Create Dictionary user_remarks=Robot remarks |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 391 | ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
Brian Freeman | db1e741 | 2018-08-01 12:46:01 -0500 | [diff] [blame] | 392 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${user_id} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 393 | Should Be Equal As Strings ${resp.status_code} 200 |
| 394 | [Return] ${resp.json()['uniqueId']} |
Jerry Flood | 6bd1afa | 2017-10-09 09:59:23 -0400 | [diff] [blame] | 395 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 396 | Upload ASDC Heat Package |
Brian Freeman | f508ab2 | 2018-03-15 21:19:41 -0500 | [diff] [blame] | 397 | [Documentation] Creates an asdc Software Product and returns its id |
| 398 | [Arguments] ${software_product_id} ${file_path} ${version_id}=0.1 |
Jerry Flood | 6bd1afa | 2017-10-09 09:59:23 -0400 | [diff] [blame] | 399 | ${files}= Create Dictionary |
| 400 | Create Multi Part ${files} upload ${file_path} contentType=application/zip |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 401 | ${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} ${ASDC_BE_ONBOARD_ENDPOINT} |
Brian Freeman | f508ab2 | 2018-03-15 21:19:41 -0500 | [diff] [blame] | 402 | Should Be Equal As Strings ${resp.status_code} 200 |
Jerry Flood | 6bd1afa | 2017-10-09 09:59:23 -0400 | [diff] [blame] | 403 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 404 | Add ASDC Catalog Service |
| 405 | [Documentation] Creates an asdc Catalog Service and returns its id |
jf9860 | 75010a4 | 2017-02-22 16:52:54 -0500 | [diff] [blame] | 406 | [Arguments] ${catalog_service_name} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 407 | ${uuid}= Generate UUID |
jf9860 | 75010a4 | 2017-02-22 16:52:54 -0500 | [diff] [blame] | 408 | ${shortened_uuid}= Evaluate str("${uuid}")[:23] |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 409 | ${catalog_service_name}= Set Variable If '${catalog_service_name}' =='' ${shortened_uuid} ${catalog_service_name} |
jf9860 | 75010a4 | 2017-02-22 16:52:54 -0500 | [diff] [blame] | 410 | ${map}= Create Dictionary service_name=${catalog_service_name} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 411 | ${data}= Fill JSON Template File ${ASDC_CATALOG_SERVICE_TEMPLATE} ${map} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 412 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH} ${data} ${ASDC_DESIGNER_USER_ID} |
| 413 | Should Be Equal As Strings ${resp.status_code} 201 |
| 414 | [Return] ${resp.json()['uniqueId']} |
| 415 | Mark ASDC Catalog Service Inactive |
| 416 | [Documentation] Deletes an asdc Catalog Service |
| 417 | [Arguments] ${catalog_service_id} |
| 418 | ${resp}= Run ASDC Delete Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id} ${ASDC_DESIGNER_USER_ID} |
| 419 | Should Be Equal As Strings ${resp.status_code} 204 |
| 420 | [Return] ${resp} |
| 421 | Delete Inactive ASDC Catalog Services |
| 422 | [Documentation] delete all asdc Catalog Serivces that are inactive |
| 423 | ${resp}= Run ASDC Delete Request ${ASDC_CATALOG_INACTIVE_SERVICES_PATH} ${ASDC_DESIGNER_USER_ID} |
| 424 | Should Be Equal As Strings ${resp.status_code} 200 |
| 425 | [Return] ${resp.json()} |
| 426 | Get ASDC Catalog Service |
| 427 | [Documentation] gets an asdc Catalog Service by its id |
| 428 | [Arguments] ${catalog_service_id} |
| 429 | ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id} ${ASDC_DESIGNER_USER_ID} |
| 430 | [Return] ${resp.json()} |
| 431 | Checkin ASDC Catalog Service |
| 432 | [Documentation] checksin an asdc Catalog Service by its id |
| 433 | [Arguments] ${catalog_service_id} |
| 434 | ${map}= Create Dictionary user_remarks=Robot remarks |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 435 | ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 436 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} ${ASDC_DESIGNER_USER_ID} |
| 437 | Should Be Equal As Strings ${resp.status_code} 200 |
| 438 | [Return] ${resp.json()} |
| 439 | Request Certify ASDC Catalog Service |
| 440 | [Documentation] requests certify on an asdc Catalog Service by its id |
| 441 | [Arguments] ${catalog_service_id} |
| 442 | ${map}= Create Dictionary user_remarks=Robot remarks |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 443 | ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 444 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${ASDC_DESIGNER_USER_ID} |
| 445 | Should Be Equal As Strings ${resp.status_code} 200 |
| 446 | [Return] ${resp.json()} |
| 447 | Start Certify ASDC Catalog Service |
| 448 | [Documentation] start certify an asdc Catalog Service by its id |
| 449 | [Arguments] ${catalog_service_id} |
| 450 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/startCertification ${None} ${ASDC_TESTER_USER_ID} |
| 451 | Should Be Equal As Strings ${resp.status_code} 200 |
| 452 | [Return] ${resp.json()} |
| 453 | Certify ASDC Catalog Service |
| 454 | [Documentation] start certify an asdc Catalog Service by its id and returns the new id |
| 455 | [Arguments] ${catalog_service_id} |
| 456 | ${map}= Create Dictionary user_remarks=Robot remarks |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 457 | ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 458 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${ASDC_TESTER_USER_ID} |
| 459 | Should Be Equal As Strings ${resp.status_code} 200 |
| 460 | [Return] ${resp.json()['uniqueId']} |
| 461 | Approve ASDC Catalog Service |
| 462 | [Documentation] approve an asdc Catalog Service by its id |
| 463 | [Arguments] ${catalog_service_id} |
| 464 | ${map}= Create Dictionary user_remarks=Robot remarks |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 465 | ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 466 | ${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} |
| 467 | Should Be Equal As Strings ${resp.status_code} 200 |
| 468 | [Return] ${resp.json()} |
| 469 | Distribute ASDC Catalog Service |
| 470 | [Documentation] distribute an asdc Catalog Service by its id |
| 471 | [Arguments] ${catalog_service_id} |
| 472 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_DISTRIBUTION_ACTIVATE_PATH} ${None} ${ASDC_OPS_USER_ID} |
| 473 | Should Be Equal As Strings ${resp.status_code} 200 |
| 474 | [Return] ${resp.json()} |
| 475 | Add ASDC Resource Instance |
| 476 | [Documentation] Creates an asdc Resource Instance and returns its id |
| 477 | [Arguments] ${catalog_service_id} ${catalog_resource_id} ${catalog_resource_name} |
| 478 | ${milli_timestamp}= Generate MilliTimestamp UUID |
| 479 | ${map}= Create Dictionary catalog_resource_id=${catalog_resource_id} catalog_resource_name=${catalog_resource_name} milli_timestamp=${milli_timestamp} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 480 | ${data}= Fill JSON Template File ${ASDC_RESOURCE_INSTANCE_TEMPLATE} ${map} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 481 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} ${data} ${ASDC_DESIGNER_USER_ID} |
| 482 | Should Be Equal As Strings ${resp.status_code} 201 |
| 483 | [Return] ${resp.json()['uniqueId']} |
| 484 | Get Catalog Service Distribution |
| 485 | [Documentation] gets an asdc catalog Service distrbution |
| 486 | [Arguments] ${catalog_service_uuid} |
| 487 | ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_uuid}${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH} ${ASDC_OPS_USER_ID} |
| 488 | Should Be Equal As Strings ${resp.status_code} 200 |
| 489 | [Return] ${resp.json()} |
| 490 | Check Catalog Service Distributed |
| 491 | [Documentation] gets an asdc catalog Service distrbution |
Brian Freeman | adaa237 | 2018-10-24 12:25:22 -0500 | [diff] [blame] | 492 | [Arguments] ${catalog_service_uuid} ${dist_status} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 493 | ${dist_resp}= Get Catalog Service Distribution ${catalog_service_uuid} |
| 494 | Should Be Equal As Strings ${dist_resp['distributionStatusOfServiceList'][0]['deployementStatus']} Distributed |
| 495 | ${det_resp}= Get Catalog Service Distribution Details ${dist_resp['distributionStatusOfServiceList'][0]['distributionID']} |
| 496 | @{ITEMS}= Copy List ${det_resp['distributionStatusList']} |
Brian Freeman | f508ab2 | 2018-03-15 21:19:41 -0500 | [diff] [blame] | 497 | Should Not Be Empty ${ITEMS} |
Brian Freeman | a62644f | 2018-05-13 12:47:38 -0500 | [diff] [blame] | 498 | ${SO_COMPLETE} Set Variable FALSE |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 499 | :FOR ${ELEMENT} IN @{ITEMS} |
Brian Freeman | f508ab2 | 2018-03-15 21:19:41 -0500 | [diff] [blame] | 500 | \ Log ${ELEMENT['omfComponentID']} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 501 | \ Log ${ELEMENT['status']} |
Brian Freeman | 41ab5e5 | 2018-08-08 14:24:23 -0500 | [diff] [blame] | 502 | \ ${SO_COMPLETE} Set Variable If (('${ELEMENT['status']}' == 'DISTRIBUTION_COMPLETE_OK')) or ('${SO_COMPLETE}'=='TRUE') TRUE |
Brian Freeman | eca7107 | 2018-08-16 14:50:16 -0500 | [diff] [blame] | 503 | \ Exit For Loop If ('${SO_COMPLETE}'=='TRUE') |
| 504 | \ Exit For Loop If ('${ELEMENT['status']}' == 'DISTRIBUTION_COMPLETE_ERROR') |
Brian Freeman | adaa237 | 2018-10-24 12:25:22 -0500 | [diff] [blame] | 505 | \ ${dist_status}= Set Variable If (('${ELEMENT['status']}' == 'COMPONENT_DONE_ERROR') and ('${ELEMENT['omfComponentID']}' == 'aai-ml')) EXIT |
| 506 | \ Exit For Loop If (('${ELEMENT['status']}' == 'COMPONENT_DONE_ERROR') and ('${ELEMENT['omfComponentID']}' == 'aai-ml')) |
Brian Freeman | a62644f | 2018-05-13 12:47:38 -0500 | [diff] [blame] | 507 | Should Be True ( '${SO_COMPLETE}'=='TRUE') SO Test |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 508 | Get Catalog Service Distribution Details |
| 509 | [Documentation] gets an asdc catalog Service distrbution details |
| 510 | [Arguments] ${catalog_service_distribution_id} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 511 | ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH}/${catalog_service_distribution_id} ${ASDC_OPS_USER_ID} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 512 | Should Be Equal As Strings ${resp.status_code} 200 |
| 513 | [Return] ${resp.json()} |
| 514 | Run ASDC Health Check |
| 515 | [Documentation] Runs a ASDC health check |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 516 | ${session}= Create Session asdc ${ASDC_FE_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 517 | ${uuid}= Generate UUID |
| 518 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 519 | ${resp}= Get Request asdc ${ASDC_HEALTH_CHECK_PATH} headers=${headers} |
Brian Freeman | adaa237 | 2018-10-24 12:25:22 -0500 | [diff] [blame] | 520 | # only test for HTTP 200 to determine SDC Health. SDC_DE_HEALTH is informational |
Brian Freeman | 00f125e | 2018-09-05 13:03:48 -0500 | [diff] [blame] | 521 | Should Be Equal As Strings ${resp.status_code} 200 SDC DOWN |
Brian Freeman | 5cf5fa6 | 2018-04-23 20:28:16 -0500 | [diff] [blame] | 522 | ${SDC_DE_HEALTH}= Catenate DOWN |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 523 | @{ITEMS}= Copy List ${resp.json()['componentsInfo']} |
| 524 | :FOR ${ELEMENT} IN @{ITEMS} |
| 525 | \ Log ${ELEMENT['healthCheckStatus']} |
Brian Freeman | e546f7e | 2018-04-19 12:17:56 -0500 | [diff] [blame] | 526 | \ ${SDC_DE_HEALTH} Set Variable If (('DE' in '${ELEMENT['healthCheckComponent']}') and ('${ELEMENT['healthCheckStatus']}' == 'UP')) or ('${SDC_DE_HEALTH}'=='UP') UP |
Gary Wu | 03f549f | 2018-10-24 14:02:23 -0700 | [diff] [blame] | 527 | Log To Console SDC DMaaP Interface Health: ${SDC_DE_HEALTH} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 528 | Run ASDC Get Request |
| 529 | [Documentation] Runs an ASDC get request |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 530 | [Arguments] ${data_path} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_ASDC_BE_ENDPOINT}=${ASDC_BE_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 531 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 532 | Log Creating session ${MY_ASDC_BE_ENDPOINT} |
| 533 | ${session}= Create Session asdc ${MY_ASDC_BE_ENDPOINT} auth=${auth} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 534 | ${uuid}= Generate UUID |
| 535 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 536 | ${resp}= Get Request asdc ${data_path} headers=${headers} |
| 537 | Log Received response from asdc ${resp.text} |
| 538 | [Return] ${resp} |
| 539 | Run ASDC Put Request |
| 540 | [Documentation] Runs an ASDC put request |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 541 | [Arguments] ${data_path} ${data} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_ASDC_BE_ENDPOINT}=${ASDC_BE_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 542 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 543 | Log Creating session ${MY_ASDC_BE_ENDPOINT} |
| 544 | ${session}= Create Session asdc ${MY_ASDC_BE_ENDPOINT} auth=${auth} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 545 | ${uuid}= Generate UUID |
| 546 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 547 | ${resp}= Put Request asdc ${data_path} data=${data} headers=${headers} |
| 548 | Log Received response from asdc ${resp.text} |
| 549 | [Return] ${resp} |
Jerry Flood | 6bd1afa | 2017-10-09 09:59:23 -0400 | [diff] [blame] | 550 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 551 | Run ASDC Post Files Request |
| 552 | [Documentation] Runs an ASDC post request |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 553 | [Arguments] ${data_path} ${files} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_ASDC_BE_ENDPOINT}=${ASDC_BE_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 554 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 555 | Log Creating session ${MY_ASDC_BE_ENDPOINT} |
| 556 | ${session}= Create Session asdc ${MY_ASDC_BE_ENDPOINT} auth=${auth} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 557 | ${uuid}= Generate UUID |
| 558 | ${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} |
| 559 | ${resp}= Post Request asdc ${data_path} files=${files} headers=${headers} |
| 560 | Log Received response from asdc ${resp.text} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 561 | [Return] ${resp} |
Jerry Flood | 6bd1afa | 2017-10-09 09:59:23 -0400 | [diff] [blame] | 562 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 563 | Run ASDC Post Request |
| 564 | [Documentation] Runs an ASDC post request |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 565 | [Arguments] ${data_path} ${data} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_ASDC_BE_ENDPOINT}=${ASDC_BE_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 566 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 567 | Log Creating session ${MY_ASDC_BE_ENDPOINT} |
| 568 | ${session}= Create Session asdc ${MY_ASDC_BE_ENDPOINT} auth=${auth} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 569 | ${uuid}= Generate UUID |
| 570 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 571 | ${resp}= Post Request asdc ${data_path} data=${data} headers=${headers} |
| 572 | Log Received response from asdc ${resp.text} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 573 | [Return] ${resp} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 574 | Run ASDC Delete Request |
| 575 | [Documentation] Runs an ASDC delete request |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 576 | [Arguments] ${data_path} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_ASDC_BE_ENDPOINT}=${ASDC_BE_ENDPOINT} |
| 577 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 578 | Log Creating session ${MY_ASDC_BE_ENDPOINT} |
| 579 | ${session}= Create Session asdc ${MY_ASDC_BE_ENDPOINT} auth=${auth} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 580 | ${uuid}= Generate UUID |
| 581 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 582 | ${resp}= Delete Request asdc ${data_path} headers=${headers} |
| 583 | Log Received response from asdc ${resp.text} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 584 | [Return] ${resp} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 585 | Open ASDC GUI |
| 586 | [Documentation] Logs in to ASDC GUI |
| 587 | [Arguments] ${PATH} |
| 588 | ## Setup Browever now being managed by the test case |
| 589 | ##Setup Browser |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 590 | Go To ${ASDC_FE_ENDPOINT}${PATH} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 591 | Maximize Browser Window |
Jerry Flood | 6bd1afa | 2017-10-09 09:59:23 -0400 | [diff] [blame] | 592 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 593 | Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 594 | Log Logging in to ${ASDC_FE_ENDPOINT}${PATH} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 595 | Title Should Be ASDC |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 596 | Wait Until Page Contains Element xpath=//div/a[text()='SDC'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 597 | Log Logged in to ${ASDC_FE_ENDPOINT}${PATH} |
Jerry Flood | 6bd1afa | 2017-10-09 09:59:23 -0400 | [diff] [blame] | 598 | |
| 599 | |
| 600 | Create Multi Part |
| 601 | [Arguments] ${addTo} ${partName} ${filePath} ${contentType}=${None} |
| 602 | ${fileData}= Get Binary File ${filePath} |
| 603 | ${fileDir} ${fileName}= Split Path ${filePath} |
| 604 | ${partData}= Create List ${fileName} ${fileData} ${contentType} |
| 605 | Set To Dictionary ${addTo} ${partName}=${partData} |
Brian Freeman | f940ee9 | 2018-05-25 21:09:05 -0500 | [diff] [blame] | 606 | |