Add new keywords in VpnOperations robot file. 17/73917/4
authormpany <madhusmita.p@altencalsoftlabs.com>
Wed, 11 Jul 2018 16:43:05 +0000 (22:13 +0530)
committerJamo Luhrsen <jluhrsen@redhat.com>
Mon, 16 Jul 2018 21:19:35 +0000 (21:19 +0000)
Change-Id: I625c08030725038d635317c1aa1dc7ae711c7f55
Signed-off-by: mpany <madhusmita.p@altencalsoftlabs.com>
csit/libraries/VpnOperations.robot

index fe705bd682bc7f7f0b586b2c680d3c168b614fbf..6d1c72308c134fc1b44645aad48d162c3d360d32 100644 (file)
@@ -61,11 +61,27 @@ VPN Get L3VPN ID
     ${vpn_id_hex} =    BuiltIn.Convert To Hex    ${result}
     [Return]    ${vpn_id_hex.lower()}
 
+Verify L3VPN On ODL
+    [Arguments]    @{vpns}
+    [Documentation]    To verify L3VPN on ODL for given vpn ids
+    : FOR    ${vpn}    IN    @{vpns}
+    \    ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${vpn}
+    \    BuiltIn.Should Contain    ${resp}    ${vpn}
+
 Associate L3VPN To Network
     [Arguments]    &{Kwargs}
     [Documentation]    Associate the created L3VPN to a network-id received as dictionary argument
     TemplatedRequests.Post_As_Json_Templated    folder=${VAR_BASE}/assoc_l3vpn    mapping=${Kwargs}    session=default    http_timeout=${SESSION_TIMEOUT}
 
+Associate L3VPNs To Networks
+    [Arguments]    ${vpnid_list}    ${network_list}
+    [Documentation]    Associates multiple networks to L3VPN and verify the same
+    : FOR    ${network}    ${vpnid}    IN ZIP    ${network_list}    ${vpnid_list}
+    \    ${network_id} =    OpenStackOperations.Get Net Id    ${network}
+    \    VpnOperations.Associate L3VPN To Network    networkid=${network_id}    vpnid=${vpnid}
+    \    ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${vpnid}
+    \    BuiltIn.Should Contain    ${resp}    ${network_id}
+
 Dissociate L3VPN From Networks
     [Arguments]    &{Kwargs}
     [Documentation]    Disssociate the already associated networks from L3VPN