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