Generfy 'VPN Create L3VPN' with router-id 97/48797/3
authorDavid López <david.lopez.munoz@ericsson.com>
Tue, 29 Nov 2016 16:11:37 +0000 (17:11 +0100)
committerJamo Luhrsen <jluhrsen@redhat.com>
Tue, 6 Dec 2016 05:46:16 +0000 (05:46 +0000)
Only if specified, it is used

Change-Id: I19e68422e4486c80bbc490cd4e237a74e5a6ca8d
Signed-off-by: David López <david.lopez.munoz@ericsson.com>
csit/libraries/VpnOperations.robot
csit/variables/vpnservice/l3vpn_create/post_data.json

index 7382d09a97eb845b056f5c6dd09bc1a952770a90..8c54061d3f5200b4a5398de21c2b37c3a80ec687 100644 (file)
@@ -19,6 +19,8 @@ ${VAR_BASE}       ${CURDIR}/../variables/vpnservice/
 VPN Create L3VPN
     [Arguments]    &{Kwargs}
     [Documentation]    Create an L3VPN using the Json using the list of optional arguments received.
+    Run keyword if    "routerid" in ${Kwargs}    Collections.Set_To_Dictionary    ${Kwargs}    router=, "router-id":"${Kwargs['routerid']}"
+    ...    ELSE    Collections.Set_To_Dictionary    ${Kwargs}    router=${empty}
     &{L3vpn_create_actual_val} =    Collections.Copy_Dictionary    ${L3VPN_CREATE_DEFAULT}
     Collections.Set_To_Dictionary    ${L3vpn_create_actual_val}    &{Kwargs}
     TemplatedRequests.Post_As_Json_Templated    folder=${VAR_BASE}/l3vpn_create    mapping=${L3vpn_create_actual_val}    session=session
index 4f705090d6005d9a9f4b2031e42fdbd4e845be69..7511509cceb6d37fc267dd95ae75ee56bd65d2cc 100644 (file)
@@ -14,6 +14,7 @@
                $importrt
             ,
             "tenant-id":"$tenantid"
+            $router
          }
       ]
    }