diff options
author | Daniel Rose <dr695h@att.com> | 2019-03-22 21:01:00 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-03-22 21:01:00 +0000 |
commit | 4840578eb1e3ba414064487e3247d312cfd30727 (patch) | |
tree | 37af6e49d9da0800ee33ced18ee375814b362690 /robot/resources | |
parent | 99ada190cf48fcfd234f43c29f144941c1bdd37c (diff) | |
parent | 150337803cfe405cd6e7ae6765e8c942b3a24c7b (diff) |
Merge "Sync to Dublin SDC"
Diffstat (limited to 'robot/resources')
-rw-r--r-- | robot/resources/asdc_interface.robot | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot index 310c7fbd..8830fe16 100644 --- a/robot/resources/asdc_interface.robot +++ b/robot/resources/asdc_interface.robot @@ -11,6 +11,7 @@ Library String Library StringTemplater Library ArchiveLibrary Library HEATUtils +Library DateTime Resource global_properties.robot Resource browser_setup.robot Resource json_templater.robot @@ -291,8 +292,14 @@ 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} ${cds}= ${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} + + + ${license_temp_date}= Get Current Date + ${license_start_date}= Get Current Date result_format=%m/%d/%Y + ${license_end_date}= Add Time To Date ${license_temp_date} 365 days result_format=%m/%d/%Y + ${key_group_id}= Add ASDC License Group ${license_model_id} ${license_model_version_id} ${license_start_date} ${license_end_date} + ${pool_id}= Add ASDC Entitlement Pool ${license_model_id} ${license_model_version_id} ${license_start_date} ${license_end_date} + ${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} @@ -513,10 +520,10 @@ Package ASDC Software Product [Return] ${resp.json()} Add ASDC Entitlement Pool [Documentation] Creates an asdc Entitlement Pool and returns its id - [Arguments] ${license_model_id} ${version_id}=0.1 + [Arguments] ${license_model_id} ${version_id}=0.1 ${license_start_date}="01/01/1960" ${license_end_date}="01/01/1961" ${uuid}= Generate UUID ${shortened_uuid}= Evaluate str("${uuid}")[:23] - ${map}= Create Dictionary entitlement_pool_name=${shortened_uuid} + ${map}= Create Dictionary entitlement_pool_name=${shortened_uuid} license_start_date=${license_start_date} license_end_date=${license_end_date} ${data}= Fill JSON Template File ${ASDC_ENTITLEMENT_POOL_TEMPLATE} ${map} ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_ENTITLEMENT_POOL_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} Should Be Equal As Strings ${resp.status_code} 200 @@ -528,10 +535,10 @@ 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}=1.0 + [Arguments] ${license_model_id} ${version_id}=1.0 ${license_start_date}="01/01/1960" ${license_end_date}="01/01/1961" ${uuid}= Generate UUID ${shortened_uuid}= Evaluate str("${uuid}")[:23] - ${map}= Create Dictionary key_group_name=${shortened_uuid} + ${map}= Create Dictionary key_group_name=${shortened_uuid} license_start_date=${license_start_date} license_end_date=${license_end_date} ${data}= Fill JSON Template File ${ASDC_KEY_GROUP_TEMPLATE} ${map} ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_KEY_GROUP_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT} Should Be Equal As Strings ${resp.status_code} 200 |