Add vLB_CDS distribution with CDS input parameters 22/92622/2
authorAbdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>
Fri, 2 Aug 2019 18:36:00 +0000 (18:36 +0000)
committerAbdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>
Sun, 4 Aug 2019 08:59:23 +0000 (08:59 +0000)
Issue-ID: TEST-180
Signed-off-by: Abdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>
Change-Id: Iaab9daf59147b3cf1493bfea276f69fde04d2f97
Signed-off-by: Abdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>
robot/resources/sdc_interface.robot

index 9708467..05173d2 100644 (file)
@@ -975,22 +975,22 @@ Create Multi Part
    Set To Dictionary  ${addTo}  ${partName}=${partData}
 
 
-Add CDS Parameters
-    [Arguments]  ${catalog_service_name}
+Add CDS Parameters 
+    [Arguments]  ${catalog_service_name} 
     ${resp}=   SDC.Run Get Request    ${SDC_BE_ENDPOINT}    ${SDC_CATALOG_SERVICES_PATH}/serviceName/${catalog_service_name}/serviceVersion/0.1  ${SDC_DESIGNER_USER_ID}    auth=${GLOBAL_SDC_AUTHENTICATION}
-    #${resp_json}=  To Json  ${resp}
     ${service_uuid}=  Set Variable  ${resp.json()['uniqueId']}
     ${component_uuid}=  Set Variable  ${resp.json()['componentInstances'][0]['uniqueId']}
+    ${skip_post_instatiation}=  Set Variable If  '${catalog_service_name}' == "demoVLB_CDS"  false  true
     @{inputs}=   Copy List  ${resp.json()['componentInstances'][0]['inputs']}
     :FOR  ${input}  IN  @{inputs}
-    \    Run Keyword If  '${input['name']}' == "sdnc_artifact_name"   Set Input Parameter  ${service_uuid}  ${component_uuid}  ${input}  string  vdns-vnf
-         ...  ELSE IF  '${input['name']}' == "sdnc_model_name"   Set Input Parameter  ${service_uuid}  ${component_uuid}  ${input}  string  test
-         ...  ELSE IF  '${input['name']}' == "sdnc_model_version"   Set Input Parameter  ${service_uuid}  ${component_uuid}  ${input}  string  1.0.0
-         ...  ELSE IF  '${input['name']}' == "skip_post_instantiation_configuration"   Set Input Parameter  ${service_uuid}  ${component_uuid}  ${input}  boolean  false
-
+    \    Run Keyword If  '${input['name']}' == "sdnc_artifact_name"   Set Input Parameter  ${service_uuid}  ${component_uuid}  ${input}  string  vnf
+    \    ...  ELSE IF  '${input['name']}' == "sdnc_model_name"   Set Input Parameter  ${service_uuid}  ${component_uuid}  ${input}  string  vlb_cds_test
+    \    ...  ELSE IF  '${input['name']}' == "sdnc_model_version"   Set Input Parameter  ${service_uuid}  ${component_uuid}  ${input}  string  1.0.0
+    \    ...  ELSE IF  '${input['name']}' == "skip_post_instantiation_configuration"   Set Input Parameter  ${service_uuid}  ${component_uuid}  ${input}  boolean  ${skip_post_instatiation}
+    
 
-Set Input Parameter
-    [Arguments]   ${service_uuid}  ${component_uuid}  ${input}  ${input_type}  ${input_value}
+Set Input Parameter 
+    [Arguments]   ${service_uuid}  ${component_uuid}  ${input}  ${input_type}  ${input_value}    
     ${resp}=    SDC.Run Post Request  ${SDC_BE_ENDPOINT}   ${SDC_CATALOG_SERVICES_PATH}/${service_uuid}/resourceInstance/${component_uuid}/inputs    {"constraints":[],"name":"${input['name']}","parentUniqueId":"${input['parentUniqueId']}","password":false,"required":false,"schema":{"property":{}},"type":"${input_type}","uniqueId":"${input['uniqueId']}","value":"${input_value}","definition":false,"toscaPresentation":{"ownerId":"${input['ownerId']}"}}    ${SDC_DESIGNER_USER_ID}    auth=${GLOBAL_SDC_AUTHENTICATION}
     Should Be Equal As Strings  ${resp.status_code}     200
 
@@ -1001,4 +1001,4 @@ Get Service Model Parameter from SDC Service Catalog
     ${resp}=    SDC.Run Get Request    ${SDC_BE_ENDPOINT}  ${SDC_CATALOG_SERVICES_PATH}/serviceName/${service_name}/serviceVersion/1.0  ${SDC_DESIGNER_USER_ID}  auth=${GLOBAL_SDC_AUTHENTICATION}
     ${json_resp}=  Set Variable  ${resp.json()}
     ${parameter_value}=  Set Variable  ${json_resp["${parameter_name}"]}
-    [Return]    ${parameter_value}
\ No newline at end of file
+    [Return]    ${parameter_value}