Use vnf type as part of vsp name 20/73720/1
authorBrian Freeman <bf1936@att.com>
Tue, 27 Nov 2018 19:33:27 +0000 (14:33 -0500)
committerBrian Freeman <bf1936@att.com>
Tue, 27 Nov 2018 19:33:40 +0000 (14:33 -0500)
Issue-ID: INT-601
Change-Id: I7dfb65b4691c46224275324d833a56a10887a79b
Signed-off-by: Brian Freeman <bf1936@att.com>
robot/resources/asdc_interface.robot
vcpe_allotted_resource_data.json.example
vcperestcust.notes.text

index bd882f4..118b655 100644 (file)
@@ -111,8 +111,10 @@ Distribute vCPEResCust Model From ASDC
     [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
     [Arguments]    ${model_zip_path}   ${catalog_service_name}=    ${cds}=    ${service}=
     # For testing use random service name
-    ${random}=    Get Current Date
-    ${catalog_service_id}=    Add ASDC Catalog Service    ${catalog_service_name}_${random}
+    #${random}=    Get Current Date
+    #${catalog_service_id}=    Add ASDC Catalog Service    ${catalog_service_name}_${random}
+    #   catalog_service_name already 
+    ${catalog_service_id}=    Add ASDC Catalog Service    ${catalog_service_name}
     Log To Console    ${\n}ServiceName: ${catalog_service_name}_${random}
     #${catalog_service_id}=    Add ASDC Catalog Service    ${catalog_service_name}
     ${catalog_resource_ids}=    Create List
@@ -236,7 +238,10 @@ Setup ASDC Catalog Resource
     ${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}
+    # /var/opt/OpenECOMP_ETE/demo/heat/temp/vCPE_infra.zip
+    ${matches}=   Get Regexp Matches  ${model_zip_path}  temp/(.*)\.zip  1
+    ${software_product_name_prefix}=    Set Variable   ${matches[0]}
+    ${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}
     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}
@@ -493,10 +498,11 @@ 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}   ${license_model_version_id}
+    [Arguments]    ${license_agreement_id}    ${feature_group_id}    ${license_model_name}    ${license_model_id}   ${license_model_version_id}  ${name_prefix}
     ${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}    version_id=${license_model_version_id}
+    ${shortened_uuid}=     Evaluate    str("${uuid}")[:13]
+    ${software_product_name}=  Catenate   ${name_prefix}   ${shortened_uuid}
+    ${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}
     ${data}=   Fill JSON Template File    ${ASDC_SOFTWARE_PRODUCT_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Post Request    ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}     ${data}    ${ASDC_DESIGNER_USER_ID}   ${ASDC_BE_ONBOARD_ENDPOINT} 
     Should Be Equal As Strings         ${resp.status_code}     200
index f29f134..6d821ca 100644 (file)
@@ -5,7 +5,7 @@
          "node_type": "org.openecomp.service.Demovcpevgmux"
      },
      "brg": {
-         "invariantUUID": "ff0337b9-dbe2-4d88-bb74-18bf027ae586"
+         "invariantUUID": "ff0337b9-dbe2-4d88-bb74-18bf027ae586",
          "UUID": "1b6974f1-4aed-47f4-b962-816aa1261927",
          "node_type": "org.openecomp.service.Demovcpevbrgemu"
      }
index ece37a6..71eac84 100644 (file)
@@ -1,9 +1,10 @@
 Notes on how to setup for vCPEResCust automated onboarding
 
-1. Run the ./demo-k8s.sh onap distribute to load the other vCPE Models
-2. In the robot container the CSARs are downloaded into /tmp/csar
-3. Create directory and unzip the brgemul and gmux CSArs into a subdirectory
-4. Copy the 3 parameters (invariant uuid, uuid , node_type) into the vcpe_allotted_resourse_data.json
-5. Put the vcpe_allotted_rsource-data.json into /tmp on the docker conatiner
-
+1. In SDC as demo create the BRG subcategory under Allotted Resources
+       a. if you do not the vcpe csar distribution will fail 
+2. Run the ./demo-k8s.sh onap distribute to load the initial vCPE Models (infra, gmux, bng, brgemu)
+3. In the robot container the CSARs are downloaded into /tmp/csar
+4. Create sub-directories and unzip the brgemul and gmux CSArs into the brg and gmux subdirectories
+5. Copy vcpe_allotted_resource_data.json.example to /tmp/vcel_allotted_resource_data.json
+5. Copy the 3 parameters (invariant uuid, uuid , node_type) into /tmp/vcpe_allotted_resourse_data.json for both the tunnelxconn (gmux) and brg (brgemu)