Change-Id: I71d7cfa174333f69e2ef02aa3ee6ec0227b10041
Signed-off-by: Sam Hague <shague@redhat.com>
Update Network
[Arguments] ${network_name} ${additional_args}=${EMPTY}
[Documentation] Update Network with neutron request.
Update Network
[Arguments] ${network_name} ${additional_args}=${EMPTY}
[Documentation] Update Network with neutron request.
- ${cmd} = BuiltIn.Set Variable If '${OPENSTACK_BRANCH}'=='stable/newton' neutron -v net-update ${network_name} ${additional_args} openstack network set ${network_name} ${additional_args}
- ${rc} ${output} = OperatingSystem.Run And Return Rc And Output ${cmd}
- BuiltIn.Log ${output}
- BuiltIn.Should Be True '${rc}' == '0'
+ ${output} = OpenStack CLI openstack network set ${network_name} ${additional_args}
[Return] ${output}
Show Network
[Return] ${output}
Show Network
Update SubNet
[Arguments] ${subnet_name} ${additional_args}=${EMPTY}
[Documentation] Update subnet with neutron request.
Update SubNet
[Arguments] ${subnet_name} ${additional_args}=${EMPTY}
[Documentation] Update subnet with neutron request.
- ${cmd} = BuiltIn.Set Variable If '${OPENSTACK_BRANCH}'=='stable/newton' neutron -v subnet-update ${subnet_name} ${additional_args} openstack subnet set ${subnet_name} ${additional_args}
- ${rc} ${output} = OperatingSystem.Run And Return Rc And Output ${cmd}
- BuiltIn.Log ${output}
- BuiltIn.Should Be True '${rc}' == '0'
+ ${output} = OpenStack CLI openstack subnet set ${subnet_name} ${additional_args}
[Return] ${output}
Show SubNet
[Return] ${output}
Show SubNet
# if allowed_address_pairs is not empty we need to create the arguments to pass to the port create command. They are
# in a different format with the neutron vs openstack cli.
${address_pair_length} = BuiltIn.Get Length ${allowed_address_pairs}
# if allowed_address_pairs is not empty we need to create the arguments to pass to the port create command. They are
# in a different format with the neutron vs openstack cli.
${address_pair_length} = BuiltIn.Get Length ${allowed_address_pairs}
- ${allowed_pairs_argv} = BuiltIn.Set Variable If '${OPENSTACK_BRANCH}'=='stable/newton' and '${address_pair_length}'=='2' --allowed-address-pairs type=dict list=true ip_address=@{allowed_address_pairs}[0] ip_address=@{allowed_address_pairs}[1]
- ${allowed_pairs_argv} = BuiltIn.Set Variable If '${OPENSTACK_BRANCH}'!='stable/newton' and '${address_pair_length}'=='2' --allowed-address ip-address=@{allowed_address_pairs}[0] --allowed-address ip-address=@{allowed_address_pairs}[1] ${allowed_pairs_argv}
- ${allowed_pairs_argv} = BuiltIn.Set Variable If '${address_pair_length}'=='0' ${EMPTY} ${allowed_pairs_argv}
- ${cmd} = BuiltIn.Set Variable If '${OPENSTACK_BRANCH}'=='stable/newton' neutron -v port-create ${network_name} --name ${port_name} --security-group ${sg} ${additional_args} ${allowed_pairs_argv} openstack port create --network ${network_name} ${port_name} --security-group ${sg} ${additional_args} ${allowed_pairs_argv}
- ${rc} ${output} = OperatingSystem.Run And Return Rc And Output ${cmd}
- BuiltIn.Log ${output}
- BuiltIn.Should Be True '${rc}' == '0'
+ ${allowed_pairs_argv} = BuiltIn.Set Variable ${EMPTY}
+ ${allowed_pairs_argv} = BuiltIn.Set Variable If '${address_pair_length}'=='2' --allowed-address ip-address=@{allowed_address_pairs}[0] --allowed-address ip-address=@{allowed_address_pairs}[1] ${allowed_pairs_argv}
+ ${output} = OpenStack CLI openstack port create --network ${network_name} ${port_name} --security-group ${sg} ${additional_args} ${allowed_pairs_argv}
Update Port
[Arguments] ${port_name} ${additional_args}=${EMPTY}
Update Port
[Arguments] ${port_name} ${additional_args}=${EMPTY}
Add Router Gateway
[Arguments] ${router_name} ${external_network_name}
Add Router Gateway
[Arguments] ${router_name} ${external_network_name}
- ${cmd} = BuiltIn.Set Variable If '${OPENSTACK_BRANCH}'=='stable/newton' neutron -v router-gateway-set ${router_name} ${external_network_name} openstack router set ${router_name} --external-gateway ${external_network_name}
- ${rc} ${output} = OperatingSystem.Run And Return Rc And Output ${cmd}
- BuiltIn.Should Be True '${rc}' == '0'
+ ${output} = OpenStack CLI openstack router set ${router_name} --external-gateway ${external_network_name}
Remove Interface
[Arguments] ${router_name} ${interface_name}
Remove Interface
[Arguments] ${router_name} ${interface_name}
... ELSE BuiltIn.Catenate ${cmd}
${cmd} = BuiltIn.Run Keyword If '${remote_ip_prefix}'!='None' BuiltIn.Catenate ${cmd} --src-ip ${remote_ip_prefix}
... ELSE BuiltIn.Catenate ${cmd}
... ELSE BuiltIn.Catenate ${cmd}
${cmd} = BuiltIn.Run Keyword If '${remote_ip_prefix}'!='None' BuiltIn.Catenate ${cmd} --src-ip ${remote_ip_prefix}
... ELSE BuiltIn.Catenate ${cmd}
- ${rc} ${output} = OperatingSystem.Run And Return Rc And Output ${cmd}
+ ${output} = OpenStack CLI ${cmd}
${rule_id} = BuiltIn.Should Match Regexp ${output} ${REGEX_UUID}
${rule_id} = BuiltIn.Should Match Regexp ${output} ${REGEX_UUID}
- BuiltIn.Log ${rule_id}
- BuiltIn.Should Be True '${rc}' == '0'
[Return] ${output} ${rule_id}
Neutron Security Group Rule Create Legacy Cli
[Return] ${output} ${rule_id}
Neutron Security Group Rule Create Legacy Cli
Resource ../variables/Variables.robot
*** Variables ***
Resource ../variables/Variables.robot
*** Variables ***
-@{stable/newton_EXCLUSION_REGEXES} ${EMPTY}
@{stable/ocata_EXCLUSION_REGEXES} ${EMPTY}
@{stable/pike_EXCLUSION_REGEXES} ${EMPTY}
@{stable/queens_EXCLUSION_REGEXES} ${EMPTY}
@{stable/ocata_EXCLUSION_REGEXES} ${EMPTY}
@{stable/pike_EXCLUSION_REGEXES} ${EMPTY}
@{stable/queens_EXCLUSION_REGEXES} ${EMPTY}
OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
Create Neutron Ports
OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
Create Neutron Ports
- ${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]
+ ${allowed_address_pairs_args} = BuiltIn.Set Variable --allowed-address ip-address=@{EXTRA_NW_SUBNET}[0] --allowed-address ip-address=@{EXTRA_NW_SUBNET}[1]
Create Port @{NETWORKS}[0] @{PORTS}[0] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
Create Port @{NETWORKS}[0] @{PORTS}[1] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
Create Port @{NETWORKS}[1] @{PORTS}[2] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
Create Port @{NETWORKS}[0] @{PORTS}[0] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
Create Port @{NETWORKS}[0] @{PORTS}[1] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
Create Port @{NETWORKS}[1] @{PORTS}[2] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP} IPv6
Create Neutron Ports
OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP} IPv6
Create Neutron Ports
- ${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]
+ ${allowed_address_pairs_args} = BuiltIn.Set Variable --allowed-address ip-address=@{EXTRA_NW_SUBNET}[0] --allowed-address ip-address=@{EXTRA_NW_SUBNET}[1]
Create Port @{NETWORKS}[0] @{PORTS}[0] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
Create Port @{NETWORKS}[0] @{PORTS}[1] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
Create Port @{NETWORKS}[1] @{PORTS}[2] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
Create Port @{NETWORKS}[0] @{PORTS}[0] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
Create Port @{NETWORKS}[0] @{PORTS}[1] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
Create Port @{NETWORKS}[1] @{PORTS}[2] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
*** Variables ***
@{legacy_feature_list} odl-vtn-manager-neutron odl-ovsdb-openstack
*** Variables ***
@{legacy_feature_list} odl-vtn-manager-neutron odl-ovsdb-openstack
-${CIRROS_stable/newton} cirros-0.3.4-x86_64-uec
${CIRROS_stable/ocata} cirros-0.3.4-x86_64-uec
${CIRROS_stable/pike} cirros-0.3.5-x86_64-disk
${CIRROS_stable/queens} cirros-0.3.5-x86_64-disk
${CIRROS_stable/ocata} cirros-0.3.4-x86_64-uec
${CIRROS_stable/pike} cirros-0.3.5-x86_64-disk
${CIRROS_stable/queens} cirros-0.3.5-x86_64-disk