aboutsummaryrefslogtreecommitdiffstats
path: root/robot
diff options
context:
space:
mode:
Diffstat (limited to 'robot')
-rw-r--r--robot/assets/templates/asdc/software_product.template8
-rw-r--r--robot/resources/asdc_interface.robot41
-rw-r--r--robot/testsuites/health-check.robot3
3 files changed, 24 insertions, 28 deletions
diff --git a/robot/assets/templates/asdc/software_product.template b/robot/assets/templates/asdc/software_product.template
index 6e830ee2..61b26f90 100644
--- a/robot/assets/templates/asdc/software_product.template
+++ b/robot/assets/templates/asdc/software_product.template
@@ -4,10 +4,7 @@
"category": "resourceNewCategory.generic",
"subCategory": "resourceNewCategory.generic.abstract",
"onboardingMethod" : "NetworkPackage",
- "licensingVersion": {
- "id" : "1.0",
- "label" : "1.0"
- },
+ "licensingVersion": "${version_id}",
"vendorName": "${vendor_name}",
"vendorId": "${vendor_id}",
"icon": "icon",
@@ -17,4 +14,5 @@
"${feature_group_id}"
]
}
-} \ No newline at end of file
+}
+
diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot
index d669be53..92a41c91 100644
--- a/robot/resources/asdc_interface.robot
+++ b/robot/resources/asdc_interface.robot
@@ -70,28 +70,25 @@ Distribute Model From ASDC
Distribute ASDC Catalog Service ${catalog_service_id}
${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id}
${vf_module}= Find Element In Array ${loop_catalog_resource_resp['groups']} type org.openecomp.groups.VfModule
- #Check Catalog Service Distributed ${catalog_service_resp['uuid']}
Wait Until Keyword Succeeds 180 15 Check Catalog Service Distributed ${catalog_service_resp['uuid']}
[Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources}
Setup ASDC Catalog Resource
[Documentation] Creates all the steps a vf needs for an asdc catalog resource and returns the id
[Arguments] ${model_zip_path}
- ${license_model_id}= Add ASDC License Model
- ${key_group_id}= Add ASDC License Group ${license_model_id}
- ${pool_id}= Add ASDC Entitlement Pool ${license_model_id}
- ${feature_group_id}= Add ASDC Feature Group ${license_model_id} ${key_group_id} ${pool_id}
- ${license_agreement_id}= Add ASDC License Agreement ${license_model_id} ${feature_group_id}
- Checkin ASDC License Model ${license_model_id}
- Submit ASDC License Model ${license_model_id}
- ${license_model_resp}= Get ASDC License Model ${license_model_id} 1.0
- ${software_product_id}= Add ASDC Software Product ${license_agreement_id} ${feature_group_id} ${license_model_resp['vendorName']} ${license_model_id}
- Upload ASDC Heat Package ${software_product_id} ${model_zip_path}
- Validate ASDC Software Product ${software_product_id}
- Checkin ASDC Software Product ${software_product_id}
- Submit ASDC Software Product ${software_product_id}
- Package ASDC Software Product ${software_product_id}
- ${software_product_resp}= Get ASDC Software Product ${software_product_id} 1.0
- ${catalog_resource_id}= Add ASDC Catalog Resource ${license_agreement_id} ${software_product_resp['name']} ${license_model_resp['vendorName']} ${software_product_id}
+ ${license_model_id} ${license_model_version_id}= Add ASDC License Model
+ ${key_group_id}= Add ASDC License Group ${license_model_id} ${license_model_version_id}
+ ${pool_id}= Add ASDC Entitlement Pool ${license_model_id} ${license_model_version_id}
+ ${feature_group_id}= Add ASDC Feature Group ${license_model_id} ${key_group_id} ${pool_id} ${license_model_version_id}
+ ${license_agreement_id}= Add ASDC License Agreement ${license_model_id} ${feature_group_id} ${license_model_version_id}
+ Submit ASDC License Model ${license_model_id} ${license_model_version_id}
+ ${license_model_resp}= Get ASDC License Model ${license_model_id} ${license_model_version_id}
+ ${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}
+ Upload ASDC Heat Package ${software_product_id} ${model_zip_path} ${software_product_version_id}
+ Validate ASDC Software Product ${software_product_id} ${software_product_version_id}
+ Submit ASDC Software Product ${software_product_id} ${software_product_version_id}
+ Package ASDC Software Product ${software_product_id} ${software_product_version_id}
+ ${software_product_resp}= Get ASDC Software Product ${software_product_id} ${software_product_version_id}
+ ${catalog_resource_id}= Add ASDC Catalog Resource ${license_agreement_id} ${software_product_resp['name']} ${license_model_resp['vendorName']} ${software_product_id}
Checkin ASDC Catalog Resource ${catalog_resource_id}
Request Certify ASDC Catalog Resource ${catalog_resource_id}
Start Certify ASDC Catalog Resource ${catalog_resource_id}
@@ -106,7 +103,7 @@ Add ASDC License Model
${data}= Fill JSON Template File ${ASDC_LICENSE_MODEL_TEMPLATE} ${map}
${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH} ${data}
Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()['value']}
+ [Return] ${resp.json()['itemId']} ${resp.json()['version']['id']}
Get ASDC License Model
[Documentation] gets an asdc license model by its id
[Arguments] ${id} ${version_id}=0.1
@@ -180,7 +177,7 @@ Get ASDC Entitlement Pool
[Return] ${resp.json()}
Add ASDC License Group
[Documentation] Creates an asdc license group and returns its id
- [Arguments] ${license_model_id} ${version_id}=0.1
+ [Arguments] ${license_model_id} ${version_id}=1.0
${uuid}= Generate UUID
${shortened_uuid}= Evaluate str("${uuid}")[:23]
${map}= Create Dictionary key_group_name=${shortened_uuid}
@@ -225,14 +222,14 @@ Get ASDC License Agreement
[Return] ${resp.json()}
Add ASDC Software Product
[Documentation] Creates an asdc Software Product and returns its id
- [Arguments] ${license_agreement_id} ${feature_group_id} ${license_model_name} ${license_model_id}
+ [Arguments] ${license_agreement_id} ${feature_group_id} ${license_model_name} ${license_model_id} ${license_model_version_id}
${uuid}= Generate UUID
${shortened_uuid}= Evaluate str("${uuid}")[:23]
- ${map}= Create Dictionary software_product_name=${shortened_uuid} feature_group_id=${feature_group_id} license_agreement_id=${license_agreement_id} vendor_name=${license_model_name} vendor_id=${license_model_id}
+ ${map}= Create Dictionary software_product_name=${shortened_uuid} feature_group_id=${feature_group_id} license_agreement_id=${license_agreement_id} vendor_name=${license_model_name} vendor_id=${license_model_id} version_id=${license_model_version_id}
${data}= Fill JSON Template File ${ASDC_SOFTWARE_PRODUCT_TEMPLATE} ${map}
${resp}= Run ASDC Post Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH} ${data}
Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()['vspId']}
+ [Return] ${resp.json()['itemId']} ${resp.json()['version']['id']}
Get ASDC Software Product
[Documentation] gets an asdc Software Product by its id
[Arguments] ${software_product_id} ${version_id}=0.1
diff --git a/robot/testsuites/health-check.robot b/robot/testsuites/health-check.robot
index 4d972fce..6a910aa1 100644
--- a/robot/testsuites/health-check.robot
+++ b/robot/testsuites/health-check.robot
@@ -143,4 +143,5 @@ ztevmanagerdriver API Health Check
Health Distribution Test
[Tags] healthdist
- Model Distribution For Directory vFW \ No newline at end of file
+ [Timeout] 240
+ Model Distribution For Directory vFW