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