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 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 26 | ${ASDC_CATALOG_RESOURCES_PATH} /sdc2/rest/v1/catalog/resources |
| 27 | ${ASDC_CATALOG_SERVICES_PATH} /sdc2/rest/v1/catalog/services |
| 28 | ${ASDC_CATALOG_INACTIVE_RESOURCES_PATH} /sdc2/rest/v1/inactiveComponents/resource |
| 29 | ${ASDC_CATALOG_INACTIVE_SERVICES_PATH} /sdc2/rest/v1/inactiveComponents/service |
| 30 | ${ASDC_CATALOG_LIFECYCLE_PATH} /lifecycleState |
| 31 | ${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} /resourceInstance |
| 32 | ${ASDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH} /distribution-state |
| 33 | ${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH} /distribution |
| 34 | ${ASDC_DISTRIBUTION_STATE_APPROVE_PATH} /approve |
| 35 | ${ASDC_CATALOG_SERVICE_DISTRIBUTION_ACTIVATE_PATH} /distribution/PROD/activate |
| 36 | ${ASDC_LICENSE_MODEL_TEMPLATE} robot/assets/templates/asdc/license_model.template |
| 37 | ${ASDC_KEY_GROUP_TEMPLATE} robot/assets/templates/asdc/key_group.template |
| 38 | ${ASDC_ENTITLEMENT_POOL_TEMPLATE} robot/assets/templates/asdc/entitlement_pool.template |
| 39 | ${ASDC_FEATURE_GROUP_TEMPLATE} robot/assets/templates/asdc/feature_group.template |
| 40 | ${ASDC_LICENSE_AGREEMENT_TEMPLATE} robot/assets/templates/asdc/license_agreement.template |
| 41 | ${ASDC_ACTION_TEMPLATE} robot/assets/templates/asdc/action.template |
| 42 | ${ASDC_SOFTWARE_PRODUCT_TEMPLATE} robot/assets/templates/asdc/software_product.template |
| 43 | ${ASDC_CATALOG_RESOURCE_TEMPLATE} robot/assets/templates/asdc/catalog_resource.template |
| 44 | ${ASDC_USER_REMARKS_TEMPLATE} robot/assets/templates/asdc/user_remarks.template |
| 45 | ${ASDC_CATALOG_SERVICE_TEMPLATE} robot/assets/templates/asdc/catalog_service.template |
| 46 | ${ASDC_RESOURCE_INSTANCE_TEMPLATE} robot/assets/templates/asdc/resource_instance.template |
Brian Freeman | f508ab2 | 2018-03-15 21:19:41 -0500 | [diff] [blame] | 47 | ${ASDC_FE_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_FE_IP_ADDR}:${GLOBAL_ASDC_FE_PORT} |
| 48 | ${ASDC_BE_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_BE_IP_ADDR}:${GLOBAL_ASDC_BE_PORT} |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 49 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 50 | *** Keywords *** |
| 51 | Distribute Model From ASDC |
| 52 | [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 |
jf9860 | 75010a4 | 2017-02-22 16:52:54 -0500 | [diff] [blame] | 53 | [Arguments] ${model_zip_path} ${catalog_service_name}= |
| 54 | ${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 55 | ${catalog_resource_ids}= Create List |
Jerry Flood | 3a169a3 | 2017-12-01 12:39:10 -0500 | [diff] [blame] | 56 | ${catalog_resources}= Create Dictionary |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 57 | : FOR ${zip} IN @{model_zip_path} |
| 58 | \ ${loop_catalog_resource_id}= Setup ASDC Catalog Resource ${zip} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 59 | \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 60 | \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id} |
| 61 | \ 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] | 62 | \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 63 | ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id} |
| 64 | Checkin ASDC Catalog Service ${catalog_service_id} |
| 65 | Request Certify ASDC Catalog Service ${catalog_service_id} |
| 66 | Start Certify ASDC Catalog Service ${catalog_service_id} |
| 67 | # on certify it gets a new id |
| 68 | ${catalog_service_id}= Certify ASDC Catalog Service ${catalog_service_id} |
| 69 | Approve ASDC Catalog Service ${catalog_service_id} |
| 70 | Distribute ASDC Catalog Service ${catalog_service_id} |
| 71 | ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id} |
| 72 | ${vf_module}= Find Element In Array ${loop_catalog_resource_resp['groups']} type org.openecomp.groups.VfModule |
Brian Freeman | f508ab2 | 2018-03-15 21:19:41 -0500 | [diff] [blame] | 73 | Wait Until Keyword Succeeds 180 15 Check Catalog Service Distributed ${catalog_service_resp['uuid']} |
Jerry Flood | 3a169a3 | 2017-12-01 12:39:10 -0500 | [diff] [blame] | 74 | [Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 75 | Setup ASDC Catalog Resource |
| 76 | [Documentation] Creates all the steps a vf needs for an asdc catalog resource and returns the id |
| 77 | [Arguments] ${model_zip_path} |
Brian Freeman | b568e5e | 2018-04-05 21:03:38 -0500 | [diff] [blame^] | 78 | ${license_model_id} ${license_model_version_id}= Add ASDC License Model |
| 79 | ${key_group_id}= Add ASDC License Group ${license_model_id} ${license_model_version_id} |
| 80 | ${pool_id}= Add ASDC Entitlement Pool ${license_model_id} ${license_model_version_id} |
| 81 | ${feature_group_id}= Add ASDC Feature Group ${license_model_id} ${key_group_id} ${pool_id} ${license_model_version_id} |
| 82 | ${license_agreement_id}= Add ASDC License Agreement ${license_model_id} ${feature_group_id} ${license_model_version_id} |
| 83 | Submit ASDC License Model ${license_model_id} ${license_model_version_id} |
| 84 | ${license_model_resp}= Get ASDC License Model ${license_model_id} ${license_model_version_id} |
| 85 | ${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} |
| 86 | Upload ASDC Heat Package ${software_product_id} ${model_zip_path} ${software_product_version_id} |
| 87 | Validate ASDC Software Product ${software_product_id} ${software_product_version_id} |
| 88 | Submit ASDC Software Product ${software_product_id} ${software_product_version_id} |
| 89 | Package ASDC Software Product ${software_product_id} ${software_product_version_id} |
| 90 | ${software_product_resp}= Get ASDC Software Product ${software_product_id} ${software_product_version_id} |
| 91 | ${catalog_resource_id}= Add ASDC Catalog Resource ${license_agreement_id} ${software_product_resp['name']} ${license_model_resp['vendorName']} ${software_product_id} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 92 | Checkin ASDC Catalog Resource ${catalog_resource_id} |
| 93 | Request Certify ASDC Catalog Resource ${catalog_resource_id} |
| 94 | Start Certify ASDC Catalog Resource ${catalog_resource_id} |
| 95 | # on certify it gets a new id |
| 96 | [Return] ${catalog_resource_id} |
| 97 | ${catalog_resource_id}= Certify ASDC Catalog Resource ${catalog_resource_id} |
| 98 | Add ASDC License Model |
| 99 | [Documentation] Creates an asdc license model and returns its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 100 | ${uuid}= Generate UUID |
| 101 | ${shortened_uuid}= Evaluate str("${uuid}")[:23] |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 102 | ${map}= Create Dictionary vendor_name=${shortened_uuid} |
| 103 | ${data}= Fill JSON Template File ${ASDC_LICENSE_MODEL_TEMPLATE} ${map} |
| 104 | ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH} ${data} |
| 105 | Should Be Equal As Strings ${resp.status_code} 200 |
Brian Freeman | b568e5e | 2018-04-05 21:03:38 -0500 | [diff] [blame^] | 106 | [Return] ${resp.json()['itemId']} ${resp.json()['version']['id']} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 107 | Get ASDC License Model |
| 108 | [Documentation] gets an asdc license model by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 109 | [Arguments] ${id} ${version_id}=0.1 |
| 110 | ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id} |
| 111 | [Return] ${resp.json()} |
| 112 | Get ASDC License Models |
| 113 | [Documentation] gets an asdc license model by its id |
| 114 | ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 115 | [Return] ${resp.json()} |
| 116 | Checkin ASDC License Model |
| 117 | [Documentation] checksin an asdc license model by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 118 | [Arguments] ${id} ${version_id}=0.1 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 119 | ${map}= Create Dictionary action=Checkin |
| 120 | ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 121 | ${resp}= Run ASDC Put Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 122 | Should Be Equal As Strings ${resp.status_code} 200 |
| 123 | [Return] ${resp.json()} |
| 124 | Submit ASDC License Model |
| 125 | [Documentation] submits an asdc license model by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 126 | [Arguments] ${id} ${version_id}=0.1 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 127 | ${map}= Create Dictionary action=Submit |
| 128 | ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 129 | ${resp}= Run ASDC Put Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 130 | Should Be Equal As Strings ${resp.status_code} 200 |
| 131 | [Return] ${resp.json()} |
| 132 | Checkin ASDC Software Product |
| 133 | [Documentation] checksin an asdc Software Product by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 134 | [Arguments] ${id} ${version_id}=0.1 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 135 | ${map}= Create Dictionary action=Checkin |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 136 | ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map} |
| 137 | ${resp}= Run ASDC Put Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} |
| 138 | Should Be Equal As Strings ${resp.status_code} 200 |
| 139 | [Return] ${resp.json()} |
| 140 | Validate ASDC Software Product |
| 141 | [Documentation] checksin an asdc Software Product by its id |
| 142 | [Arguments] ${id} ${version_id}=0.1 |
| 143 | ${data}= Catenate |
| 144 | ${resp}= Run ASDC Put Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}/orchestration-template-candidate/process ${data} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 145 | Should Be Equal As Strings ${resp.status_code} 200 |
| 146 | [Return] ${resp.json()} |
| 147 | Submit ASDC Software Product |
| 148 | [Documentation] submits an asdc Software Product by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 149 | [Arguments] ${id} ${version_id}=0.1 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 150 | ${map}= Create Dictionary action=Submit |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 151 | ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map} |
| 152 | ${resp}= Run ASDC Put Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 153 | Should Be Equal As Strings ${resp.status_code} 200 |
| 154 | [Return] ${resp.json()} |
| 155 | Package ASDC Software Product |
| 156 | [Documentation] creates_package on an asdc Software Product by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 157 | [Arguments] ${id} ${version_id}=0.1 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 158 | ${map}= Create Dictionary action=Create_Package |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 159 | ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map} |
| 160 | ${resp}= Run ASDC Put Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 161 | Should Be Equal As Strings ${resp.status_code} 200 |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 162 | [Return] ${resp.json()} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 163 | Add ASDC Entitlement Pool |
| 164 | [Documentation] Creates an asdc Entitlement Pool and returns its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 165 | [Arguments] ${license_model_id} ${version_id}=0.1 |
| 166 | ${uuid}= Generate UUID |
| 167 | ${shortened_uuid}= Evaluate str("${uuid}")[:23] |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 168 | ${map}= Create Dictionary entitlement_pool_name=${shortened_uuid} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 169 | ${data}= Fill JSON Template File ${ASDC_ENTITLEMENT_POOL_TEMPLATE} ${map} |
| 170 | ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_ENTITLEMENT_POOL_PATH} ${data} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 171 | Should Be Equal As Strings ${resp.status_code} 200 |
| 172 | [Return] ${resp.json()['value']} |
| 173 | Get ASDC Entitlement Pool |
| 174 | [Documentation] gets an asdc Entitlement Pool by its id |
| 175 | [Arguments] ${license_model_id} ${pool_id} |
| 176 | ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${ASDC_VENDOR_ENTITLEMENT_POOL_PATH}/${pool_id} |
| 177 | [Return] ${resp.json()} |
| 178 | Add ASDC License Group |
| 179 | [Documentation] Creates an asdc license group and returns its id |
Brian Freeman | b568e5e | 2018-04-05 21:03:38 -0500 | [diff] [blame^] | 180 | [Arguments] ${license_model_id} ${version_id}=1.0 |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 181 | ${uuid}= Generate UUID |
| 182 | ${shortened_uuid}= Evaluate str("${uuid}")[:23] |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 183 | ${map}= Create Dictionary key_group_name=${shortened_uuid} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 184 | ${data}= Fill JSON Template File ${ASDC_KEY_GROUP_TEMPLATE} ${map} |
| 185 | ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_KEY_GROUP_PATH} ${data} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 186 | Should Be Equal As Strings ${resp.status_code} 200 |
| 187 | [Return] ${resp.json()['value']} |
| 188 | Get ASDC License Group |
| 189 | [Documentation] gets an asdc license group by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 190 | [Arguments] ${license_model_id} ${group_id} ${version_id} |
| 191 | ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_KEY_GROUP_PATH}/${group_id} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 192 | [Return] ${resp.json()} |
| 193 | Add ASDC Feature Group |
| 194 | [Documentation] Creates an asdc Feature Group and returns its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 195 | [Arguments] ${license_model_id} ${key_group_id} ${entitlement_pool_id} ${version_id}=0.1 |
| 196 | ${uuid}= Generate UUID |
| 197 | ${shortened_uuid}= Evaluate str("${uuid}")[:23] |
Jerry Flood | 80ff985 | 2017-08-11 06:47:14 -0400 | [diff] [blame] | 198 | ${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] | 199 | ${data}= Fill JSON Template File ${ASDC_FEATURE_GROUP_TEMPLATE} ${map} |
| 200 | ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_FEATURE_GROUP_PATH} ${data} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 201 | Should Be Equal As Strings ${resp.status_code} 200 |
| 202 | [Return] ${resp.json()['value']} |
| 203 | Get ASDC Feature Group |
| 204 | [Documentation] gets an asdc Feature Group by its id |
| 205 | [Arguments] ${license_model_id} ${group_id} |
| 206 | ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${ASDC_VENDOR_FEATURE_GROUP_PATH}/${group_id} |
| 207 | [Return] ${resp.json()} |
| 208 | Add ASDC License Agreement |
| 209 | [Documentation] Creates an asdc License Agreement and returns its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 210 | [Arguments] ${license_model_id} ${feature_group_id} ${version_id}=0.1 |
| 211 | ${uuid}= Generate UUID |
| 212 | ${shortened_uuid}= Evaluate str("${uuid}")[:23] |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 213 | ${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] | 214 | ${data}= Fill JSON Template File ${ASDC_LICENSE_AGREEMENT_TEMPLATE} ${map} |
| 215 | ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_LICENSE_AGREEMENT_PATH} ${data} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 216 | Should Be Equal As Strings ${resp.status_code} 200 |
| 217 | [Return] ${resp.json()['value']} |
| 218 | Get ASDC License Agreement |
| 219 | [Documentation] gets an asdc License Agreement by its id |
| 220 | [Arguments] ${license_model_id} ${agreement_id} |
| 221 | ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${ASDC_VENDOR_LICENSE_AGREEMENT_PATH}/${agreement_id} |
| 222 | [Return] ${resp.json()} |
| 223 | Add ASDC Software Product |
| 224 | [Documentation] Creates an asdc Software Product and returns its id |
Brian Freeman | b568e5e | 2018-04-05 21:03:38 -0500 | [diff] [blame^] | 225 | [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] | 226 | ${uuid}= Generate UUID |
| 227 | ${shortened_uuid}= Evaluate str("${uuid}")[:23] |
Brian Freeman | b568e5e | 2018-04-05 21:03:38 -0500 | [diff] [blame^] | 228 | ${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] | 229 | ${data}= Fill JSON Template File ${ASDC_SOFTWARE_PRODUCT_TEMPLATE} ${map} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 230 | ${resp}= Run ASDC Post Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH} ${data} |
| 231 | Should Be Equal As Strings ${resp.status_code} 200 |
Brian Freeman | b568e5e | 2018-04-05 21:03:38 -0500 | [diff] [blame^] | 232 | [Return] ${resp.json()['itemId']} ${resp.json()['version']['id']} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 233 | Get ASDC Software Product |
| 234 | [Documentation] gets an asdc Software Product by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 235 | [Arguments] ${software_product_id} ${version_id}=0.1 |
| 236 | ${resp}= Run ASDC Get Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${software_product_id}/versions/${version_id} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 237 | [Return] ${resp.json()} |
| 238 | Add ASDC Catalog Resource |
| 239 | [Documentation] Creates an asdc Catalog Resource and returns its id |
| 240 | [Arguments] ${license_agreement_id} ${software_product_name} ${license_model_name} ${software_product_id} |
| 241 | ${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] | 242 | ${data}= Fill JSON Template File ${ASDC_CATALOG_RESOURCE_TEMPLATE} ${map} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 243 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH} ${data} ${ASDC_DESIGNER_USER_ID} |
| 244 | Should Be Equal As Strings ${resp.status_code} 201 |
| 245 | [Return] ${resp.json()['uniqueId']} |
| 246 | Mark ASDC Catalog Resource Inactive |
| 247 | [Documentation] deletes an asdc Catalog Resource |
| 248 | [Arguments] ${catalog_resource_id} |
| 249 | ${resp}= Run ASDC Delete Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id} ${ASDC_DESIGNER_USER_ID} |
| 250 | Should Be Equal As Strings ${resp.status_code} 204 |
| 251 | [Return] ${resp} |
| 252 | Delete Inactive ASDC Catalog Resources |
| 253 | [Documentation] delete all asdc Catalog Resources that are inactive |
| 254 | ${resp}= Run ASDC Delete Request ${ASDC_CATALOG_INACTIVE_RESOURCES_PATH} ${ASDC_DESIGNER_USER_ID} |
| 255 | Should Be Equal As Strings ${resp.status_code} 200 |
| 256 | [Return] ${resp.json()} |
| 257 | Get ASDC Catalog Resource |
| 258 | [Documentation] gets an asdc Catalog Resource by its id |
| 259 | [Arguments] ${catalog_resource_id} |
| 260 | ${resp}= Run ASDC Get Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id} ${ASDC_DESIGNER_USER_ID} |
| 261 | [Return] ${resp.json()} |
| 262 | Checkin ASDC Catalog Resource |
| 263 | [Documentation] checksin an asdc Catalog Resource by its id |
| 264 | [Arguments] ${catalog_resource_id} |
| 265 | ${map}= Create Dictionary user_remarks=Robot remarks |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 266 | ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 267 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} ${ASDC_DESIGNER_USER_ID} |
| 268 | Should Be Equal As Strings ${resp.status_code} 200 |
| 269 | [Return] ${resp.json()} |
| 270 | Request Certify ASDC Catalog Resource |
| 271 | [Documentation] requests certify on an asdc Catalog Resource by its id |
| 272 | [Arguments] ${catalog_resource_id} |
| 273 | ${map}= Create Dictionary user_remarks=Robot remarks |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 274 | ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 275 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${ASDC_DESIGNER_USER_ID} |
| 276 | Should Be Equal As Strings ${resp.status_code} 200 |
| 277 | [Return] ${resp.json()} |
| 278 | Start Certify ASDC Catalog Resource |
| 279 | [Documentation] start certify an asdc Catalog Resource by its id |
| 280 | [Arguments] ${catalog_resource_id} |
| 281 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/startCertification ${None} ${ASDC_TESTER_USER_ID} |
| 282 | Should Be Equal As Strings ${resp.status_code} 200 |
| 283 | [Return] ${resp.json()} |
| 284 | Certify ASDC Catalog Resource |
| 285 | [Documentation] start certify an asdc Catalog Resource by its id and returns the new id |
| 286 | [Arguments] ${catalog_resource_id} |
| 287 | ${map}= Create Dictionary user_remarks=Robot remarks |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 288 | ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 289 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${ASDC_TESTER_USER_ID} |
| 290 | Should Be Equal As Strings ${resp.status_code} 200 |
| 291 | [Return] ${resp.json()['uniqueId']} |
Jerry Flood | 6bd1afa | 2017-10-09 09:59:23 -0400 | [diff] [blame] | 292 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 293 | Upload ASDC Heat Package |
Brian Freeman | f508ab2 | 2018-03-15 21:19:41 -0500 | [diff] [blame] | 294 | [Documentation] Creates an asdc Software Product and returns its id |
| 295 | [Arguments] ${software_product_id} ${file_path} ${version_id}=0.1 |
Jerry Flood | 6bd1afa | 2017-10-09 09:59:23 -0400 | [diff] [blame] | 296 | ${files}= Create Dictionary |
| 297 | Create Multi Part ${files} upload ${file_path} contentType=application/zip |
Brian Freeman | f508ab2 | 2018-03-15 21:19:41 -0500 | [diff] [blame] | 298 | ${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} |
| 299 | Should Be Equal As Strings ${resp.status_code} 200 |
Jerry Flood | 6bd1afa | 2017-10-09 09:59:23 -0400 | [diff] [blame] | 300 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 301 | Add ASDC Catalog Service |
| 302 | [Documentation] Creates an asdc Catalog Service and returns its id |
jf9860 | 75010a4 | 2017-02-22 16:52:54 -0500 | [diff] [blame] | 303 | [Arguments] ${catalog_service_name} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 304 | ${uuid}= Generate UUID |
jf9860 | 75010a4 | 2017-02-22 16:52:54 -0500 | [diff] [blame] | 305 | ${shortened_uuid}= Evaluate str("${uuid}")[:23] |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 306 | ${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] | 307 | ${map}= Create Dictionary service_name=${catalog_service_name} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 308 | ${data}= Fill JSON Template File ${ASDC_CATALOG_SERVICE_TEMPLATE} ${map} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 309 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH} ${data} ${ASDC_DESIGNER_USER_ID} |
| 310 | Should Be Equal As Strings ${resp.status_code} 201 |
| 311 | [Return] ${resp.json()['uniqueId']} |
| 312 | Mark ASDC Catalog Service Inactive |
| 313 | [Documentation] Deletes an asdc Catalog Service |
| 314 | [Arguments] ${catalog_service_id} |
| 315 | ${resp}= Run ASDC Delete Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id} ${ASDC_DESIGNER_USER_ID} |
| 316 | Should Be Equal As Strings ${resp.status_code} 204 |
| 317 | [Return] ${resp} |
| 318 | Delete Inactive ASDC Catalog Services |
| 319 | [Documentation] delete all asdc Catalog Serivces that are inactive |
| 320 | ${resp}= Run ASDC Delete Request ${ASDC_CATALOG_INACTIVE_SERVICES_PATH} ${ASDC_DESIGNER_USER_ID} |
| 321 | Should Be Equal As Strings ${resp.status_code} 200 |
| 322 | [Return] ${resp.json()} |
| 323 | Get ASDC Catalog Service |
| 324 | [Documentation] gets an asdc Catalog Service by its id |
| 325 | [Arguments] ${catalog_service_id} |
| 326 | ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id} ${ASDC_DESIGNER_USER_ID} |
| 327 | [Return] ${resp.json()} |
| 328 | Checkin ASDC Catalog Service |
| 329 | [Documentation] checksin an asdc Catalog Service by its id |
| 330 | [Arguments] ${catalog_service_id} |
| 331 | ${map}= Create Dictionary user_remarks=Robot remarks |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 332 | ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 333 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} ${ASDC_DESIGNER_USER_ID} |
| 334 | Should Be Equal As Strings ${resp.status_code} 200 |
| 335 | [Return] ${resp.json()} |
| 336 | Request Certify ASDC Catalog Service |
| 337 | [Documentation] requests certify on an asdc Catalog Service by its id |
| 338 | [Arguments] ${catalog_service_id} |
| 339 | ${map}= Create Dictionary user_remarks=Robot remarks |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 340 | ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 341 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${ASDC_DESIGNER_USER_ID} |
| 342 | Should Be Equal As Strings ${resp.status_code} 200 |
| 343 | [Return] ${resp.json()} |
| 344 | Start Certify ASDC Catalog Service |
| 345 | [Documentation] start certify an asdc Catalog Service by its id |
| 346 | [Arguments] ${catalog_service_id} |
| 347 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/startCertification ${None} ${ASDC_TESTER_USER_ID} |
| 348 | Should Be Equal As Strings ${resp.status_code} 200 |
| 349 | [Return] ${resp.json()} |
| 350 | Certify ASDC Catalog Service |
| 351 | [Documentation] start certify an asdc Catalog Service by its id and returns the new id |
| 352 | [Arguments] ${catalog_service_id} |
| 353 | ${map}= Create Dictionary user_remarks=Robot remarks |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 354 | ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 355 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${ASDC_TESTER_USER_ID} |
| 356 | Should Be Equal As Strings ${resp.status_code} 200 |
| 357 | [Return] ${resp.json()['uniqueId']} |
| 358 | Approve ASDC Catalog Service |
| 359 | [Documentation] approve an asdc Catalog Service by its id |
| 360 | [Arguments] ${catalog_service_id} |
| 361 | ${map}= Create Dictionary user_remarks=Robot remarks |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 362 | ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 363 | ${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} |
| 364 | Should Be Equal As Strings ${resp.status_code} 200 |
| 365 | [Return] ${resp.json()} |
| 366 | Distribute ASDC Catalog Service |
| 367 | [Documentation] distribute an asdc Catalog Service by its id |
| 368 | [Arguments] ${catalog_service_id} |
| 369 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_DISTRIBUTION_ACTIVATE_PATH} ${None} ${ASDC_OPS_USER_ID} |
| 370 | Should Be Equal As Strings ${resp.status_code} 200 |
| 371 | [Return] ${resp.json()} |
| 372 | Add ASDC Resource Instance |
| 373 | [Documentation] Creates an asdc Resource Instance and returns its id |
| 374 | [Arguments] ${catalog_service_id} ${catalog_resource_id} ${catalog_resource_name} |
| 375 | ${milli_timestamp}= Generate MilliTimestamp UUID |
| 376 | ${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] | 377 | ${data}= Fill JSON Template File ${ASDC_RESOURCE_INSTANCE_TEMPLATE} ${map} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 378 | ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} ${data} ${ASDC_DESIGNER_USER_ID} |
| 379 | Should Be Equal As Strings ${resp.status_code} 201 |
| 380 | [Return] ${resp.json()['uniqueId']} |
| 381 | Get Catalog Service Distribution |
| 382 | [Documentation] gets an asdc catalog Service distrbution |
| 383 | [Arguments] ${catalog_service_uuid} |
| 384 | ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_uuid}${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH} ${ASDC_OPS_USER_ID} |
| 385 | Should Be Equal As Strings ${resp.status_code} 200 |
| 386 | [Return] ${resp.json()} |
| 387 | Check Catalog Service Distributed |
| 388 | [Documentation] gets an asdc catalog Service distrbution |
| 389 | [Arguments] ${catalog_service_uuid} |
| 390 | ${dist_resp}= Get Catalog Service Distribution ${catalog_service_uuid} |
| 391 | Should Be Equal As Strings ${dist_resp['distributionStatusOfServiceList'][0]['deployementStatus']} Distributed |
| 392 | ${det_resp}= Get Catalog Service Distribution Details ${dist_resp['distributionStatusOfServiceList'][0]['distributionID']} |
| 393 | @{ITEMS}= Copy List ${det_resp['distributionStatusList']} |
Brian Freeman | f508ab2 | 2018-03-15 21:19:41 -0500 | [diff] [blame] | 394 | Should Not Be Empty ${ITEMS} |
| 395 | ${AAI_DEPLOY} Set Variable FALSE |
| 396 | ${SDNC_DEPLOY} Set Variable FALSE |
| 397 | ${SO_DEPLOY} Set Variable FALSE |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 398 | :FOR ${ELEMENT} IN @{ITEMS} |
Brian Freeman | f508ab2 | 2018-03-15 21:19:41 -0500 | [diff] [blame] | 399 | \ Log ${ELEMENT['omfComponentID']} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 400 | \ Log ${ELEMENT['status']} |
Brian Freeman | f508ab2 | 2018-03-15 21:19:41 -0500 | [diff] [blame] | 401 | \ ${SDNC_DEPLOY} Set Variable If (('sdnc-docker' in '${ELEMENT['omfComponentID']}') and ('${ELEMENT['status']}' == 'DEPLOY_OK')) or ('${SDNC_DEPLOY}' == 'TRUE') TRUE |
| 402 | \ ${SO_DEPLOY} Set Variable If (('mso-docker' in '${ELEMENT['omfComponentID']}') and ('${ELEMENT['status']}' == 'DEPLOY_OK')) or ('${SO_DEPLOY}' == 'TRUE') TRUE |
| 403 | \ ${AAI_DEPLOY} Set Variable If (('aai-ml' in '${ELEMENT['omfComponentID']}') and ('${ELEMENT['status']}' == 'DEPLOY_OK')) or ('${AAI_DEPLOY}'=='TRUE') TRUE |
| 404 | Should Be True ( '${SDNC_DEPLOY}'=='TRUE') SDNC Test |
| 405 | Should Be True ( '${SO_DEPLOY}'=='TRUE') SO Test |
| 406 | Should Be True ( '${AAI_DEPLOY}'=='TRUE') AAI Test |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 407 | Get Catalog Service Distribution Details |
| 408 | [Documentation] gets an asdc catalog Service distrbution details |
| 409 | [Arguments] ${catalog_service_distribution_id} |
| 410 | ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH}/${catalog_service_distribution_id} ${ASDC_OPS_USER_ID} |
| 411 | Should Be Equal As Strings ${resp.status_code} 200 |
| 412 | [Return] ${resp.json()} |
| 413 | Run ASDC Health Check |
| 414 | [Documentation] Runs a ASDC health check |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 415 | ${session}= Create Session asdc ${ASDC_FE_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 416 | ${uuid}= Generate UUID |
| 417 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 418 | ${resp}= Get Request asdc ${ASDC_HEALTH_CHECK_PATH} headers=${headers} |
| 419 | Should Be Equal As Strings ${resp.status_code} 200 |
| 420 | @{ITEMS}= Copy List ${resp.json()['componentsInfo']} |
| 421 | :FOR ${ELEMENT} IN @{ITEMS} |
| 422 | \ Log ${ELEMENT['healthCheckStatus']} |
| 423 | \ Should Be Equal As Strings ${ELEMENT['healthCheckStatus']} UP |
| 424 | Run ASDC Get Request |
| 425 | [Documentation] Runs an ASDC get request |
| 426 | [Arguments] ${data_path} ${user}=${ASDC_DESIGNER_USER_ID} |
| 427 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 428 | Log Creating session ${ASDC_BE_ENDPOINT} |
| 429 | ${session}= Create Session asdc ${ASDC_BE_ENDPOINT} auth=${auth} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 430 | ${uuid}= Generate UUID |
| 431 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 432 | ${resp}= Get Request asdc ${data_path} headers=${headers} |
| 433 | Log Received response from asdc ${resp.text} |
| 434 | [Return] ${resp} |
| 435 | Run ASDC Put Request |
| 436 | [Documentation] Runs an ASDC put request |
| 437 | [Arguments] ${data_path} ${data} ${user}=${ASDC_DESIGNER_USER_ID} |
| 438 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 439 | Log Creating session ${ASDC_BE_ENDPOINT} |
| 440 | ${session}= Create Session asdc ${ASDC_BE_ENDPOINT} auth=${auth} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 441 | ${uuid}= Generate UUID |
| 442 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 443 | ${resp}= Put Request asdc ${data_path} data=${data} headers=${headers} |
| 444 | Log Received response from asdc ${resp.text} |
| 445 | [Return] ${resp} |
Jerry Flood | 6bd1afa | 2017-10-09 09:59:23 -0400 | [diff] [blame] | 446 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 447 | Run ASDC Post Files Request |
| 448 | [Documentation] Runs an ASDC post request |
| 449 | [Arguments] ${data_path} ${files} ${user}=${ASDC_DESIGNER_USER_ID} |
| 450 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 451 | Log Creating session ${ASDC_BE_ENDPOINT} |
| 452 | ${session}= Create Session asdc ${ASDC_BE_ENDPOINT} auth=${auth} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 453 | ${uuid}= Generate UUID |
| 454 | ${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} |
| 455 | ${resp}= Post Request asdc ${data_path} files=${files} headers=${headers} |
| 456 | Log Received response from asdc ${resp.text} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 457 | [Return] ${resp} |
Jerry Flood | 6bd1afa | 2017-10-09 09:59:23 -0400 | [diff] [blame] | 458 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 459 | Run ASDC Post Request |
| 460 | [Documentation] Runs an ASDC post request |
| 461 | [Arguments] ${data_path} ${data} ${user}=${ASDC_DESIGNER_USER_ID} |
| 462 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 463 | Log Creating session ${ASDC_BE_ENDPOINT} |
| 464 | ${session}= Create Session asdc ${ASDC_BE_ENDPOINT} auth=${auth} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 465 | ${uuid}= Generate UUID |
| 466 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 467 | ${resp}= Post Request asdc ${data_path} data=${data} headers=${headers} |
| 468 | Log Received response from asdc ${resp.text} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 469 | [Return] ${resp} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 470 | Run ASDC Delete Request |
| 471 | [Documentation] Runs an ASDC delete request |
| 472 | [Arguments] ${data_path} ${user}=${ASDC_DESIGNER_USER_ID} |
| 473 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 474 | Log Creating session ${ASDC_BE_ENDPOINT} |
| 475 | ${session}= Create Session asdc ${ASDC_BE_ENDPOINT} auth=${auth} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 476 | ${uuid}= Generate UUID |
| 477 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 478 | ${resp}= Delete Request asdc ${data_path} headers=${headers} |
| 479 | Log Received response from asdc ${resp.text} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 480 | [Return] ${resp} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 481 | Open ASDC GUI |
| 482 | [Documentation] Logs in to ASDC GUI |
| 483 | [Arguments] ${PATH} |
| 484 | ## Setup Browever now being managed by the test case |
| 485 | ##Setup Browser |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 486 | Go To ${ASDC_FE_ENDPOINT}${PATH} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 487 | Maximize Browser Window |
Jerry Flood | 6bd1afa | 2017-10-09 09:59:23 -0400 | [diff] [blame] | 488 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 489 | Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 490 | Log Logging in to ${ASDC_FE_ENDPOINT}${PATH} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 491 | Title Should Be ASDC |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 492 | 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] | 493 | Log Logged in to ${ASDC_FE_ENDPOINT}${PATH} |
Jerry Flood | 6bd1afa | 2017-10-09 09:59:23 -0400 | [diff] [blame] | 494 | |
| 495 | |
| 496 | Create Multi Part |
| 497 | [Arguments] ${addTo} ${partName} ${filePath} ${contentType}=${None} |
| 498 | ${fileData}= Get Binary File ${filePath} |
| 499 | ${fileDir} ${fileName}= Split Path ${filePath} |
| 500 | ${partData}= Create List ${fileName} ${fileData} ${contentType} |
| 501 | Set To Dictionary ${addTo} ${partName}=${partData} |