Fix robot preload VNF issue

Change-Id: Ie0241358f48f74e1033521e77302f8c898ac8e42
Issue-ID: INT-516
Signed-off-by: Bin Yang <bin.yang@windriver.com>
diff --git a/robot/assets/service_mappings.py b/robot/assets/service_mappings.py
index 2cdc0d5..ff41fad 100644
--- a/robot/assets/service_mappings.py
+++ b/robot/assets/service_mappings.py
@@ -33,6 +33,8 @@
     "vCPE" : [{"isBase" : "true",  "template" : "vcpe_preload.template", "name_pattern": "base_clearwater"}],
     "vFWSNK" : [{"isBase" : "true",   "template" : "vfwsnk_preload.template", "name_pattern": "base_vfw"}],
     "vPKG"   : [{"isBase" : "true",  "template" : "vpkg_preload.template", "name_pattern": "base_vpkg"}],
+    "vFWCL"   : [{"isBase" : "true",   "template" : "vfwsnk_preload.template", "name_pattern": "base_vfw"},
+                 {"isBase" : "true",  "template" : "vpkg_preload.template", "name_pattern": "base_vpkg"}],
 }
 
 '''
diff --git a/robot/resources/sdngc_interface.robot b/robot/resources/sdngc_interface.robot
index 5028644..f95fff1 100644
--- a/robot/resources/sdngc_interface.robot
+++ b/robot/resources/sdngc_interface.robot
@@ -117,7 +117,7 @@
     [Arguments]    ${service_type_uuid}    ${generic_vnf_name}    ${generic_vnf_type}       ${vf_module_name}    ${vf_module_type}    ${service}    ${filename}   ${uuid}
     Return From Keyword If    '${filename}' == ''
     ${data_template}=    OperatingSystem.Get File    ${PRELOAD_VNF_TOPOLOGY_OPERATION_BODY}/preload.template
-    ${parameters}=    Get Template Parameters    ${filename}   ${uuid}
+    ${parameters}=    Get Template Parameters    ${generic_vnf_name}    ${filename}   ${uuid}
     Set To Dictionary   ${parameters}   generic_vnf_name=${generic_vnf_name}     generic_vnf_type=${generic_vnf_type}  service_type=${service_type_uuid}    vf_module_name=${vf_module_name}    vf_module_type=${vf_module_type}
     ${data}=	Fill JSON Template    ${data_template}    ${parameters}
 	${put_resp}=    Run SDNGC Post Request     ${SDNGC_INDEX_PATH}${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH}     ${data}
@@ -126,7 +126,7 @@
     Should Be Equal As Strings 	${get_resp.status_code} 	200
 
 Get Template Parameters
-    [Arguments]    ${template}    ${uuid}
+    [Arguments]   ${generic_vnf_name}    ${template}    ${uuid}
     ${rest}   ${suite}=    Split String From Right    ${SUITE NAME}   .   1
     ${uuid}=    Catenate    ${uuid}
     ${hostid}=    Get Substring    ${uuid}    -4
@@ -147,7 +147,7 @@
 
 
     # update the value map with unique values.
-    Set To Dictionary   ${valuemap}   uuid=${uuid}   hostid=${hostid}    ecompnet=${ecompnet}
+    Set To Dictionary   ${valuemap}   uuid=${uuid}   hostid=${hostid}    ecompnet=${ecompnet}    generic_vnf_name=${generic_vnf_name}
 
     #
     # Mash together the defaults dict with the test case dict to create the set of
diff --git a/robot/resources/vid/vid_interface.robot b/robot/resources/vid/vid_interface.robot
index ec01757..3552279 100644
--- a/robot/resources/vid/vid_interface.robot
+++ b/robot/resources/vid/vid_interface.robot
@@ -100,7 +100,7 @@
     ${json}=    To Json    ${request_list[1]}
     ${request_id}=    Catenate    ${json['requestReferences']['instanceId']}
     [Return]    ${request_id}
-    
+
 Get Model UUID from VID
     [Documentation]    Must use UI since rest call get redirect to portal and get DNS error
     ...    Search all services and match on the invariantUUID
@@ -108,7 +108,8 @@
     Go To     ${VID_ENDPOINT}${VID_ENV}/rest/models/services
     ${resp}=   Get Text   xpath=//body/pre
     ${json}=   To Json    ${resp}
-    :for   ${dict}  in  @{json}
+    ${services}=   Get From Dictionary    ${json}   services
+    :for   ${dict}  in  @{services}
     \    ${uuid}=   Get From DIctionary   ${dict}   uuid
     \    ${inv}=   Get From DIctionary   ${dict}    invariantUUID
     \    Return From Keyword If   "${invariantUUID}" == "${inv}"   ${uuid}