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 |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 3 | Library RequestsLibrary |
DR695H | 18872bc | 2019-06-13 16:16:52 -0400 | [diff] [blame] | 4 | Library ONAPLibrary.Utilities |
DR695H | 7aca1a4 | 2019-06-03 17:08:34 -0400 | [diff] [blame] | 5 | Library ONAPLibrary.JSON |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 6 | Library OperatingSystem |
| 7 | Library Collections |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 8 | Library SeleniumLibrary |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 9 | Library String |
Yang Xu | 7037e54 | 2018-12-28 01:19:26 -0500 | [diff] [blame] | 10 | Library ArchiveLibrary |
DR695H | d92b007 | 2019-06-17 17:23:14 -0400 | [diff] [blame] | 11 | Library ONAPLibrary.Openstack |
Brian Freeman | 1503378 | 2019-03-22 15:48:55 -0500 | [diff] [blame] | 12 | Library DateTime |
DR695H | fcb0ee8 | 2019-05-22 17:21:38 -0400 | [diff] [blame] | 13 | Library ONAPLibrary.ServiceMapping |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 14 | Library ONAPLibrary.Templating |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 15 | Library ONAPLibrary.SDC WITH NAME SDC |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 16 | Resource global_properties.robot |
| 17 | Resource browser_setup.robot |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 18 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 19 | *** Variables *** |
| 20 | ${ASDC_DESIGNER_USER_ID} cs0008 |
| 21 | ${ASDC_TESTER_USER_ID} jm0007 |
| 22 | ${ASDC_GOVERNOR_USER_ID} gv0001 |
| 23 | ${ASDC_OPS_USER_ID} op0001 |
| 24 | ${ASDC_HEALTH_CHECK_PATH} /sdc1/rest/healthCheck |
| 25 | ${ASDC_VENDOR_LICENSE_MODEL_PATH} /onboarding-api/v1.0/vendor-license-models |
| 26 | ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH} /onboarding-api/v1.0/vendor-software-products |
| 27 | ${ASDC_VENDOR_KEY_GROUP_PATH} /license-key-groups |
| 28 | ${ASDC_VENDOR_ENTITLEMENT_POOL_PATH} /entitlement-pools |
| 29 | ${ASDC_VENDOR_FEATURE_GROUP_PATH} /feature-groups |
| 30 | ${ASDC_VENDOR_LICENSE_AGREEMENT_PATH} /license-agreements |
| 31 | ${ASDC_VENDOR_ACTIONS_PATH} /actions |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 32 | ${ASDC_VENDOR_SOFTWARE_UPLOAD_PATH} /orchestration-template-candidate |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 33 | ${ASDC_FE_CATALOG_RESOURCES_PATH} /sdc1/feProxy/rest/v1/catalog/resources |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 34 | ${ASDC_FE_CATALOG_SERVICES_PATH} /sdc1/feProxy/rest/v1/catalog/services |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 35 | ${ASDC_CATALOG_RESOURCES_PATH} /sdc2/rest/v1/catalog/resources |
| 36 | ${ASDC_CATALOG_SERVICES_PATH} /sdc2/rest/v1/catalog/services |
| 37 | ${ASDC_CATALOG_INACTIVE_RESOURCES_PATH} /sdc2/rest/v1/inactiveComponents/resource |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 38 | ${ASDC_CATALOG_RESOURCES_QUERY_PATH} /sdc2/rest/v1/catalog/resources/resourceName |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 39 | ${ASDC_CATALOG_INACTIVE_SERVICES_PATH} /sdc2/rest/v1/inactiveComponents/service |
| 40 | ${ASDC_CATALOG_LIFECYCLE_PATH} /lifecycleState |
| 41 | ${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} /resourceInstance |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 42 | ${ASDC_CATALOG_SERVICE_RESOURCE_ARTIFACT_PATH} /artifacts |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 43 | ${ASDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH} /distribution-state |
| 44 | ${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH} /distribution |
| 45 | ${ASDC_DISTRIBUTION_STATE_APPROVE_PATH} /approve |
| 46 | ${ASDC_CATALOG_SERVICE_DISTRIBUTION_ACTIVATE_PATH} /distribution/PROD/activate |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 47 | ${ASDC_LICENSE_MODEL_TEMPLATE} asdc/license_model.jinja |
| 48 | ${ASDC_KEY_GROUP_TEMPLATE} asdc/key_group.jinja |
| 49 | ${ASDC_ENTITLEMENT_POOL_TEMPLATE} asdc/entitlement_pool.jinja |
| 50 | ${ASDC_FEATURE_GROUP_TEMPLATE} asdc/feature_group.jinja |
| 51 | ${ASDC_LICENSE_AGREEMENT_TEMPLATE} asdc/license_agreement.jinja |
| 52 | ${ASDC_ACTION_TEMPLATE} asdc/action.jinja |
| 53 | ${ASDC_SOFTWARE_PRODUCT_TEMPLATE} asdc/software_product.jinja |
| 54 | ${ASDC_ARTIFACT_UPLOAD_TEMPLATE} asdc/artifact_upload.jinja |
| 55 | ${ASDC_CATALOG_RESOURCE_TEMPLATE} asdc/catalog_resource.jinja |
| 56 | ${ASDC_USER_REMARKS_TEMPLATE} asdc/user_remarks.jinja |
| 57 | ${ASDC_CATALOG_SERVICE_TEMPLATE} asdc/catalog_service.jinja |
| 58 | ${ASDC_RESOURCE_INSTANCE_TEMPLATE} asdc/resource_instance.jinja |
| 59 | ${ASDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE} asdc/catalog_vnf_properties.jinja |
| 60 | ${ASDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE} asdc/catalog_vnf_inputs.jinja |
| 61 | ${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE} asdc/catalog_net_input_properties.jinja |
| 62 | ${ASDC_ALLOTTED_RESOURCE_CATALOG_RESOURCE_TEMPLATE} asdc/catalog_resource_alloted_resource.jinja |
| 63 | ${SDC_CATALOG_ALLOTTED_RESOURCE_PROPERTIES_TEMPLATE} asdc/catalog_allotted_properties.jinja |
| 64 | ${SDC_CATALOG_ALLOTTED_RESOURCE_INPUTS_TEMPLATE} asdc/catalog_allotted_inputs.jinja |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 65 | ${SDC_CATALOG_DEPLOYMENT_ARTIFACT_PATH} robot/assets/asdc/blueprints/ |
Brian Freeman | f508ab2 | 2018-03-15 21:19:41 -0500 | [diff] [blame] | 66 | ${ASDC_FE_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_FE_IP_ADDR}:${GLOBAL_ASDC_FE_PORT} |
| 67 | ${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] | 68 | ${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] | 69 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 70 | *** Keywords *** |
| 71 | Distribute Model From ASDC |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 72 | [Documentation] Goes end to end creating all the ASDC objects based ONAP model and distributing it to the systems. It then returns the service name, VF name and VF module name |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 73 | [Arguments] ${model_zip_path} ${catalog_service_name}= ${cds}= ${service}= |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 74 | # For Testing use random service names |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 75 | #${random}= Get Current Date |
| 76 | #${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name}_${random} |
jf9860 | 75010a4 | 2017-02-22 16:52:54 -0500 | [diff] [blame] | 77 | ${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 78 | ${catalog_resource_ids}= Create List |
Jerry Flood | 3a169a3 | 2017-12-01 12:39:10 -0500 | [diff] [blame] | 79 | ${catalog_resources}= Create Dictionary |
Brian Freeman | ee02b31 | 2019-02-04 20:36:08 -0500 | [diff] [blame] | 80 | ##### TODO: Support for Multiple resources of one type in a service ###### |
| 81 | # The zip list is the resources - no mechanism to indicate more than 1 of the items in the zip list |
DR695H | fcb0ee8 | 2019-05-22 17:21:38 -0400 | [diff] [blame] | 82 | # Get Service Vnf Mapping has the logical mapping but it is not the same key as model_zip_path |
| 83 | # ${vnflist}= Get Service Vnf Mapping alias ${service} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 84 | # Save the resource_id in a dictionary keyed by the resource name in the zipfile name (vFWDT_vFWSNK.zip or vFWDT_vPKG.zip) |
| 85 | # Create the resources but do not immediately add resource |
Brian Freeman | ee02b31 | 2019-02-04 20:36:08 -0500 | [diff] [blame] | 86 | # Add Resource to Service in a separate FOR loop |
Brian Freeman | ee02b31 | 2019-02-04 20:36:08 -0500 | [diff] [blame] | 87 | ${resource_types}= Create Dictionary |
| 88 | |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 89 | :FOR ${zip} IN @{model_zip_path} |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 90 | \ ${loop_catalog_resource_id}= Setup ASDC Catalog Resource ${zip} ${cds} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 91 | # zip can be vFW.zip or vFWDT_VFWSNK.zip |
Brian Freeman | ee02b31 | 2019-02-04 20:36:08 -0500 | [diff] [blame] | 92 | \ ${resource_type_match}= Get Regexp Matches ${zip} ${service}_(.*)\.zip 1 |
Brian Freeman | 12ff184 | 2019-02-13 13:54:48 -0500 | [diff] [blame] | 93 | # Need to be able to distribute preload for vFWCL vFWSNK and vFWDT vFWSNK to prepend service to vnf_type |
| 94 | \ ${resource_type_string}= Set Variable If len(${resource_type_match})==0 ${service} ${service}${resource_type_match[0]} |
Brian Freeman | ee02b31 | 2019-02-04 20:36:08 -0500 | [diff] [blame] | 95 | \ Set To Dictionary ${resource_types} ${resource_type_string} ${loop_catalog_resource_id} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 96 | \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id} |
Brian Freeman | ee02b31 | 2019-02-04 20:36:08 -0500 | [diff] [blame] | 97 | |
DR695H | fcb0ee8 | 2019-05-22 17:21:38 -0400 | [diff] [blame] | 98 | Set Directory default ./demo/service_mapping |
| 99 | ${vnflist}= Get Service Vnf Mapping default ${service} |
Brian Freeman | ee02b31 | 2019-02-04 20:36:08 -0500 | [diff] [blame] | 100 | |
| 101 | # Spread the icons on the pallette starting on the left |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 102 | ${xoffset}= Set Variable ${0} |
Brian Freeman | ee02b31 | 2019-02-04 20:36:08 -0500 | [diff] [blame] | 103 | |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 104 | :FOR ${vnf} IN @{vnflist} |
Brian Freeman | ee02b31 | 2019-02-04 20:36:08 -0500 | [diff] [blame] | 105 | \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${resource_types['${vnf}']} |
| 106 | \ Set To Dictionary ${catalog_resources} ${resource_types['${vnf}']}=${loop_catalog_resource_resp} |
| 107 | \ ${catalog_resource_unique_name}= Add ASDC Resource Instance ${catalog_service_id} ${resource_types['${vnf}']} ${loop_catalog_resource_resp['name']} ${xoffset} |
| 108 | \ ${xoffset}= Set Variable ${xoffset+100} |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 109 | # |
| 110 | # do this here because the loop_catalog_resource_resp is different format after adding networks |
| 111 | ${vf_module}= Find Element In Array ${loop_catalog_resource_resp['groups']} type org.openecomp.groups.VfModule |
| 112 | # |
| 113 | # do network |
DR695H | fcb0ee8 | 2019-05-22 17:21:38 -0400 | [diff] [blame] | 114 | ${networklist}= Get Service Neutron Mapping default ${service} |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 115 | ${generic_neutron_net_uuid}= Get Generic NeutronNet UUID |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 116 | :FOR ${network} IN @{networklist} |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 117 | \ ${loop_catalog_resource_id}= Set Variable ${generic_neutron_net_uuid} |
| 118 | \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id} |
| 119 | \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id} |
Yang Xu | fac7a63 | 2019-05-17 01:01:26 -0400 | [diff] [blame] | 120 | \ ${loop_catalog_resource_id}= Add ASDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${network} ${xoffset} ${0} VL |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 121 | \ ${nf_role}= Convert To Lowercase ${network} |
| 122 | \ Setup SDC Catalog Resource GenericNeutronNet Properties ${catalog_service_id} ${nf_role} ${loop_catalog_resource_id} |
| 123 | \ ${xoffset}= Set Variable ${xoffset+100} |
| 124 | \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 125 | ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 126 | # |
| 127 | # do deployment artifacts |
| 128 | # |
DR695H | fcb0ee8 | 2019-05-22 17:21:38 -0400 | [diff] [blame] | 129 | ${deploymentlist}= Get Service Deployment Artifact Mapping default ${service} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 130 | :FOR ${deployment} IN @{deploymentlist} |
| 131 | \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id} |
| 132 | \ Setup SDC Catalog Resource Deployment Artifact Properties ${catalog_service_id} ${loop_catalog_resource_resp} ${catalog_resource_unique_name} ${deployment} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 133 | Checkin ASDC Catalog Service ${catalog_service_id} |
DR695H | f4b64d4 | 2019-06-25 10:52:00 -0400 | [diff] [blame] | 134 | Wait Until Keyword Succeeds 600s 15s Request Certify ASDC Catalog Service ${catalog_service_id} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 135 | Start Certify ASDC Catalog Service ${catalog_service_id} |
| 136 | # on certify it gets a new id |
| 137 | ${catalog_service_id}= Certify ASDC Catalog Service ${catalog_service_id} |
| 138 | Approve ASDC Catalog Service ${catalog_service_id} |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 139 | :FOR ${DIST_INDEX} IN RANGE 1 |
Brian Freeman | 18df891 | 2018-05-25 13:27:29 -0500 | [diff] [blame] | 140 | \ Log Distribution Attempt ${DIST_INDEX} |
| 141 | \ Distribute ASDC Catalog Service ${catalog_service_id} |
| 142 | \ ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id} |
Brian Freeman | f940ee9 | 2018-05-25 21:09:05 -0500 | [diff] [blame] | 143 | \ ${status} ${_} = Run Keyword And Ignore Error Loop Over Check Catalog Service Distributed ${catalog_service_resp['uuid']} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 144 | \ Exit For Loop If '${status}'=='PASS' |
Brian Freeman | 8c002d5 | 2018-07-30 19:35:36 -0500 | [diff] [blame] | 145 | Should Be Equal As Strings ${status} PASS |
Jerry Flood | 3a169a3 | 2017-12-01 12:39:10 -0500 | [diff] [blame] | 146 | [Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} |
Brian Freeman | 18df891 | 2018-05-25 13:27:29 -0500 | [diff] [blame] | 147 | |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 148 | Distribute vCPEResCust Model From ASDC |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 149 | [Documentation] Goes end to end creating all the ASDC objects for the vCPE ResCust Service model and distributing it to the systems. It then returns the service name, VF name and VF module name |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 150 | [Arguments] ${model_zip_path} ${catalog_service_name}= ${cds}= ${service}= |
| 151 | # For testing use random service name |
Brian Freeman | 9c42ae1 | 2018-11-27 14:33:27 -0500 | [diff] [blame] | 152 | #${random}= Get Current Date |
DR695H | 18872bc | 2019-06-13 16:16:52 -0400 | [diff] [blame] | 153 | ${uuid}= Generate UUID4 |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 154 | ${random}= Evaluate str("${uuid}")[:4] |
| 155 | ${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name}_${random} |
| 156 | # catalog_service_name already |
| 157 | #${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name} |
DR695H | 8e7028b | 2019-07-10 10:13:58 -0400 | [diff] [blame] | 158 | Log ${\n}ServiceName: ${catalog_service_name}_${random} |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 159 | #${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name} |
| 160 | ${catalog_resource_ids}= Create List |
| 161 | ${catalog_resources}= Create Dictionary |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 162 | :FOR ${zip} IN @{model_zip_path} |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 163 | \ ${loop_catalog_resource_id}= Setup ASDC Catalog Resource ${zip} ${cds} |
| 164 | \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id} |
| 165 | \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id} |
| 166 | \ Add ASDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${loop_catalog_resource_resp['name']} |
| 167 | \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp} |
| 168 | # |
| 169 | # do this here because the loop_catalog_resource_resp is different format after adding networks |
| 170 | ${vf_module}= Find Element In Array ${loop_catalog_resource_resp['groups']} type org.openecomp.groups.VfModule |
| 171 | # |
| 172 | # do allottedresource |
| 173 | ${allottedresource_list}= Create List TunnelXConn BRG |
| 174 | # Example data |
| 175 | #${tunnelxconn_dict}= Create Dictionary invariantUUID=8ac029e7-77aa-40d4-b28a-d17c02d5fd82 UUID=2ddc1b37-d7da-4aab-b645-ed7db34a5d03 node_type=org.openecomp.service.Demovcpevgmux |
| 176 | #${brg_dict}= Create Dictionary invariantUUID=ff0337b9-dbe2-4d88-bb74-18bf027ae586 UUID=1b6974f1-4aed-47f4-b962-816aa1261927 node_type=org.openecomp.service.Demovcpevbrgemu |
Yang Xu | 7037e54 | 2018-12-28 01:19:26 -0500 | [diff] [blame] | 177 | # Create /tmp/vcpe_allotted_resource_data.json with demo vgmux and brgemu CSARs |
| 178 | Create Allotted Resource Data File |
Brian Freeman | a8ceb69 | 2019-03-03 09:37:54 -0500 | [diff] [blame] | 179 | ${vcpe_ar_data_file} OperatingSystem.Get File /tmp/vcpe_allotted_resource_data.json |
DR695H | 0ca56d1 | 2019-05-14 11:48:20 -0400 | [diff] [blame] | 180 | ${tunnelxconn_invariant_uuid}= Catenate ${vcpe_ar_data_file.json()['tunnelxconn']['invariantUUID']} |
| 181 | ${tunnelxconn_uuid}= Catenate ${vcpe_ar_data_file.json()['tunnelxconn']['UUID']} |
| 182 | ${tunnelxconn_node_type}= Catenate ${vcpe_ar_data_file.json()['tunnelxconn']['node_type']} |
| 183 | ${brg_invariant_uuid}= Catenate ${vcpe_ar_data_file.json()['brg']['invariantUUID']} |
| 184 | ${brg_uuid}= Catenate ${vcpe_ar_data_file.json()['brg']['UUID']} |
| 185 | ${brg_node_type}= Catenate ${vcpe_ar_data_file.json()['brg']['node_type']} |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 186 | ${tunnelxconn_dict}= Create Dictionary invariantUUID=${tunnelxconn_invariant_uuid} UUID=${tunnelxconn_uuid} node_type=${tunnelxconn_node_type} |
| 187 | ${brg_dict}= Create Dictionary invariantUUID=${brg_invariant_uuid} UUID=${brg_uuid} node_type=${brg_node_type} |
| 188 | ${xoffset}= Set Variable ${100} |
| 189 | ${allottedresource_uuid}= Get AllottedResource UUID |
| 190 | ${random}= Get Current Date |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 191 | :FOR ${allottedresource} IN @{allottedresource_list} |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 192 | \ ${loop_catalog_resource_id}= Set Variable ${allottedresource_uuid} |
| 193 | \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id} |
| 194 | \ ${loop_catalog_resource_id}= Add ASDC Allotted Resource Catalog Resource 00000 ${allottedresource}_${random} ONAP ${loop_catalog_resource_id} ${allottedresource} |
| 195 | \ ${loop_catalog_resource_id2}= Add ASDC Resource Instance To Resource ${loop_catalog_resource_id} ${allottedresource_uuid} ${allottedresource} ${xoffset} ${0} |
| 196 | \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id} |
| 197 | # |
| 198 | # Set the properties to relate to the brg and gmux |
| 199 | # |
| 200 | \ Run Keyword If '${allottedresource}'=='TunnelXConn' Setup SDC Catalog Resource AllottedResource Properties ${catalog_service_id} ${allottedresource} ${loop_catalog_resource_id} ${tunnelxconn_dict['invariantUUID']} ${tunnelxconn_dict['UUID']} ${tunnelxconn_dict['node_type']} |
| 201 | \ Run Keyword If '${allottedresource}'=='BRG' Setup SDC Catalog Resource AllottedResource Properties ${catalog_service_id} ${allottedresource} ${loop_catalog_resource_id} ${brg_dict['invariantUUID']} ${brg_dict['UUID']} ${brg_dict['node_type']} |
| 202 | # |
| 203 | # Set the nf_role nf_type |
| 204 | # |
| 205 | \ Run Keyword If '${allottedresource}'=='TunnelXConn' Setup SDC Catalog Resource AllottedResource Inputs ${catalog_service_id} ${allottedresource} ${loop_catalog_resource_id} |
| 206 | \ Run Keyword If '${allottedresource}'=='BRG' Setup SDC Catalog Resource AllottedResource Inputs ${catalog_service_id} ${allottedresource} ${loop_catalog_resource_id} |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 207 | \ ${loop_catalog_resource_id}= Certify ASDC Catalog Resource ${loop_catalog_resource_id} ${ASDC_DESIGNER_USER_ID} |
| 208 | \ Add ASDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${loop_catalog_resource_resp['name']} |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 209 | \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp} |
| 210 | ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id} |
| 211 | Checkin ASDC Catalog Service ${catalog_service_id} |
| 212 | Request Certify ASDC Catalog Service ${catalog_service_id} |
| 213 | Start Certify ASDC Catalog Service ${catalog_service_id} |
| 214 | # on certify it gets a new id |
| 215 | ${catalog_service_id}= Certify ASDC Catalog Service ${catalog_service_id} |
| 216 | Approve ASDC Catalog Service ${catalog_service_id} |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 217 | :FOR ${DIST_INDEX} IN RANGE 1 |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 218 | \ Log Distribution Attempt ${DIST_INDEX} |
| 219 | \ Distribute ASDC Catalog Service ${catalog_service_id} |
| 220 | \ ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id} |
| 221 | \ ${status} ${_} = Run Keyword And Ignore Error Loop Over Check Catalog Service Distributed ${catalog_service_resp['uuid']} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 222 | \ Exit For Loop If '${status}'=='PASS' |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 223 | Should Be Equal As Strings ${status} PASS |
| 224 | [Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} |
| 225 | |
| 226 | |
Yang Xu | 7037e54 | 2018-12-28 01:19:26 -0500 | [diff] [blame] | 227 | Create Allotted Resource Data File |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 228 | [Documentation] Create Allotted Resource json data file |
Yang Xu | 7037e54 | 2018-12-28 01:19:26 -0500 | [diff] [blame] | 229 | ${allotted_resource}= Create Dictionary |
| 230 | ${allotted_csar_map}= Create Dictionary |
| 231 | Set To Dictionary ${allotted_csar_map} tunnelxconn=service-Demovcpevgmux-csar.csar |
| 232 | Set To Dictionary ${allotted_csar_map} brg=service-Demovcpevbrgemu-csar.csar |
| 233 | ${keys}= Get Dictionary Keys ${allotted_csar_map} |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 234 | :FOR ${key} IN @{keys} |
Yang Xu | 7037e54 | 2018-12-28 01:19:26 -0500 | [diff] [blame] | 235 | \ ${csar}= Get From Dictionary ${allotted_csar_map} ${key} |
| 236 | \ ${dir} ${ext}= Split String From Right ${csar} - 1 |
| 237 | \ Extract Zip File /tmp/csar/${csar} /tmp/csar/${dir} |
| 238 | \ ${template}= Catenate /tmp/csar/${dir}/Definitions/${dir}-template.yml |
| 239 | \ ${json_str}= Template Yaml To Json ${template} |
| 240 | \ ${json_obj}= To Json ${json_str} |
| 241 | \ ${attrs}= Create Dictionary |
| 242 | \ Set To Dictionary ${attrs} invariantUUID=${json_obj['metadata']['invariantUUID']} |
| 243 | \ Set To Dictionary ${attrs} UUID=${json_obj['metadata']['UUID']} |
| 244 | \ Set To Dictionary ${attrs} node_type=${json_obj['topology_template']['substitution_mappings']['node_type']} |
| 245 | \ Set To Dictionary ${allotted_resource} ${key}=${attrs} |
| 246 | ${result_str}= Evaluate json.dumps(${allotted_resource}, indent=2) json |
DR695H | 8e7028b | 2019-07-10 10:13:58 -0400 | [diff] [blame] | 247 | Log ${result_str} |
Yang Xu | 7037e54 | 2018-12-28 01:19:26 -0500 | [diff] [blame] | 248 | Create File /tmp/vcpe_allotted_resource_data.json ${result_str} |
Yang Xu | 7037e54 | 2018-12-28 01:19:26 -0500 | [diff] [blame] | 249 | |
bdfreeman1421 | 1ad11d9 | 2018-11-17 18:47:37 +0000 | [diff] [blame] | 250 | Download CSAR |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 251 | [Documentation] Download CSAR |
bdfreeman1421 | 1ad11d9 | 2018-11-17 18:47:37 +0000 | [diff] [blame] | 252 | [Arguments] ${catalog_service_id} ${save_directory}=/tmp/csar |
| 253 | # get meta data |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 254 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 255 | ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/filteredDataByParams?include=toscaArtifacts ${ASDC_DESIGNER_USER_ID} auth=${auth} |
bdfreeman1421 | 1ad11d9 | 2018-11-17 18:47:37 +0000 | [diff] [blame] | 256 | ${csar_resource_id}= Set Variable ${resp.json()['toscaArtifacts']['assettoscacsar']['uniqueId']} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 257 | ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/artifacts/${csar_resource_id} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
bdfreeman1421 | 1ad11d9 | 2018-11-17 18:47:37 +0000 | [diff] [blame] | 258 | ${csar_file_name}= Set Variable ${resp.json()['artifactName']} |
| 259 | ${base64Obj}= Set Variable ${resp.json()['base64Contents']} |
DR695H | 3752994 | 2019-07-01 13:47:56 -0400 | [diff] [blame] | 260 | ${binObj}= Base64 Decode ${base64Obj} |
bdfreeman1421 | 1ad11d9 | 2018-11-17 18:47:37 +0000 | [diff] [blame] | 261 | Create Binary File ${save_directory}/${csar_file_name} ${binObj} |
DR695H | 8e7028b | 2019-07-10 10:13:58 -0400 | [diff] [blame] | 262 | Log ${\n}Downloaded:${csar_file_name} |
bdfreeman1421 | 1ad11d9 | 2018-11-17 18:47:37 +0000 | [diff] [blame] | 263 | |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 264 | |
| 265 | Get Generic NeutronNet UUID |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 266 | [Documentation] Look up the UUID of the Generic NeutronNetwork Resource |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 267 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 268 | ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_QUERY_PATH}/Generic%20NeutronNet/resourceVersion/1.0 ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 269 | [Return] ${resp.json()['allVersions']['1.0']} |
| 270 | |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 271 | Get AllottedResource UUID |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 272 | [Documentation] Look up the UUID of the Allotted Resource |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 273 | # if this fails then the AllottedResource template got deleted from SDC by mistake |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 274 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 275 | ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_QUERY_PATH}/AllottedResource/resourceVersion/1.0 ${ASDC_DESIGNER_USER_ID} auth=${auth} |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 276 | [Return] ${resp.json()['allVersions']['1.0']} |
| 277 | |
Brian Freeman | 18df891 | 2018-05-25 13:27:29 -0500 | [diff] [blame] | 278 | Loop Over Check Catalog Service Distributed |
Gary Wu | 58d5853 | 2018-07-27 16:02:51 -0700 | [diff] [blame] | 279 | [Arguments] ${catalog_service_id} |
Brian Freeman | adaa237 | 2018-10-24 12:25:22 -0500 | [diff] [blame] | 280 | # SO watchdog timeout is 300 seconds need buffer |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 281 | ${dist_status}= Set Variable CONTINUE |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 282 | :FOR ${CHECK_INDEX} IN RANGE 20 |
Brian Freeman | adaa237 | 2018-10-24 12:25:22 -0500 | [diff] [blame] | 283 | \ ${status} ${_} = Run Keyword And Ignore Error Check Catalog Service Distributed ${catalog_service_id} ${dist_status} |
Gary Wu | 58d5853 | 2018-07-27 16:02:51 -0700 | [diff] [blame] | 284 | \ Sleep 20s |
Brian Freeman | f940ee9 | 2018-05-25 21:09:05 -0500 | [diff] [blame] | 285 | \ Return From Keyword If '${status}'=='PASS' |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 286 | # need a way to exit the loop early on DISTRIBUTION_COMPLETE_ERROR ${dist_status} doesnt work |
| 287 | #\ Exit For Loop If '${dist_status}'=='EXIT' |
| 288 | Should Be Equal As Strings ${status} PASS |
Brian Freeman | 18df891 | 2018-05-25 13:27:29 -0500 | [diff] [blame] | 289 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 290 | Setup ASDC Catalog Resource |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 291 | [Documentation] Creates all the steps a VF needs for an ASDC Catalog Resource and returns the id |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 292 | [Arguments] ${model_zip_path} ${cds}= |
Brian Freeman | b568e5e | 2018-04-05 21:03:38 -0500 | [diff] [blame] | 293 | ${license_model_id} ${license_model_version_id}= Add ASDC License Model |
Brian Freeman | 1503378 | 2019-03-22 15:48:55 -0500 | [diff] [blame] | 294 | |
| 295 | |
| 296 | ${license_temp_date}= Get Current Date |
| 297 | ${license_start_date}= Get Current Date result_format=%m/%d/%Y |
| 298 | ${license_end_date}= Add Time To Date ${license_temp_date} 365 days result_format=%m/%d/%Y |
| 299 | ${key_group_id}= Add ASDC License Group ${license_model_id} ${license_model_version_id} ${license_start_date} ${license_end_date} |
| 300 | ${pool_id}= Add ASDC Entitlement Pool ${license_model_id} ${license_model_version_id} ${license_start_date} ${license_end_date} |
| 301 | |
Brian Freeman | b568e5e | 2018-04-05 21:03:38 -0500 | [diff] [blame] | 302 | ${feature_group_id}= Add ASDC Feature Group ${license_model_id} ${key_group_id} ${pool_id} ${license_model_version_id} |
| 303 | ${license_agreement_id}= Add ASDC License Agreement ${license_model_id} ${feature_group_id} ${license_model_version_id} |
| 304 | Submit ASDC License Model ${license_model_id} ${license_model_version_id} |
| 305 | ${license_model_resp}= Get ASDC License Model ${license_model_id} ${license_model_version_id} |
Brian Freeman | 9c42ae1 | 2018-11-27 14:33:27 -0500 | [diff] [blame] | 306 | ${matches}= Get Regexp Matches ${model_zip_path} temp/(.*)\.zip 1 |
| 307 | ${software_product_name_prefix}= Set Variable ${matches[0]} |
| 308 | ${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} ${software_product_name_prefix} |
Brian Freeman | b568e5e | 2018-04-05 21:03:38 -0500 | [diff] [blame] | 309 | Upload ASDC Heat Package ${software_product_id} ${model_zip_path} ${software_product_version_id} |
| 310 | Validate ASDC Software Product ${software_product_id} ${software_product_version_id} |
| 311 | Submit ASDC Software Product ${software_product_id} ${software_product_version_id} |
| 312 | Package ASDC Software Product ${software_product_id} ${software_product_version_id} |
| 313 | ${software_product_resp}= Get ASDC Software Product ${software_product_id} ${software_product_version_id} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 314 | ${catalog_resource_id}= Add ASDC Catalog Resource ${license_agreement_id} ${software_product_resp['name']} ${license_model_resp['vendorName']} ${software_product_id} |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 315 | # Check if need to set up CDS properties |
| 316 | Run Keyword If '${cds}' == 'vfwng' Setup ASDC Catalog Resource CDS Properties ${catalog_resource_id} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 317 | |
Brian Freeman | 391680a | 2018-08-11 15:20:58 -0500 | [diff] [blame] | 318 | ${catalog_resource_id}= Certify ASDC Catalog Resource ${catalog_resource_id} ${ASDC_DESIGNER_USER_ID} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 319 | [Return] ${catalog_resource_id} |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 320 | |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 321 | |
| 322 | Setup SDC Catalog Resource Deployment Artifact Properties |
| 323 | [Documentation] Set up Deployment Artiface properties |
| 324 | [Arguments] ${catalog_service_id} ${catalog_parent_service_id} ${catalog_resource_unique_id} ${blueprint_file} |
| 325 | ${resp}= Get ASDC Catalog Resource Component Instances Properties ${catalog_service_id} |
Brian Freeman | a8ceb69 | 2019-03-03 09:37:54 -0500 | [diff] [blame] | 326 | ${blueprint_data} OperatingSystem.Get File ${SDC_CATALOG_DEPLOYMENT_ARTIFACT_PATH}${blueprint_file} |
DR695H | 3752994 | 2019-07-01 13:47:56 -0400 | [diff] [blame] | 327 | ${payloadData}= Base64 Encode ${blueprint_data} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 328 | ${dict}= Create Dictionary artifactLabel=blueprint artifactName=${blueprint_file} artifactType=DCAE_INVENTORY_BLUEPRINT artifactGroupType=DEPLOYMENT description=${blueprint_file} payloadData=${payloadData} |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 329 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 330 | ${data}= Apply Template sdc ${ASDC_ARTIFACT_UPLOAD_TEMPLATE} ${dict} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 331 | # POST artifactUpload to resource |
| 332 | ${artifact_upload_path}= Catenate ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/resourceInstance/${catalog_resource_unique_id}${ASDC_CATALOG_SERVICE_RESOURCE_ARTIFACT_PATH} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 333 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 334 | ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${artifact_upload_path} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 335 | Should Be Equal As Strings ${resp.status_code} 200 |
| 336 | [Return] ${resp} |
| 337 | |
| 338 | |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 339 | Setup SDC Catalog Resource GenericNeutronNet Properties |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 340 | [Documentation] Set up GenericNeutronNet properties and inputs |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 341 | [Arguments] ${catalog_service_id} ${nf_role} ${catalog_parent_service_id} |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 342 | ${resp}= Get ASDC Catalog Resource Component Instances Properties ${catalog_service_id} |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 343 | ${componentInstances} Set Variable @{resp['componentInstancesProperties']} |
| 344 | # componentInstances can have 1 or more than 1 entry |
| 345 | ${passed}= Run Keyword And Return Status Evaluate type(${componentInstances}) |
| 346 | ${type}= Run Keyword If ${passed} Evaluate type(${componentInstances}) |
| 347 | ${componentInstancesList}= Run Keyword If "${type}"!="<type 'list'>" Create List ${componentInstances} |
| 348 | ... ELSE Set Variable ${componentInstances} |
| 349 | :FOR ${item} IN @{componentInstancesList} |
| 350 | \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${item} ${nf_role} |
| 351 | \ Run Keyword If '${test}' == 'FAIL' Continue For Loop |
| 352 | \ ${componentInstance1}= Set Variable ${item} |
| 353 | :FOR ${comp} IN @{resp['componentInstancesProperties']["${componentInstance1}"]} |
| 354 | \ ${name} Set Variable ${comp['name']} |
| 355 | \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${name} network_role |
| 356 | \ Run Keyword If '${test}' == 'FAIL' Continue For Loop |
| 357 | \ ${description} Set Variable ${comp['description']} |
| 358 | \ ${description}= Replace String ${description} ${\n} \ |
| 359 | \ ${uniqueId} Set Variable ${comp['uniqueId']} |
| 360 | \ ${parentUniqueId} Set Variable ${comp['parentUniqueId']} |
| 361 | \ ${ownerId} Set Variable ${comp['ownerId']} |
| 362 | \ ${dict}= Create Dictionary parentUniqueId=${parentUniqueId} ownerId=${ownerId} uniqueId=${uniqueId} description=${description} |
| 363 | \ Run Keyword If '${name}'=='network_role' Set To Dictionary ${dict} name=${name} value=${nf_role} |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 364 | \ Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 365 | \ ${data}= Apply Template sdc ${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE} ${dict} |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 366 | \ ${response}= Set ASDC Catalog Resource Component Instance Properties ${catalog_parent_service_id} ${catalog_service_id} ${data} |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 367 | |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 368 | |
| 369 | Setup SDC Catalog Resource AllottedResource Properties |
| 370 | [Documentation] Set up Allotted Resource properties and inputs |
| 371 | [Arguments] ${catalog_service_id} ${nf_role} ${catalog_resource_id} ${invariantUUID} ${UUID} ${node_type} |
| 372 | # Set component instances properties |
| 373 | ${nf_role_lc}= Convert To Lowercase ${nf_role} |
| 374 | ${resp}= Get ASDC Catalog Resource Component Instances Properties For Resource ${catalog_resource_id} |
| 375 | ${componentInstances} Set Variable @{resp['componentInstancesProperties']} |
| 376 | # componentInstances can have 1 or more than 1 entry |
| 377 | ${passed}= Run Keyword And Return Status Evaluate type(${componentInstances}) |
| 378 | ${type}= Run Keyword If ${passed} Evaluate type(${componentInstances}) |
| 379 | ${componentInstancesList}= Run Keyword If "${type}"!="<type 'list'>" Create List ${componentInstances} |
| 380 | ... ELSE Set Variable ${componentInstances} |
| 381 | :FOR ${item} IN @{componentInstancesList} |
| 382 | \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${item} ${nf_role_lc} |
| 383 | \ Run Keyword If '${test}' == 'FAIL' Continue For Loop |
| 384 | \ ${componentInstance1}= Set Variable ${item} |
| 385 | ${dict}= Create Dictionary |
| 386 | :FOR ${comp} IN @{resp['componentInstancesProperties']["${componentInstance1}"]} |
| 387 | \ ${name} Set Variable ${comp['name']} |
| 388 | \ ${test} ${v}= Run Keyword and Ignore Error Should Contain Any ${name} network_role providing_service_invariant_uuid providing_service_uuid providing_service_name uniqueId |
| 389 | \ Run Keyword If '${test}' == 'FAIL' Continue For Loop |
| 390 | \ ${parentUniqueId} Set Variable ${comp['parentUniqueId']} |
| 391 | \ ${ownerId} Set Variable ${comp['ownerId']} |
| 392 | \ Set To Dictionary ${dict} parentUniqueId=${parentUniqueId} ownerId=${ownerId} |
| 393 | \ Run Keyword If '${name}'=='providing_service_invariant_uuid' Set To Dictionary ${dict} providing_service_invariant_uuid=${invariantUUID} |
| 394 | \ Run Keyword If '${name}'=='providing_service_uuid' Set To Dictionary ${dict} providing_service_uuid=${UUID} |
| 395 | \ Run Keyword If '${name}'=='providing_service_name' Set To Dictionary ${dict} providing_service_name=${node_type} |
| 396 | # Sets it for each loop but should be one |
| 397 | \ ${uniqueId} Set Variable ${comp['uniqueId']} |
| 398 | \ ${uniqueId} Fetch From Left ${uniqueId} . |
| 399 | \ Set To Dictionary ${dict} uniqueId=${uniqueId} |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 400 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 401 | ${data}= Apply Template sdc ${SDC_CATALOG_ALLOTTED_RESOURCE_PROPERTIES_TEMPLATE} ${dict} |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 402 | ${response}= Set ASDC Catalog Resource Component Instance Properties For Resource ${catalog_resource_id} ${componentInstance1} ${data} |
DR695H | 8e7028b | 2019-07-10 10:13:58 -0400 | [diff] [blame] | 403 | Log resp=${response} |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 404 | |
| 405 | |
| 406 | Setup SDC Catalog Resource AllottedResource Inputs |
| 407 | [Documentation] Set up Allotted Resource inputs |
| 408 | [Arguments] ${catalog_service_id} ${nf_role} ${catalog_resource_id} |
| 409 | # Set vnf inputs |
| 410 | ${resp}= Get ASDC Catalog Resource Inputs ${catalog_resource_id} |
| 411 | ${dict}= Create Dictionary |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 412 | :FOR ${comp} IN @{resp['inputs']} |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 413 | \ ${name} Set Variable ${comp['name']} |
| 414 | \ ${uid} Set Variable ${comp['uniqueId']} |
| 415 | \ Run Keyword If '${name}'=='nf_type' Set To Dictionary ${dict} nf_type=${nf_role} nf_type_uid=${uid} |
| 416 | \ Run Keyword If '${name}'=='nf_role' Set To Dictionary ${dict} nf_role=${nf_role} nf_role_uid=${uid} |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 417 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 418 | ${data}= Apply Template sdc ${SDC_CATALOG_ALLOTTED_RESOURCE_INPUTS_TEMPLATE} ${dict} |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 419 | ${response}= Set ASDC Catalog Resource VNF Inputs ${catalog_resource_id} ${data} |
| 420 | [Return] ${response} |
| 421 | |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 422 | Setup ASDC Catalog Resource CDS Properties |
| 423 | [Documentation] Set up vfwng VNF properties and inputs for CDS |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 424 | [Arguments] ${catalog_resource_id} |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 425 | # Set vnf module properties |
| 426 | ${resp}= Get ASDC Catalog Resource Component Instances ${catalog_resource_id} |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 427 | :FOR ${comp} IN @{resp['componentInstances']} |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 428 | \ ${name} Set Variable ${comp['name']} |
| 429 | \ ${uniqueId} Set Variable ${comp['uniqueId']} |
| 430 | \ ${actualComponentUid} Set Variable ${comp['actualComponentUid']} |
| 431 | \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${name} abstract_ |
| 432 | \ Run Keyword If '${test}' == 'FAIL' Continue For Loop |
| 433 | \ ${response}= Get ASDC Catalog Resource Component Instance Properties ${catalog_resource_id} ${uniqueId} ${actualComponentUid} |
| 434 | \ ${dict}= Create Dictionary parent_id=${response[6]['parentUniqueId']} |
| 435 | \ Run Keyword If '${name}'=='abstract_vfw' Set To Dictionary ${dict} nfc_function=vfw nfc_naming_policy=SDNC_Policy.ONAP_VFW_NAMING_TIMESTAMP |
| 436 | \ Run Keyword If '${name}'=='abstract_vpg' Set To Dictionary ${dict} nfc_function=vpg nfc_naming_policy=SDNC_Policy.ONAP_VPG_NAMING_TIMESTAMP |
| 437 | \ Run Keyword If '${name}'=='abstract_vsn' Set To Dictionary ${dict} nfc_function=vsn nfc_naming_policy=SDNC_Policy.ONAP_VSN_NAMING_TIMESTAMP |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 438 | \ Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 439 | \ ${data}= Apply Template sdc ${ASDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE} ${dict} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 440 | \ ${response}= Set ASDC Catalog Resource Component Instance Properties ${catalog_resource_id} ${uniqueId} ${data} |
DR695H | 8e7028b | 2019-07-10 10:13:58 -0400 | [diff] [blame] | 441 | \ Log resp=${response} |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 442 | |
| 443 | # Set vnf inputs |
| 444 | ${resp}= Get ASDC Catalog Resource Inputs ${catalog_resource_id} |
| 445 | ${dict}= Create Dictionary |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 446 | :FOR ${comp} IN @{resp['inputs']} |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 447 | \ ${name} Set Variable ${comp['name']} |
| 448 | \ ${uid} Set Variable ${comp['uniqueId']} |
| 449 | \ Run Keyword If '${name}'=='nf_function' Set To Dictionary ${dict} nf_function=ONAP-FIREWALL nf_function_uid=${uid} |
| 450 | \ Run Keyword If '${name}'=='nf_type' Set To Dictionary ${dict} nf_type=FIREWALL nf_type_uid=${uid} |
| 451 | \ Run Keyword If '${name}'=='nf_naming_code' Set To Dictionary ${dict} nf_naming_code=vfw nf_naming_code_uid=${uid} |
| 452 | \ Run Keyword If '${name}'=='nf_role' Set To Dictionary ${dict} nf_role=vFW nf_role_uid=${uid} |
| 453 | \ Run Keyword If '${name}'=='cloud_env' Set To Dictionary ${dict} cloud_env=openstack cloud_env_uid=${uid} |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 454 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 455 | ${data}= Apply Template sdc ${ASDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE} ${dict} |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 456 | ${response}= Set ASDC Catalog Resource VNF Inputs ${catalog_resource_id} ${data} |
| 457 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 458 | Add ASDC License Model |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 459 | [Documentation] Creates an ASDC License Model and returns its id |
DR695H | 18872bc | 2019-06-13 16:16:52 -0400 | [diff] [blame] | 460 | ${uuid}= Generate UUID4 |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 461 | ${shortened_uuid}= Evaluate str("${uuid}")[:23] |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 462 | ${map}= Create Dictionary vendor_name=${shortened_uuid} |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 463 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 464 | ${data}= Apply Template sdc ${ASDC_LICENSE_MODEL_TEMPLATE} ${map} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 465 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 466 | ${resp}= SDC.Run Post Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 467 | Should Be Equal As Strings ${resp.status_code} 200 |
Brian Freeman | b568e5e | 2018-04-05 21:03:38 -0500 | [diff] [blame] | 468 | [Return] ${resp.json()['itemId']} ${resp.json()['version']['id']} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 469 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 470 | Get ASDC License Model |
| 471 | [Documentation] gets an asdc license model by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 472 | [Arguments] ${id} ${version_id}=0.1 |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 473 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 474 | ${resp}= SDC.Run Get Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 475 | [Return] ${resp.json()} |
Brian Freeman | 44b8bb3 | 2018-05-03 21:08:42 -0500 | [diff] [blame] | 476 | |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 477 | Get ASDC License Models |
| 478 | [Documentation] Gets all ASDC License Models |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 479 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 480 | ${resp}= SDC.Run Get Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 481 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 482 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 483 | Checkin ASDC License Model |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 484 | [Documentation] Checks in an ASDC License Model by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 485 | [Arguments] ${id} ${version_id}=0.1 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 486 | ${map}= Create Dictionary action=Checkin |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 487 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 488 | ${data}= Apply Template sdc ${ASDC_ACTION_TEMPLATE} ${map} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 489 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 490 | ${resp}= SDC.Run Put Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 491 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 492 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 493 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 494 | Submit ASDC License Model |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 495 | [Documentation] Submits an ASDC License Model by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 496 | [Arguments] ${id} ${version_id}=0.1 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 497 | ${map}= Create Dictionary action=Submit |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 498 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 499 | ${data}= Apply Template sdc ${ASDC_ACTION_TEMPLATE} ${map} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 500 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 501 | ${resp}= SDC.Run Put Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 502 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 503 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 504 | Checkin ASDC Software Product |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 505 | [Documentation] Checks in an ASDC Software Product by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 506 | [Arguments] ${id} ${version_id}=0.1 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 507 | ${map}= Create Dictionary action=Checkin |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 508 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 509 | ${data}= Apply Template sdc ${ASDC_ACTION_TEMPLATE} ${map} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 510 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 511 | ${resp}= SDC.Run Put Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 512 | Should Be Equal As Strings ${resp.status_code} 200 |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 513 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 514 | |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 515 | Validate ASDC Software Product |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 516 | [Documentation] Validates an ASDC Software Product by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 517 | [Arguments] ${id} ${version_id}=0.1 |
| 518 | ${data}= Catenate |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 519 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 520 | ${resp}= SDC.Run Put Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}/orchestration-template-candidate/process ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 521 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 522 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 523 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 524 | Submit ASDC Software Product |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 525 | [Documentation] Submits an ASDC Software Product by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 526 | [Arguments] ${id} ${version_id}=0.1 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 527 | ${map}= Create Dictionary action=Submit |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 528 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 529 | ${data}= Apply Template sdc ${ASDC_ACTION_TEMPLATE} ${map} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 530 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 531 | ${resp}= SDC.Run Put Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 532 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 533 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 534 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 535 | Package ASDC Software Product |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 536 | [Documentation] Creates a package of an ASDC Software Product by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 537 | [Arguments] ${id} ${version_id}=0.1 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 538 | ${map}= Create Dictionary action=Create_Package |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 539 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 540 | ${data}= Apply Template sdc ${ASDC_ACTION_TEMPLATE} ${map} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 541 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 542 | ${resp}= SDC.Run Put Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 543 | Should Be Equal As Strings ${resp.status_code} 200 |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 544 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 545 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 546 | Add ASDC Entitlement Pool |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 547 | [Documentation] Creates an ASDC Entitlement Pool and returns its id |
Brian Freeman | 1503378 | 2019-03-22 15:48:55 -0500 | [diff] [blame] | 548 | [Arguments] ${license_model_id} ${version_id}=0.1 ${license_start_date}="01/01/1960" ${license_end_date}="01/01/1961" |
DR695H | 18872bc | 2019-06-13 16:16:52 -0400 | [diff] [blame] | 549 | ${uuid}= Generate UUID4 |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 550 | ${shortened_uuid}= Evaluate str("${uuid}")[:23] |
Brian Freeman | 1503378 | 2019-03-22 15:48:55 -0500 | [diff] [blame] | 551 | ${map}= Create Dictionary entitlement_pool_name=${shortened_uuid} license_start_date=${license_start_date} license_end_date=${license_end_date} |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 552 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 553 | ${data}= Apply Template sdc ${ASDC_ENTITLEMENT_POOL_TEMPLATE} ${map} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 554 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 555 | ${resp}= SDC.Run Post Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_ENTITLEMENT_POOL_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 556 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 557 | [Return] ${resp.json()['value']} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 558 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 559 | Get ASDC Entitlement Pool |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 560 | [Documentation] Gets an ASDC Entitlement Pool by its id |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 561 | [Arguments] ${license_model_id} ${pool_id} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 562 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 563 | ${resp}= SDC.Run Get Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${ASDC_VENDOR_ENTITLEMENT_POOL_PATH}/${pool_id} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 564 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 565 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 566 | Add ASDC License Group |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 567 | [Documentation] Creates an ASDC License Group and returns its id |
Brian Freeman | 1503378 | 2019-03-22 15:48:55 -0500 | [diff] [blame] | 568 | [Arguments] ${license_model_id} ${version_id}=1.0 ${license_start_date}="01/01/1960" ${license_end_date}="01/01/1961" |
DR695H | 18872bc | 2019-06-13 16:16:52 -0400 | [diff] [blame] | 569 | ${uuid}= Generate UUID4 |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 570 | ${shortened_uuid}= Evaluate str("${uuid}")[:23] |
Brian Freeman | 1503378 | 2019-03-22 15:48:55 -0500 | [diff] [blame] | 571 | ${map}= Create Dictionary key_group_name=${shortened_uuid} license_start_date=${license_start_date} license_end_date=${license_end_date} |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 572 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 573 | ${data}= Apply Template sdc ${ASDC_KEY_GROUP_TEMPLATE} ${map} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 574 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 575 | ${resp}= SDC.Run Post Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_KEY_GROUP_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 576 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 577 | [Return] ${resp.json()['value']} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 578 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 579 | Get ASDC License Group |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 580 | [Documentation] Gets an ASDC License Group by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 581 | [Arguments] ${license_model_id} ${group_id} ${version_id} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 582 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 583 | ${resp}= SDC.Run Get Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_KEY_GROUP_PATH}/${group_id} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 584 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 585 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 586 | Add ASDC Feature Group |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 587 | [Documentation] Creates an ASDC Feature Group and returns its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 588 | [Arguments] ${license_model_id} ${key_group_id} ${entitlement_pool_id} ${version_id}=0.1 |
DR695H | 18872bc | 2019-06-13 16:16:52 -0400 | [diff] [blame] | 589 | ${uuid}= Generate UUID4 |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 590 | ${shortened_uuid}= Evaluate str("${uuid}")[:23] |
Jerry Flood | 80ff985 | 2017-08-11 06:47:14 -0400 | [diff] [blame] | 591 | ${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} |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 592 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 593 | ${data}= Apply Template sdc ${ASDC_FEATURE_GROUP_TEMPLATE} ${map} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 594 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 595 | ${resp}= SDC.Run Post Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_FEATURE_GROUP_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 596 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 597 | [Return] ${resp.json()['value']} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 598 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 599 | Get ASDC Feature Group |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 600 | [Documentation] Gets an ASDC Feature Group by its id |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 601 | [Arguments] ${license_model_id} ${group_id} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 602 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 603 | ${resp}= SDC.Run Get Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${ASDC_VENDOR_FEATURE_GROUP_PATH}/${group_id} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 604 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 605 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 606 | Add ASDC License Agreement |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 607 | [Documentation] Creates an ASDC License Agreement and returns its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 608 | [Arguments] ${license_model_id} ${feature_group_id} ${version_id}=0.1 |
DR695H | 18872bc | 2019-06-13 16:16:52 -0400 | [diff] [blame] | 609 | ${uuid}= Generate UUID4 |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 610 | ${shortened_uuid}= Evaluate str("${uuid}")[:23] |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 611 | ${map}= Create Dictionary license_agreement_name=${shortened_uuid} feature_group_id=${feature_group_id} |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 612 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 613 | ${data}= Apply Template sdc ${ASDC_LICENSE_AGREEMENT_TEMPLATE} ${map} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 614 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 615 | ${resp}= SDC.Run Post Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_LICENSE_AGREEMENT_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 616 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 617 | [Return] ${resp.json()['value']} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 618 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 619 | Get ASDC License Agreement |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 620 | [Documentation] Gets an ASDC License Agreement by its id |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 621 | [Arguments] ${license_model_id} ${agreement_id} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 622 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 623 | ${resp}= SDC.Run Get Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${ASDC_VENDOR_LICENSE_AGREEMENT_PATH}/${agreement_id} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 624 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 625 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 626 | Add ASDC Software Product |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 627 | [Documentation] Creates an ASDC Software Product and returns its id |
Brian Freeman | 9c42ae1 | 2018-11-27 14:33:27 -0500 | [diff] [blame] | 628 | [Arguments] ${license_agreement_id} ${feature_group_id} ${license_model_name} ${license_model_id} ${license_model_version_id} ${name_prefix} |
DR695H | 18872bc | 2019-06-13 16:16:52 -0400 | [diff] [blame] | 629 | ${uuid}= Generate UUID4 |
Brian Freeman | 9c42ae1 | 2018-11-27 14:33:27 -0500 | [diff] [blame] | 630 | ${shortened_uuid}= Evaluate str("${uuid}")[:13] |
| 631 | ${software_product_name}= Catenate ${name_prefix} ${shortened_uuid} |
| 632 | ${map}= Create Dictionary software_product_name=${software_product_name} 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} |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 633 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 634 | ${data}= Apply Template sdc ${ASDC_SOFTWARE_PRODUCT_TEMPLATE} ${map} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 635 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 636 | ${resp}= SDC.Run Post Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 637 | Should Be Equal As Strings ${resp.status_code} 200 |
Brian Freeman | b568e5e | 2018-04-05 21:03:38 -0500 | [diff] [blame] | 638 | [Return] ${resp.json()['itemId']} ${resp.json()['version']['id']} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 639 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 640 | Get ASDC Software Product |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 641 | [Documentation] Gets an ASDC Software Product by its id |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 642 | [Arguments] ${software_product_id} ${version_id}=0.1 |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 643 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 644 | ${resp}= SDC.Run Get Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${software_product_id}/versions/${version_id} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 645 | [Return] ${resp.json()} |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 646 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 647 | Add ASDC Catalog Resource |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 648 | [Documentation] Creates an ASDC Catalog Resource and returns its id |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 649 | [Arguments] ${license_agreement_id} ${software_product_name} ${license_model_name} ${software_product_id} |
| 650 | ${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} |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 651 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 652 | ${data}= Apply Template sdc ${ASDC_CATALOG_RESOURCE_TEMPLATE} ${map} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 653 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 654 | ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 655 | Should Be Equal As Strings ${resp.status_code} 201 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 656 | [Return] ${resp.json()['uniqueId']} |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 657 | |
| 658 | Add ASDC Allotted Resource Catalog Resource |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 659 | [Documentation] Creates an ASDC Allotted Resource Catalog Resource and returns its id |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 660 | [Arguments] ${license_agreement_id} ${software_product_name} ${license_model_name} ${software_product_id} ${subcategory} |
| 661 | ${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} subcategory=${subcategory} |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 662 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 663 | ${data}= Apply Template sdc ${ASDC_ALLOTTED_RESOURCE_CATALOG_RESOURCE_TEMPLATE} ${map} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 664 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 665 | ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 666 | Should Be Equal As Strings ${resp.status_code} 201 |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 667 | [Return] ${resp.json()['uniqueId']} |
| 668 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 669 | Mark ASDC Catalog Resource Inactive |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 670 | [Documentation] Marks ASDC Catalog Resource as inactive |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 671 | [Arguments] ${catalog_resource_id} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 672 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 673 | ${resp}= SDC.Run Delete Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id} ${None} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 674 | Should Be Equal As Strings ${resp.status_code} 204 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 675 | [Return] ${resp} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 676 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 677 | Delete Inactive ASDC Catalog Resources |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 678 | [Documentation] Delete all ASDC Catalog Resources that are inactive |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 679 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 680 | ${resp}= SDC.Run Delete Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_INACTIVE_RESOURCES_PATH} ${None} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 681 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 682 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 683 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 684 | Get ASDC Catalog Resource |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 685 | [Documentation] Gets an ASDC Catalog Resource by its id |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 686 | [Arguments] ${catalog_resource_id} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 687 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 688 | ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 689 | [Return] ${resp.json()} |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 690 | |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 691 | Get ASDC Catalog Resource Component Instances |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 692 | [Documentation] Gets component instances of an ASDC Catalog Resource by its id |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 693 | [Arguments] ${catalog_resource_id} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 694 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 695 | ${resp}= SDC.Run Get Request ${ASDC_FE_ENDPOINT} ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstances ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 696 | [Return] ${resp.json()} |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 697 | |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 698 | Get ASDC Catalog Resource Deployment Artifact Properties |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 699 | [Documentation] Gets deployment artifact properties of an ASDC Catalog Resource by its id |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 700 | [Arguments] ${catalog_resource_id} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 701 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 702 | ${resp}= SDC.Run Get Request ${ASDC_FE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_resource_id}/filteredDataByParams?include=deploymentArtifacts ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 703 | [Return] ${resp.json()} |
| 704 | |
| 705 | |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 706 | Get ASDC Catalog Resource Component Instances Properties |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 707 | [Documentation] Gets ASDC Catalog Resource component instances properties by its id |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 708 | [Arguments] ${catalog_resource_id} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 709 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 710 | ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstancesProperties ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 711 | [Return] ${resp.json()} |
| 712 | |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 713 | Get ASDC Catalog Resource Component Instances Properties For Resource |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 714 | [Documentation] Gets ASDC Catalog Resource component instances properties for a Resource (VF) by its id |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 715 | [Arguments] ${catalog_resource_id} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 716 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 717 | ${resp}= SDC.Run Get Request ${ASDC_FE_ENDPOINT} ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstancesProperties ${ASDC_DESIGNER_USER_ID} auth=${auth} |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 718 | [Return] ${resp.json()} |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 719 | |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 720 | Get ASDC Catalog Resource Inputs |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 721 | [Documentation] Gets ASDC Catalog Resource inputs by its id |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 722 | [Arguments] ${catalog_resource_id} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 723 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 724 | ${resp}= SDC.Run Get Request ${ASDC_FE_ENDPOINT} ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=inputs ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 725 | [Return] ${resp.json()} |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 726 | |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 727 | Get ASDC Catalog Resource Component Instance Properties |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 728 | [Documentation] Gets component instance properties of an ASDC Catalog Resource by their ids |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 729 | [Arguments] ${catalog_resource_id} ${component_instance_id} ${component_id} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 730 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 731 | ${resp}= SDC.Run Get Request ${ASDC_FE_ENDPOINT} ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/componentInstances/${component_instance_id}/${component_id}/inputs ${ASDC_DESIGNER_USER_ID}auth=${auth} |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 732 | [Return] ${resp.json()} |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 733 | |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 734 | Set ASDC Catalog Resource Component Instance Properties |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 735 | [Documentation] Sets ASDC Catalog Resource component instance properties by ids |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 736 | [Arguments] ${catalog_resource_id} ${component_parent_service_id} ${data} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 737 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 738 | ${resp}= SDC.Run Post Request ${ASDC_FE_ENDPOINT} ${ASDC_FE_CATALOG_SERVICES_PATH}/${component_parent_service_id}/resourceInstance/${catalog_resource_id}/properties ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 739 | [Return] ${resp.json()} |
| 740 | |
| 741 | Set ASDC Catalog Resource Component Instance Properties For Resource |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 742 | [Documentation] Sets ASDC Resource component instance properties by ids |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 743 | [Arguments] ${catalog_parent_resource_id} ${catalog_resource_id} ${data} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 744 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 745 | ${resp}= SDC.Run Post Request ${ASDC_FE_ENDPOINT} ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_parent_resource_id}/resourceInstance/${catalog_resource_id}/properties ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 746 | [Return] ${resp.json()} |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 747 | |
Yang Xu | 74cfb86 | 2018-12-06 21:57:32 -0500 | [diff] [blame] | 748 | Set CDS Catalog Resource Component Instance Properties |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 749 | [Documentation] Sets CDS Catalog Resource component instance properties by ids |
Yang Xu | 74cfb86 | 2018-12-06 21:57:32 -0500 | [diff] [blame] | 750 | [Arguments] ${catalog_resource_id} ${component_instance_id} ${data} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 751 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 752 | ${resp}= SDC.Run Post Request ${ASDC_FE_ENDPOINT} ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/resourceInstance/${component_instance_id}/inputs ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Yang Xu | 74cfb86 | 2018-12-06 21:57:32 -0500 | [diff] [blame] | 753 | [Return] ${resp.json()} |
| 754 | |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 755 | Set ASDC Catalog Resource VNF Inputs |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 756 | [Documentation] Sets VNF Inputs for an ASDC Catalog Resource by its id |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 757 | [Arguments] ${catalog_resource_id} ${data} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 758 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 759 | ${resp}= SDC.Run Post Request ${ASDC_FE_ENDPOINT} ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/update/inputs ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Yang Xu | 2ec8038 | 2018-11-01 12:30:37 -0400 | [diff] [blame] | 760 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 761 | |
Brian Freeman | 79b00ce | 2018-11-01 14:57:53 -0500 | [diff] [blame] | 762 | Get SDC Demo Vnf Catalog Resource |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 763 | [Documentation] Gets Resource ids of demonstration VNFs for instantiation |
Brian Freeman | 79b00ce | 2018-11-01 14:57:53 -0500 | [diff] [blame] | 764 | [Arguments] ${service_name} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 765 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 766 | ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/serviceName/${service_name}/serviceVersion/1.0 ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 79b00ce | 2018-11-01 14:57:53 -0500 | [diff] [blame] | 767 | @{ITEMS}= Copy List ${resp.json()['componentInstances']} |
| 768 | ${demo_catalog_resource}= Create Dictionary |
| 769 | :FOR ${ELEMENT} IN @{ITEMS} |
| 770 | \ Log ${ELEMENT['name']} |
| 771 | \ Log ${ELEMENT['groupInstances'][0]['groupName']} |
| 772 | \ ${vnf}= Get VNF From Group Name ${ELEMENT['groupInstances'][0]['groupName']} ${service_name} |
| 773 | \ ${vnf_data}= Create Dictionary vnf_type=${ELEMENT['name']} vf_module=${ELEMENT['groupInstances'][0]['groupName']} |
| 774 | \ LOG ${vnf_data} |
| 775 | \ Set To Dictionary ${demo_catalog_resource} ${vnf}=${vnf_data} |
| 776 | \ LOG ${demo_catalog_resource} |
| 777 | [Return] ${demo_catalog_resource} |
| 778 | |
| 779 | Get VNF From Group Name |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 780 | [Documentation] Looks up VNF key from service mapping for a regex on group_name and service_name |
Brian Freeman | 79b00ce | 2018-11-01 14:57:53 -0500 | [diff] [blame] | 781 | [Arguments] ${group_name} ${service_name} |
| 782 | ${vnf}= Set Variable If |
Brian Freeman | 4c71b0b | 2019-04-26 08:08:56 -0500 | [diff] [blame] | 783 | ... ('${service_name}'=='demoVFWCL') and ('base_vfw' in '${group_name}') vFWCLvFWSNK |
| 784 | ... ('${service_name}'=='demoVFWCL') and ('base_vpkg' in '${group_name}') vFWCLvPKG |
Brian Freeman | 79b00ce | 2018-11-01 14:57:53 -0500 | [diff] [blame] | 785 | ... ('${service_name}'=='demoVLB') and ('base_vlb' in '${group_name}') vLB |
| 786 | [Return] ${vnf} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 787 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 788 | Checkin ASDC Catalog Resource |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 789 | [Documentation] Checks in an ASDC Catalog Resource by its id |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 790 | [Arguments] ${catalog_resource_id} |
| 791 | ${map}= Create Dictionary user_remarks=Robot remarks |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 792 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 793 | ${data}= Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 794 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 795 | ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_DESIGNER_USER_ID} ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 796 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 797 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 798 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 799 | Request Certify ASDC Catalog Resource |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 800 | [Documentation] Requests certification of an ASDC Catalog Resource by its id |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 801 | [Arguments] ${catalog_resource_id} |
| 802 | ${map}= Create Dictionary user_remarks=Robot remarks |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 803 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 804 | ${data}= Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 805 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 806 | ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 807 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 808 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 809 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 810 | Start Certify ASDC Catalog Resource |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 811 | [Documentation] Start certification of an ASDC Catalog Resource by its id |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 812 | [Arguments] ${catalog_resource_id} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 813 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 814 | ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/startCertification ${None} ${ASDC_TESTER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 815 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 816 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 817 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 818 | Certify ASDC Catalog Resource |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 819 | [Documentation] Certifies an ASDC Catalog Resource by its id and returns the new id |
Brian Freeman | db1e741 | 2018-08-01 12:46:01 -0500 | [diff] [blame] | 820 | [Arguments] ${catalog_resource_id} ${user_id}=${ASDC_TESTER_USER_ID} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 821 | ${map}= Create Dictionary user_remarks=Robot remarks |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 822 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 823 | ${data}= Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 824 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 825 | ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${user_id} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 826 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 827 | [Return] ${resp.json()['uniqueId']} |
Jerry Flood | 6bd1afa | 2017-10-09 09:59:23 -0400 | [diff] [blame] | 828 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 829 | Upload ASDC Heat Package |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 830 | [Documentation] Creates an ASDC Software Product and returns its id |
Brian Freeman | f508ab2 | 2018-03-15 21:19:41 -0500 | [diff] [blame] | 831 | [Arguments] ${software_product_id} ${file_path} ${version_id}=0.1 |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 832 | ${files}= Create Dictionary |
| 833 | Create Multi Part ${files} upload ${file_path} contentType=application/zip |
| 834 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 835 | ${resp}= SDC.Run Post Files Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${software_product_id}/versions/${version_id}${ASDC_VENDOR_SOFTWARE_UPLOAD_PATH} ${files} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
| 836 | Should Be Equal As Strings ${resp.status_code} 200 |
Jerry Flood | 6bd1afa | 2017-10-09 09:59:23 -0400 | [diff] [blame] | 837 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 838 | Add ASDC Catalog Service |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 839 | [Documentation] Creates an ASDC Catalog Service and returns its id |
jf9860 | 75010a4 | 2017-02-22 16:52:54 -0500 | [diff] [blame] | 840 | [Arguments] ${catalog_service_name} |
DR695H | 18872bc | 2019-06-13 16:16:52 -0400 | [diff] [blame] | 841 | ${uuid}= Generate UUID4 |
jf9860 | 75010a4 | 2017-02-22 16:52:54 -0500 | [diff] [blame] | 842 | ${shortened_uuid}= Evaluate str("${uuid}")[:23] |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 843 | ${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] | 844 | ${map}= Create Dictionary service_name=${catalog_service_name} |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 845 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 846 | ${data}= Apply Template sdc ${ASDC_CATALOG_SERVICE_TEMPLATE} ${map} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 847 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 848 | ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 849 | Should Be Equal As Strings ${resp.status_code} 201 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 850 | [Return] ${resp.json()['uniqueId']} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 851 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 852 | Mark ASDC Catalog Service Inactive |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 853 | [Documentation] Deletes an ASDC Catalog Service |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 854 | [Arguments] ${catalog_service_id} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 855 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 856 | ${resp}= SDC.Run Delete Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id} ${None} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 857 | Should Be Equal As Strings ${resp.status_code} 204 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 858 | [Return] ${resp} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 859 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 860 | Delete Inactive ASDC Catalog Services |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 861 | [Documentation] Delete all ASDC Catalog Services that are inactive |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 862 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 863 | ${resp}= SDC.Run Delete Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_INACTIVE_SERVICES_PATH} ${None} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 864 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 865 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 866 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 867 | Get ASDC Catalog Service |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 868 | [Documentation] Gets an ASDC Catalog Service by its id |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 869 | [Arguments] ${catalog_service_id} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 870 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 871 | ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 872 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 873 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 874 | Checkin ASDC Catalog Service |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 875 | [Documentation] Checks in an ASDC Catalog Service by its id |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 876 | [Arguments] ${catalog_service_id} |
| 877 | ${map}= Create Dictionary user_remarks=Robot remarks |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 878 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 879 | ${data}= Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 880 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 881 | ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 882 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 883 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 884 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 885 | Request Certify ASDC Catalog Service |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 886 | [Documentation] Requests certification of an ASDC Catalog Service by its id |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 887 | [Arguments] ${catalog_service_id} |
| 888 | ${map}= Create Dictionary user_remarks=Robot remarks |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 889 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 890 | ${data}= Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 891 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 892 | ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 893 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 894 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 895 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 896 | Start Certify ASDC Catalog Service |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 897 | [Documentation] Start certification of an ASDC Catalog Service by its id |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 898 | [Arguments] ${catalog_service_id} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 899 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 900 | ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/startCertification ${None} ${ASDC_TESTER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 901 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 902 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 903 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 904 | Certify ASDC Catalog Service |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 905 | [Documentation] Certifies an ASDC Catalog Service by its id and returns the new id |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 906 | [Arguments] ${catalog_service_id} |
| 907 | ${map}= Create Dictionary user_remarks=Robot remarks |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 908 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 909 | ${data}= Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 910 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 911 | ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${ASDC_TESTER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 912 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 913 | [Return] ${resp.json()['uniqueId']} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 914 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 915 | Approve ASDC Catalog Service |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 916 | [Documentation] Approves an ASDC Catalog Service by its id |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 917 | [Arguments] ${catalog_service_id} |
| 918 | ${map}= Create Dictionary user_remarks=Robot remarks |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 919 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 920 | ${data}= Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 921 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 922 | ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH}${ASDC_DISTRIBUTION_STATE_APPROVE_PATH} ${data} ${ASDC_GOVERNOR_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 923 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 924 | [Return] ${resp.json()} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 925 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 926 | Distribute ASDC Catalog Service |
| 927 | [Documentation] distribute an asdc Catalog Service by its id |
| 928 | [Arguments] ${catalog_service_id} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 929 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 930 | ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_DISTRIBUTION_ACTIVATE_PATH} ${None} ${ASDC_OPS_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 931 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 932 | [Return] ${resp.json()} |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 933 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 934 | Add ASDC Resource Instance |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 935 | [Documentation] Creates an ASDC Resource Instance and returns its id |
Yang Xu | fac7a63 | 2019-05-17 01:01:26 -0400 | [diff] [blame] | 936 | [Arguments] ${catalog_service_id} ${catalog_resource_id} ${catalog_resource_name} ${xoffset}=${0} ${yoffset}=${0} ${resourceType}=VF |
DR695H | 18872bc | 2019-06-13 16:16:52 -0400 | [diff] [blame] | 937 | ${milli_timestamp}= Generate Timestamp |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 938 | ${xoffset}= Set Variable ${xoffset+306} |
| 939 | ${yoffset}= Set Variable ${yoffset+248} |
Yang Xu | fac7a63 | 2019-05-17 01:01:26 -0400 | [diff] [blame] | 940 | ${map}= Create Dictionary catalog_resource_id=${catalog_resource_id} catalog_resource_name=${catalog_resource_name} milli_timestamp=${milli_timestamp} posX=${xoffset} posY=${yoffset} originType=${resourceType} |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 941 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 942 | ${data}= Apply Template sdc ${ASDC_RESOURCE_INSTANCE_TEMPLATE} ${map} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 943 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 944 | ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 945 | Should Be Equal As Strings ${resp.status_code} 201 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 946 | [Return] ${resp.json()['uniqueId']} |
Brian Freeman | eef7c6f | 2018-11-16 18:42:21 -0500 | [diff] [blame] | 947 | |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 948 | Add ASDC Resource Instance To Resource |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 949 | [Documentation] Creates an ASDC Resource Instance in a Resource (VF) and returns its id |
Yang Xu | fac7a63 | 2019-05-17 01:01:26 -0400 | [diff] [blame] | 950 | [Arguments] ${parent_catalog_resource_id} ${catalog_resource_id} ${catalog_resource_name} ${xoffset}=${0} ${yoffset}=${0} ${resourceType}=VF |
DR695H | 18872bc | 2019-06-13 16:16:52 -0400 | [diff] [blame] | 951 | ${milli_timestamp}= Generate Timestamp |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 952 | ${xoffset}= Set Variable ${xoffset+306} |
| 953 | ${yoffset}= Set Variable ${yoffset+248} |
Yang Xu | fac7a63 | 2019-05-17 01:01:26 -0400 | [diff] [blame] | 954 | ${map}= Create Dictionary catalog_resource_id=${catalog_resource_id} catalog_resource_name=${catalog_resource_name} milli_timestamp=${milli_timestamp} posX=${xoffset} posY=${yoffset} originType=${resourceType} |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 955 | Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} |
| 956 | ${data}= Apply Template sdc ${ASDC_RESOURCE_INSTANCE_TEMPLATE} ${map} |
DR695H | 39a6be8 | 2019-07-10 19:08:20 -0400 | [diff] [blame] | 957 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 958 | ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH}/${parent_catalog_resource_id}${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 959 | Should Be Equal As Strings ${resp.status_code} 201 |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 960 | [Return] ${resp.json()['uniqueId']} |
| 961 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 962 | Get Catalog Service Distribution |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 963 | [Documentation] Gets an ASDC Catalog Service distribution |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 964 | [Arguments] ${catalog_service_uuid} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 965 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 966 | ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_uuid}${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH} ${ASDC_OPS_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 967 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 968 | [Return] ${resp.json()} |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 969 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 970 | Check Catalog Service Distributed |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 971 | [Documentation] Checks if an ASDC Catalog Service is distributed |
Brian Freeman | adaa237 | 2018-10-24 12:25:22 -0500 | [diff] [blame] | 972 | [Arguments] ${catalog_service_uuid} ${dist_status} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 973 | ${dist_resp}= Get Catalog Service Distribution ${catalog_service_uuid} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 974 | Should Be Equal As Strings ${dist_resp['distributionStatusOfServiceList'][0]['deployementStatus']} Distributed |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 975 | ${det_resp}= Get Catalog Service Distribution Details ${dist_resp['distributionStatusOfServiceList'][0]['distributionID']} |
| 976 | @{ITEMS}= Copy List ${det_resp['distributionStatusList']} |
Brian Freeman | f508ab2 | 2018-03-15 21:19:41 -0500 | [diff] [blame] | 977 | Should Not Be Empty ${ITEMS} |
Brian Freeman | a62644f | 2018-05-13 12:47:38 -0500 | [diff] [blame] | 978 | ${SO_COMPLETE} Set Variable FALSE |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 979 | ${dist_status} Set Variable CONTINUE |
| 980 | Should Not Be Empty ${ITEMS} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 981 | :FOR ${ELEMENT} IN @{ITEMS} |
Brian Freeman | f508ab2 | 2018-03-15 21:19:41 -0500 | [diff] [blame] | 982 | \ Log ${ELEMENT['omfComponentID']} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 983 | \ Log ${ELEMENT['status']} |
Brian Freeman | 41ab5e5 | 2018-08-08 14:24:23 -0500 | [diff] [blame] | 984 | \ ${SO_COMPLETE} Set Variable If (('${ELEMENT['status']}' == 'DISTRIBUTION_COMPLETE_OK')) or ('${SO_COMPLETE}'=='TRUE') TRUE |
Brian Freeman | eca7107 | 2018-08-16 14:50:16 -0500 | [diff] [blame] | 985 | \ Exit For Loop If ('${SO_COMPLETE}'=='TRUE') |
| 986 | \ Exit For Loop If ('${ELEMENT['status']}' == 'DISTRIBUTION_COMPLETE_ERROR') |
Brian Freeman | adaa237 | 2018-10-24 12:25:22 -0500 | [diff] [blame] | 987 | \ ${dist_status}= Set Variable If (('${ELEMENT['status']}' == 'COMPONENT_DONE_ERROR') and ('${ELEMENT['omfComponentID']}' == 'aai-ml')) EXIT |
| 988 | \ Exit For Loop If (('${ELEMENT['status']}' == 'COMPONENT_DONE_ERROR') and ('${ELEMENT['omfComponentID']}' == 'aai-ml')) |
Brian Freeman | a62644f | 2018-05-13 12:47:38 -0500 | [diff] [blame] | 989 | Should Be True ( '${SO_COMPLETE}'=='TRUE') SO Test |
bdfreeman1421 | b2a4951 | 2018-11-25 07:32:19 -0500 | [diff] [blame] | 990 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 991 | Get Catalog Service Distribution Details |
kaihlavi | 06fa4ee | 2019-05-22 19:08:14 +0300 | [diff] [blame] | 992 | [Documentation] Gets ASDC Catalog Service distribution details |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 993 | [Arguments] ${catalog_service_distribution_id} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 994 | ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD} |
| 995 | ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH}/${catalog_service_distribution_id} ${ASDC_OPS_USER_ID} auth=${auth} |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 996 | Should Be Equal As Strings ${resp.status_code} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 997 | [Return] ${resp.json()} |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 998 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 999 | Run ASDC Health Check |
| 1000 | [Documentation] Runs a ASDC health check |
DR695H | bfed659 | 2019-07-11 12:02:08 -0400 | [diff] [blame^] | 1001 | ${resp}= SDC.Run Get Request ${ASDC_FE_ENDPOINT} ${ASDC_HEALTH_CHECK_PATH} user=${None} |
Brian Freeman | adaa237 | 2018-10-24 12:25:22 -0500 | [diff] [blame] | 1002 | # only test for HTTP 200 to determine SDC Health. SDC_DE_HEALTH is informational |
Brian Freeman | 2e1d0ff | 2019-01-23 09:38:13 -0500 | [diff] [blame] | 1003 | Should Be Equal As Strings ${resp.status_code} 200 SDC DOWN |
Brian Freeman | 5cf5fa6 | 2018-04-23 20:28:16 -0500 | [diff] [blame] | 1004 | ${SDC_DE_HEALTH}= Catenate DOWN |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 1005 | @{ITEMS}= Copy List ${resp.json()['componentsInfo']} |
| 1006 | :FOR ${ELEMENT} IN @{ITEMS} |
| 1007 | \ Log ${ELEMENT['healthCheckStatus']} |
Brian Freeman | e546f7e | 2018-04-19 12:17:56 -0500 | [diff] [blame] | 1008 | \ ${SDC_DE_HEALTH} Set Variable If (('DE' in '${ELEMENT['healthCheckComponent']}') and ('${ELEMENT['healthCheckStatus']}' == 'UP')) or ('${SDC_DE_HEALTH}'=='UP') UP |
DR695H | 8e7028b | 2019-07-10 10:13:58 -0400 | [diff] [blame] | 1009 | Log (DMaaP:${SDC_DE_HEALTH}) |
Jerry Flood | 6bd1afa | 2017-10-09 09:59:23 -0400 | [diff] [blame] | 1010 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 1011 | Open ASDC GUI |
| 1012 | [Documentation] Logs in to ASDC GUI |
| 1013 | [Arguments] ${PATH} |
| 1014 | ## Setup Browever now being managed by the test case |
| 1015 | ##Setup Browser |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 1016 | Go To ${ASDC_FE_ENDPOINT}${PATH} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 1017 | Maximize Browser Window |
Jerry Flood | 6bd1afa | 2017-10-09 09:59:23 -0400 | [diff] [blame] | 1018 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 1019 | Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 1020 | Log Logging in to ${ASDC_FE_ENDPOINT}${PATH} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 1021 | Title Should Be ASDC |
Jerry Flood | e2a48d7 | 2017-06-21 15:06:29 -0400 | [diff] [blame] | 1022 | 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] | 1023 | Log Logged in to ${ASDC_FE_ENDPOINT}${PATH} |
Jerry Flood | 6bd1afa | 2017-10-09 09:59:23 -0400 | [diff] [blame] | 1024 | |
| 1025 | |
| 1026 | Create Multi Part |
| 1027 | [Arguments] ${addTo} ${partName} ${filePath} ${contentType}=${None} |
| 1028 | ${fileData}= Get Binary File ${filePath} |
| 1029 | ${fileDir} ${fileName}= Split Path ${filePath} |
| 1030 | ${partData}= Create List ${fileName} ${fileData} ${contentType} |
| 1031 | Set To Dictionary ${addTo} ${partName}=${partData} |
Brian Freeman | f940ee9 | 2018-05-25 21:09:05 -0500 | [diff] [blame] | 1032 | |