Should Contain ${output} Created a new subnet
Create Port
- [Arguments] ${network_name} ${port_name}
+ [Arguments] ${network_name} ${port_name} ${sg}=default
[Documentation] Create Port with neutron request.
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
- ${output}= Write Commands Until Prompt neutron -v port-create ${network_name} --name ${port_name} 30s
+ ${output}= Write Commands Until Prompt neutron -v port-create ${network_name} --name ${port_name} --security-group ${sg} 30s
Close Connection
Log ${output}
Should Contain ${output} Created a new port
\ Wait Until Keyword Succeeds 25s 5s Verify VM Is ACTIVE ${VmElement}
Create Vm Instance With Port On Compute Node
- [Arguments] ${port_name} ${vm_instance_name} ${compute_node} ${image}=cirros-0.3.4-x86_64-uec ${flavor}=m1.nano
+ [Arguments] ${port_name} ${vm_instance_name} ${compute_node} ${image}=cirros-0.3.4-x86_64-uec ${flavor}=m1.nano ${sg}=default
[Documentation] Create One VM instance using given ${port_name} and for given ${compute_node}
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
${port_id}= Get Port Id ${port_name} ${devstack_conn_id}
${hostname_compute_node}= Run Command On Remote System ${compute_node} hostname
- ${output}= Write Commands Until Prompt nova boot --image ${image} --flavor ${flavor} --nic port-id=${port_id} ${vm_instance_name} --availability-zone nova:${hostname_compute_node} 30s
+ ${output}= Write Commands Until Prompt nova boot --image ${image} --flavor ${flavor} --nic port-id=${port_id} ${vm_instance_name} --security-groups ${sg} --availability-zone nova:${hostname_compute_node} 30s
Log ${output}
Wait Until Keyword Succeeds 25s 5s Verify VM Is ACTIVE ${vm_instance_name}
Should Contain ${SUB_LIST} ${SUBNETS[0]}
Should Contain ${SUB_LIST} ${SUBNETS[1]}
+Add Ssh Allow Rule
+ [Documentation] Allow all TCP/UDP/ICMP packets for this suite
+ Neutron Security Group Create sg-vpnservice
+ Neutron Security Group Rule Create sg-vpnservice direction=ingress port_range_max=65535 port_range_min=1 protocol=tcp remote_ip_prefix=0.0.0.0/0
+ Neutron Security Group Rule Create sg-vpnservice direction=egress port_range_max=65535 port_range_min=1 protocol=tcp remote_ip_prefix=0.0.0.0/0
+ Neutron Security Group Rule Create sg-vpnservice direction=ingress protocol=icmp remote_ip_prefix=0.0.0.0/0
+ Neutron Security Group Rule Create sg-vpnservice direction=egress protocol=icmp remote_ip_prefix=0.0.0.0/0
+ Neutron Security Group Rule Create sg-vpnservice direction=ingress port_range_max=65535 port_range_min=1 protocol=udp remote_ip_prefix=0.0.0.0/0
+ Neutron Security Group Rule Create sg-vpnservice direction=egress port_range_max=65535 port_range_min=1 protocol=udp remote_ip_prefix=0.0.0.0/0
+
Create Neutron Ports
[Documentation] Create four ports under previously created subnets
- Create Port ${NETWORKS[0]} ${PORT_LIST[0]}
- Create Port ${NETWORKS[0]} ${PORT_LIST[1]}
- Create Port ${NETWORKS[1]} ${PORT_LIST[2]}
- Create Port ${NETWORKS[1]} ${PORT_LIST[3]}
+ Create Port ${NETWORKS[0]} ${PORT_LIST[0]} sg=sg-vpnservice
+ Create Port ${NETWORKS[0]} ${PORT_LIST[1]} sg=sg-vpnservice
+ Create Port ${NETWORKS[1]} ${PORT_LIST[2]} sg=sg-vpnservice
+ Create Port ${NETWORKS[1]} ${PORT_LIST[3]} sg=sg-vpnservice
Check OpenDaylight Neutron Ports
[Documentation] Checking OpenDaylight Neutron API for known ports
Create Nova VMs
[Documentation] Create Vm instances on compute node with port
- Create Vm Instance With Port On Compute Node ${PORT_LIST[0]} ${VM_INSTANCES[0]} ${OS_COMPUTE_1_IP}
- Create Vm Instance With Port On Compute Node ${PORT_LIST[1]} ${VM_INSTANCES[1]} ${OS_COMPUTE_2_IP}
- Create Vm Instance With Port On Compute Node ${PORT_LIST[2]} ${VM_INSTANCES[2]} ${OS_COMPUTE_1_IP}
- Create Vm Instance With Port On Compute Node ${PORT_LIST[3]} ${VM_INSTANCES[3]} ${OS_COMPUTE_2_IP}
+ Create Vm Instance With Port On Compute Node ${PORT_LIST[0]} ${VM_INSTANCES[0]} ${OS_COMPUTE_1_IP} sg=sg-vpnservice
+ Create Vm Instance With Port On Compute Node ${PORT_LIST[1]} ${VM_INSTANCES[1]} ${OS_COMPUTE_2_IP} sg=sg-vpnservice
+ Create Vm Instance With Port On Compute Node ${PORT_LIST[2]} ${VM_INSTANCES[2]} ${OS_COMPUTE_1_IP} sg=sg-vpnservice
+ Create Vm Instance With Port On Compute Node ${PORT_LIST[3]} ${VM_INSTANCES[3]} ${OS_COMPUTE_2_IP} sg=sg-vpnservice
Log Check for routes
Wait Until Keyword Succeeds 30s 10s Wait For Routes To Propogate