Use - or _ depending on openstack version 87/59987/1
authorJamo Luhrsen <jluhrsen@redhat.com>
Wed, 5 Jul 2017 21:01:49 +0000 (14:01 -0700)
committerJamo Luhrsen <jluhrsen@redhat.com>
Wed, 5 Jul 2017 21:01:49 +0000 (14:01 -0700)
seems in Ocata, the allowed-address argument for port
create is ip-address, whereas it's ip_address in
earlier versions. so fun...

Change-Id: Id1bbd3a0f89c742c958392e802b527f9469d32b2
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
csit/suites/netvirt/Netvirt_Vpnservice/01_basic_vpnservice.robot
csit/suites/netvirt/Netvirt_Vpnservice/03_basic_ipv6_vpnservice.robot

index 24b323bfdeb1081c59edfe127242bd8e97dae1b2..ee9d211cdde93ef02cf65cfe0282eec285b8c62a 100644 (file)
@@ -72,16 +72,11 @@ Add Ssh Allow Rule
 
 Create Neutron Ports
     [Documentation]    Create four ports under previously created subnets
-    ${allowed_address_pairs_args}=    Set Variable    --allowed-address ip_address=${EXTRA_NW_SUBNET[0]} --allowed-address ip_address=${EXTRA_NW_SUBNET[1]}
-    ${allowed_address_pairs_os_cli}=    Set Variable    --allowed-address ip-address=${EXTRA_NW_SUBNET[0]} --allowed-address ip-address=${EXTRA_NW_SUBNET[1]}
-    Run Keyword If    '${OPENSTACK_BRANCH}'=='stable/newton'    Create Port    ${NETWORKS[0]}    ${PORT_LIST[0]}    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
-    ...    ELSE    Create Port    ${NETWORKS[0]}    ${PORT_LIST[0]}    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_os_cli}
-    Run Keyword If    '${OPENSTACK_BRANCH}'=='stable/newton'    Create Port    ${NETWORKS[0]}    ${PORT_LIST[1]}    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
-    ...    ELSE    Create Port    ${NETWORKS[0]}    ${PORT_LIST[1]}    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_os_cli}
-    Run Keyword If    '${OPENSTACK_BRANCH}'=='stable/newton'    Create Port    ${NETWORKS[1]}    ${PORT_LIST[2]}    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
-    ...    ELSE    Create Port    ${NETWORKS[1]}    ${PORT_LIST[2]}    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_os_cli}
-    Run Keyword If    '${OPENSTACK_BRANCH}'=='stable/newton'    Create Port    ${NETWORKS[1]}    ${PORT_LIST[3]}    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
-    ...    ELSE    Create Port    ${NETWORKS[1]}    ${PORT_LIST[3]}    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_os_cli}
+    ${allowed_address_pairs_args}=    Set Variable If    '${OPENSTACK_BRANCH}'=='stable/newton'    --allowed-address ip_address=${EXTRA_NW_SUBNET[0]} --allowed-address ip_address=${EXTRA_NW_SUBNET[1]}    --allowed-address ip-address=${EXTRA_NW_SUBNET[0]} --allowed-address ip-address=${EXTRA_NW_SUBNET[1]}
+    Create Port    ${NETWORKS[0]}    ${PORT_LIST[0]}    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
+    Create Port    ${NETWORKS[0]}    ${PORT_LIST[1]}    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
+    Create Port    ${NETWORKS[1]}    ${PORT_LIST[2]}    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
+    Create Port    ${NETWORKS[1]}    ${PORT_LIST[3]}    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
     Wait Until Keyword Succeeds    3s    1s    Check For Elements At URI    ${CONFIG_API}/neutron:neutron/ports/    ${PORT_LIST}
     ${PORTS_MACADDR} =    Get Ports MacAddr    ${PORT_LIST}
     Set Suite Variable    ${PORTS_MACADDR}
index 96e8609fadd66c1af169bab78e997d3315bb5974..ba01ada63f0992cca9a6ea9c97d799e9ad3b6de0 100644 (file)
@@ -99,7 +99,7 @@ Add Ssh V6 Allow Rule
 
 Create Neutron Ports
     [Documentation]    Create four ports under previously created subnets
-    ${allowed_address_pairs_args}=    Set Variable    --allowed-address-pairs type=dict list=true ip_address=${EXTRA_NW_SUBNET[0]} ip_address=${EXTRA_NW_SUBNET[1]}
+    ${allowed_address_pairs_args}=    Set Variable If    '${OPENSTACK_BRANCH}'=='stable/newton'    --allowed-address ip_address=${EXTRA_NW_SUBNET[0]} --allowed-address ip_address=${EXTRA_NW_SUBNET[1]}    --allowed-address ip-address=${EXTRA_NW_SUBNET[0]} --allowed-address ip-address=${EXTRA_NW_SUBNET[1]}
     Create Port    ${NETWORKS[0]}    ${PORT_LIST[0]}    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
     Create Port    ${NETWORKS[0]}    ${PORT_LIST[1]}    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
     Create Port    ${NETWORKS[1]}    ${PORT_LIST[2]}    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}