Update ASDC for Beijing 97/41297/2
authorBrian Freeman <bf1936@att.com>
Fri, 6 Apr 2018 02:03:38 +0000 (21:03 -0500)
committerBrian Freeman <bf1936@att.com>
Fri, 6 Apr 2018 13:28:04 +0000 (08:28 -0500)
Issue-ID: TEST-85
Change-Id: I8ba5381d1860e6a1d21d6855f96501d410b36bbf
Signed-off-by: Brian Freeman <bf1936@att.com>
robot/assets/templates/asdc/software_product.template
robot/resources/asdc_interface.robot
robot/testsuites/health-check.robot

index 6e830ee..61b26f9 100644 (file)
@@ -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
+}
+
index d669be5..92a41c9 100644 (file)
@@ -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
index 4d972fc..6a910aa 100644 (file)
@@ -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