From: Mohamed El-Serngawy Date: Fri, 12 Jun 2015 20:58:44 +0000 (-0400) Subject: Test case for ovsdb netvirt X-Git-Tag: release/lithium~17 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=integration%2Ftest.git;a=commitdiff_plain;h=10f9c811e7d28c6e49e2640e99f0bd66b8adef5a Test case for ovsdb netvirt Change-Id: Ia852ec603efde41802caeee390f01e95120d5d77 Signed-off-by: Mohamed El-Serngawy --- diff --git a/test/csit/suites/ovsdb/Openstack_Neutron/010__ovsdb_flow.robot b/test/csit/suites/ovsdb/Openstack_Neutron/010__ovsdb_flow.robot new file mode 100644 index 0000000000..2778c803bc --- /dev/null +++ b/test/csit/suites/ovsdb/Openstack_Neutron/010__ovsdb_flow.robot @@ -0,0 +1,235 @@ +*** Settings *** +Documentation Checking Network created in OVSDB are pushed to OpenDaylight +Suite Setup Create Session ODLSession http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS} +Suite Teardown Delete All Sessions +Library SSHLibrary +Library Collections +Library OperatingSystem +Library String +Library DateTime +Library RequestsLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py +Resource ../../../libraries/Utils.txt + +*** Variables *** +${ODLREST} /controller/nb/v2/neutron +${OVSDB_CONFIG_DIR} ${CURDIR}/../../../variables/ovsdb +${TNT1_ID} cde2563ead464ffa97963c59e002c0cf +${EXT_NET1_ID} 7da709ff-397f-4778-a0e8-994811272fdb +${EXT_SUBNET1_ID} 00289199-e288-464a-ab2f-837ca67101a7 +${TNT1_RTR_ID} e09818e7-a05a-4963-9927-fc1dc6f1e844 +${NEUTRON_PORT_TNT1_RTR_GW} 8ddd29db-f417-4917-979f-b01d4b1c3e0d +${NEUTRON_PORT_TNT1_RTR_NET1} 9cc1af22-108f-40bb-b938-f1da292236bf +${TNT1_NET1_NAME} net1 +${TNT1_NET1_SEGM} 1062 +${TNT1_NET1_ID} 12809f83-ccdf-422c-a20a-4ddae0712655 +${TNT1_SUBNET1_NAME} subnet1 +${TNT1_SUBNET1_ID} 6c496958-a787-4d8c-9465-f4c4176652e8 +${TNT1_NET1_DHCP_PORT_ID} 79adcba5-19e0-489c-9505-cc70f9eba2a1 +${TNT1_NET1_DHCP_MAC} FA:16:3E:8F:70:A9 +${TNT1_NET1_DHCP_DEVICE_ID} dhcp58155ae3-f2e7-51ca-9978-71c513ab02ee-${TNT1_NET1_ID} +${TNT1_NET1_DHCP_OVS_PORT} tap79adcba5-19 +${TNT1_VM1_PORT_ID} 341ceaca-24bf-4017-9b08-c3180e86fd24 +${TNT1_VM1_MAC} FA:16:3E:8E:B8:05 +${TNT1_VM1_DEVICE_ID} 20e500c3-41e1-4be0-b854-55c710a1cfb2 +${TNT1_NET1_VM1_OVS_PORT} tap341ceaca-24 +${TNT1_VM1_VM_ID} 20e500c3-41e1-4be0-b854-55c710a1cfb2 +${FLOAT_IP1_ID} f013bef4-9468-494d-9417-c9d9e4abb97c +${FLOAT_IP1_PORT_ID} 01671703-695e-4497-8a11-b5da989d2dc3 +${FLOAT_IP1_MAC} FA:16:3E:3F:37:BB +${FLOAT_IP1_DEVICE_ID} f013bef4-9468-494d-9417-c9d9e4abb97c +${FLOAT_IP1_ADDRESS} 192.168.111.22 + +*** Test Cases *** +Check External Net for Tenant + [Documentation] Check External Net for Tenant + [Tags] OpenStack Call Flow + ${resp} RequestsLibrary.Get ODLSession ${ODLREST}/networks + log http://${CONTROLLER}:${RESTCONFPORT}${ODLREST} + Should be Equal As Strings ${resp.status_code} 200 + +Create External Net for Tenant + [Documentation] Create External Net for Tenant + [Tags] OpenStack Call Flow + ${Data} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_ext_net.json + ${Data} Replace String ${Data} {netId} ${EXT_NET1_ID} + ${Data} Replace String ${Data} {tntId} ${TNT1_ID} + log ${Data} + ${resp} RequestsLibrary.Post ODLSession ${ODLREST}/networks data=${Data} headers=${HEADERS} + log ${resp.status_code} + Should be Equal As Strings ${resp.status_code} 201 + +Create External Subnet + [Documentation] Create External Subnet + [Tags] OpenStack Call Flow + ${Data} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_ext_subnet.json + ${Data} Replace String ${Data} {netId} ${EXT_NET1_ID} + ${Data} Replace String ${Data} {tntId} ${TNT1_ID} + ${Data} Replace String ${Data} {subnetId} ${EXT_SUBNET1_ID} + log ${Data} + ${resp} RequestsLibrary.Post ODLSession ${ODLREST}/subnets ${Data} + Should be Equal As Strings ${resp.status_code} 201 + +Create Tenant Router + [Documentation] Create Tenant Router + [Tags] OpenStack Call Flow + ${Data} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_router.json + ${Data} Replace String ${Data} {tntId} ${TNT1_ID} + ${Data} Replace String ${Data} {rtrId} ${TNT1_RTR_ID} + log ${Data} + ${resp} RequestsLibrary.Post ODLSession ${ODLREST}/routers ${Data} + Should be Equal As Strings ${resp.status_code} 201 + +Set Router Gateway + [Documentation] Set Router Gateway + [Tags] OpenStack Call Flow + ${Data} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_port_rtr_gateway.json + ${Data} Replace String ${Data} {tntId} ${TNT1_ID} + ${Data} Replace String ${Data} {rtrId} ${TNT1_RTR_ID} + ${Data} Replace String ${Data} {netId} ${EXT_NET1_ID} + ${Data} Replace String ${Data} {subnetId} ${EXT_SUBNET1_ID} + ${Data} Replace String ${Data} {portId} ${NEUTRON_PORT_TNT1_RTR_GW} + log ${Data} + ${resp} RequestsLibrary.Post ODLSession ${ODLREST}/ports ${Data} + Should be Equal As Strings ${resp.status_code} 201 + +Update Router Port Gateway + [Documentation] Update Router Port Gateway + [Tags] OpenStack Call Flow + ${Data} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/update_router_port_gateway.json + ${Data} Replace String ${Data} {tntId} ${TNT1_ID} + ${Data} Replace String ${Data} {netId} ${EXT_NET1_ID} + ${Data} Replace String ${Data} {subnetId} ${EXT_SUBNET1_ID} + ${Data} Replace String ${Data} {portId} ${NEUTRON_PORT_TNT1_RTR_GW} + log ${Data} + ${resp} RequestsLibrary.Put ODLSession ${ODLREST}/routers/${TNT1_RTR_ID} ${Data} + Should be Equal As Strings ${resp.status_code} 200 + +Create Tenant Internal Net + [Documentation] Create Tenant Internal Net + [Tags] OpenStack Call Flow + ${Data} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_tnt_net.json + ${Data} Replace String ${Data} {tntId} ${TNT1_ID} + ${Data} Replace String ${Data} {netId} ${TNT1_NET1_ID} + ${Data} Replace String ${Data} {netName} ${TNT1_NET1_NAME} + ${Data} Replace String ${Data} {netSegm} ${TNT1_NET1_SEGM} + log ${Data} + ${resp} RequestsLibrary.Post ODLSession ${ODLREST}/networks ${Data} + Should be Equal As Strings ${resp.status_code} 201 + +Create Tenant Internal Subnet + [Documentation] Create Tenant Internal Subnet + [Tags] OpenStack Call Flow + ${Data} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_tnt_subnet.json + ${Data} Replace String ${Data} {tntId} ${TNT1_ID} + ${Data} Replace String ${Data} {netId} ${TNT1_NET1_ID} + ${Data} Replace String ${Data} {subnetId} ${TNT1_SUBNET1_ID} + ${Data} Replace String ${Data} {subnetName} ${TNT1_SUBNET1_NAME} + log ${Data} + ${resp} RequestsLibrary.Post ODLSession ${ODLREST}/subnets ${Data} + Should be Equal As Strings ${resp.status_code} 201 + +Create Port DHCP + [Documentation] Create Port DHCP + [Tags] OpenStack Call Flow + ${Data} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_port_dhcp.json + ${Data} Replace String ${Data} {BIND_HOST_ID} ${CONTROLLER} + ${Data} Replace String ${Data} {subnetId} ${TNT1_SUBNET1_ID} + ${Data} Replace String ${Data} {dhcpDeviceId} ${TNT1_NET1_DHCP_DEVICE_ID} + ${Data} Replace String ${Data} {netId} ${TNT1_NET1_ID} + ${Data} Replace String ${Data} {tntId} ${TNT1_ID} + ${Data} Replace String ${Data} {dhcpMac} ${TNT1_NET1_DHCP_MAC} + ${Data} Replace String ${Data} {dhcpId} ${TNT1_NET1_DHCP_PORT_ID} + log ${Data} + ${resp} RequestsLibrary.Post ODLSession ${ODLREST}/ports ${Data} + Should be Equal As Strings ${resp.status_code} 201 + +Update Port DHCP + [Documentation] Update Port DHCP + [Tags] OpenStack Call Flow + ${Data} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/update_port_dhcp.json + ${Data} Replace String ${Data} {BIND_HOST_ID} ${CONTROLLER} + ${Data} Replace String ${Data} {dhcpDeviceId} ${TNT1_NET1_DHCP_DEVICE_ID} + log ${Data} + ${resp} RequestsLibrary.Put ODLSession ${ODLREST}/ports/${TNT1_NET1_DHCP_PORT_ID} ${Data} + Should be Equal As Strings ${resp.status_code} 200 + +Create Router Interface on Tenant Internal Subnet + [Documentation] Create Router Interface on Tenant Internal Subnet + [Tags] OpenStack Call Flow + ${Data} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_port_rtr_interface.json + ${Data} Replace String ${Data} {tntId} ${TNT1_ID} + ${Data} Replace String ${Data} {rtrId} ${TNT1_RTR_ID} + ${Data} Replace String ${Data} {netId} ${TNT1_NET1_ID} + ${Data} Replace String ${Data} {subnetId} ${TNT1_SUBNET1_ID} + ${Data} Replace String ${Data} {portId} ${NEUTRON_PORT_TNT1_RTR_NET1} + log ${Data} + ${resp} RequestsLibrary.Post ODLSession ${ODLREST}/ports ${Data} + Should be Equal As Strings ${resp.status_code} 201 + +Update Router Interface on Tenant Internal Subnet + [Documentation] Update Router Interface on Tenant Internal Subnet + [Tags] OpenStack Call Flow + ${Data} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/update_router_interface.json + ${Data} Replace String ${Data} {tntId} ${TNT1_ID} + ${Data} Replace String ${Data} {rtrId} ${TNT1_RTR_ID} + ${Data} Replace String ${Data} {subnetId} ${TNT1_SUBNET1_ID} + ${Data} Replace String ${Data} {portId} ${NEUTRON_PORT_TNT1_RTR_NET1} + log ${Data} + ${resp} RequestsLibrary.Put ODLSession ${ODLREST}/routers/${TNT1_RTR_ID}/add_router_interface ${Data} + Should be Equal As Strings ${resp.status_code} 200 + +Create Port VM + [Documentation] Create Port VM + [Tags] OpenStack Call Flow + ${Data} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_port_vm.json + ${Data} Replace String ${Data} {BIND_HOST_ID} ${CONTROLLER} + ${Data} Replace String ${Data} {tntId} ${TNT1_ID} + ${Data} Replace String ${Data} {netId} ${TNT1_NET1_ID} + ${Data} Replace String ${Data} {subnetId} ${TNT1_SUBNET1_ID} + ${Data} Replace String ${Data} {portId} ${TNT1_VM1_PORT_ID} + ${Data} Replace String ${Data} {macAddr} ${TNT1_VM1_MAC} + ${Data} Replace String ${Data} {deviceId} ${TNT1_VM1_DEVICE_ID} + log ${Data} + ${resp} RequestsLibrary.Post ODLSession ${ODLREST}/ports ${Data} + Should be Equal As Strings ${resp.status_code} 201 + +Create Port Floating IP + [Documentation] Create Port Floating IP + [Tags] OpenStack Call Flow + ${Data} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_port_floating_ip.json + ${Data} Replace String ${Data} {netId} ${EXT_NET1_ID} + ${Data} Replace String ${Data} {subnetId} ${EXT_SUBNET1_ID} + ${Data} Replace String ${Data} {portId} ${FLOAT_IP1_PORT_ID} + ${Data} Replace String ${Data} {macAddress} ${FLOAT_IP1_MAC} + ${Data} Replace String ${Data} {deviceId} ${FLOAT_IP1_DEVICE_ID} + log ${Data} + ${resp} RequestsLibrary.Post ODLSession ${ODLREST}/ports ${Data} + Should be Equal As Strings ${resp.status_code} 201 + +Create Floating IP + [Documentation] Create Floating IP + [Tags] OpenStack Call Flow + ${Data} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_floating_ip.json + ${Data} Replace String ${Data} {tntId} ${TNT1_ID} + ${Data} Replace String ${Data} {netId} ${EXT_NET1_ID} + ${Data} Replace String ${Data} {floatIpId} ${FLOAT_IP1_ID} + ${Data} Replace String ${Data} {floatIpAddress} ${FLOAT_IP1_ADDRESS} + log ${Data} + ${resp} RequestsLibrary.Post ODLSession ${ODLREST}/floatingips ${Data} + Should be Equal As Strings ${resp.status_code} 201 + +Associate the Floating IP with Tenant VM + [Documentation] Associate the Floating IP with Tenant VM + [Tags] OpenStack Call Flow + ${Data} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/associate_floating_ip.json + ${Data} Replace String ${Data} {tntId} ${TNT1_ID} + ${Data} Replace String ${Data} {netId} ${EXT_NET1_ID} + ${Data} Replace String ${Data} {rtrId} ${TNT1_RTR_ID} + ${Data} Replace String ${Data} {floatIpId} ${FLOAT_IP1_ID} + ${Data} Replace String ${Data} {floatIpAddress} ${FLOAT_IP1_ADDRESS} + ${Data} Replace String ${Data} {vmPortId} ${TNT1_VM1_PORT_ID} + log ${Data} + ${resp} RequestsLibrary.Put ODLSession ${ODLREST}/floatingips/${FLOAT_IP1_ID} ${Data} + Should be Equal As Strings ${resp.status_code} 201 \ No newline at end of file diff --git a/test/csit/variables/ovsdb/associate_floating_ip.json b/test/csit/variables/ovsdb/associate_floating_ip.json new file mode 100644 index 0000000000..dbaff3e7b5 --- /dev/null +++ b/test/csit/variables/ovsdb/associate_floating_ip.json @@ -0,0 +1,12 @@ +{ + "floatingip": { + "floating_network_id": "{netId}", + "router_id": "{rtrId}", + "fixed_ip_address": "10.1.0.3", + "floating_ip_address": "{floatIpAddress}", + "tenant_id": "{tntId}", + "status": "ACTIVE", + "port_id": "{vmPortId}", + "id": "{floatIpId}" + } +} \ No newline at end of file diff --git a/test/csit/variables/ovsdb/create_ext_net.json b/test/csit/variables/ovsdb/create_ext_net.json new file mode 100644 index 0000000000..9b0e6f9459 --- /dev/null +++ b/test/csit/variables/ovsdb/create_ext_net.json @@ -0,0 +1,16 @@ +{ + "network": [ + { + "provider:physical_network": "physnetext1", + "port_security_enabled": true, + "provider:network_type": "flat", + "id": "{netId}", + "provider:segmentation_id": null, + "router:external": true, + "name": "ext1", + "admin_state_up": true, + "tenant_id": "{tntId}", + "shared": false + } + ] +} \ No newline at end of file diff --git a/test/csit/variables/ovsdb/create_ext_subnet.json b/test/csit/variables/ovsdb/create_ext_subnet.json new file mode 100644 index 0000000000..aa1c846920 --- /dev/null +++ b/test/csit/variables/ovsdb/create_ext_subnet.json @@ -0,0 +1,24 @@ +{ + "subnet": { + "name": "subext1", + "enable_dhcp": false, + "network_id": "{netId}", + "tenant_id": "{tntId}", + "dns_nameservers": [], + "gateway_ip": "192.168.111.254", + "ipv6_ra_mode": null, + "allocation_pools": [ + { + "start": "192.168.111.21", + "end": "192.168.111.40" + } + ], + "host_routes": [], + "shared": false, + "ip_version": 4, + "ipv6_address_mode": null, + "cidr": "192.168.111.0/24", + "id": "{subnetId}", + "subnetpool_id": null + } +} \ No newline at end of file diff --git a/test/csit/variables/ovsdb/create_floating_ip.json b/test/csit/variables/ovsdb/create_floating_ip.json new file mode 100644 index 0000000000..ed9563ada6 --- /dev/null +++ b/test/csit/variables/ovsdb/create_floating_ip.json @@ -0,0 +1,12 @@ +{ + "floatingip": { + "floating_network_id": "{netId}", + "router_id": null, + "fixed_ip_address": null, + "floating_ip_address": "{floatIpAddress}", + "tenant_id": "{tntId}", + "status": "ACTIVE", + "port_id": null, + "id": "{floatIpId}" + } +} \ No newline at end of file diff --git a/test/csit/variables/ovsdb/create_port_dhcp.json b/test/csit/variables/ovsdb/create_port_dhcp.json new file mode 100644 index 0000000000..d1cd66a507 --- /dev/null +++ b/test/csit/variables/ovsdb/create_port_dhcp.json @@ -0,0 +1,26 @@ +{ + "port": { + "binding:host_id": "{BIND_HOST_ID}", + "allowed_address_pairs": [], + "device_owner": "network:dhcp", + "port_security_enabled": false, + "binding:profile": {}, + "fixed_ips": [ + { + "subnet_id": "{subnetId}", + "ip_address": "10.1.0.2" + } + ], + "id": "{dhcpId}", + "security_groups": [], + "device_id": "{dhcpDeviceId}", + "name": "", + "admin_state_up": true, + "network_id": "{netId}", + "tenant_id": "{tntId}", + "binding:vif_details": {}, + "binding:vnic_type": "normal", + "binding:vif_type": "unbound", + "mac_address": "{dhcpMac}" + } +} \ No newline at end of file diff --git a/test/csit/variables/ovsdb/create_port_floating_ip.json b/test/csit/variables/ovsdb/create_port_floating_ip.json new file mode 100644 index 0000000000..26e8352c2d --- /dev/null +++ b/test/csit/variables/ovsdb/create_port_floating_ip.json @@ -0,0 +1,26 @@ +{ + "port": { + "binding:host_id": "", + "allowed_address_pairs": [], + "device_owner": "network:floatingip", + "port_security_enabled": false, + "binding:profile": {}, + "fixed_ips": [ + { + "subnet_id": "{subnetId}", + "ip_address": "192.168.111.22" + } + ], + "id": "{portId}", + "security_groups": [], + "device_id": "{deviceId}", + "name": "", + "admin_state_up": true, + "network_id": "{netId}", + "tenant_id": "", + "binding:vif_details": {}, + "binding:vnic_type": "normal", + "binding:vif_type": "unbound", + "mac_address": "{macAddress}" + } +} \ No newline at end of file diff --git a/test/csit/variables/ovsdb/create_port_rtr_gateway.json b/test/csit/variables/ovsdb/create_port_rtr_gateway.json new file mode 100644 index 0000000000..e9d069ca4e --- /dev/null +++ b/test/csit/variables/ovsdb/create_port_rtr_gateway.json @@ -0,0 +1,26 @@ +{ + "port": { + "binding:host_id": "", + "allowed_address_pairs": [], + "device_owner": "network:router_gateway", + "port_security_enabled": false, + "binding:profile": {}, + "fixed_ips": [ + { + "subnet_id": "{subnetId}", + "ip_address": "192.168.111.21" + } + ], + "id": "{portId}", + "security_groups": [], + "device_id": "{rtrId}", + "name": "", + "admin_state_up": true, + "network_id": "{netId}", + "tenant_id": "", + "binding:vif_details": {}, + "binding:vnic_type": "normal", + "binding:vif_type": "unbound", + "mac_address": "FA:16:3E:7E:A0:D8" + } +} \ No newline at end of file diff --git a/test/csit/variables/ovsdb/create_port_rtr_interface.json b/test/csit/variables/ovsdb/create_port_rtr_interface.json new file mode 100644 index 0000000000..e67428619d --- /dev/null +++ b/test/csit/variables/ovsdb/create_port_rtr_interface.json @@ -0,0 +1,26 @@ +{ + "port": { + "binding:host_id": "", + "allowed_address_pairs": [], + "device_owner": "network:router_interface", + "port_security_enabled": false, + "binding:profile": {}, + "fixed_ips": [ + { + "subnet_id": "{subnetId}", + "ip_address": "10.1.0.1" + } + ], + "id": "{portId}", + "security_groups": [], + "device_id": "{rtrId}", + "name": "", + "admin_state_up": true, + "network_id": "{netId}", + "tenant_id": "{tntId}", + "binding:vif_details": {}, + "binding:vnic_type": "normal", + "binding:vif_type": "unbound", + "mac_address": "FA:16:3E:C0:BD:8B" + } +} \ No newline at end of file diff --git a/test/csit/variables/ovsdb/create_port_vm.json b/test/csit/variables/ovsdb/create_port_vm.json new file mode 100644 index 0000000000..e69b7474ca --- /dev/null +++ b/test/csit/variables/ovsdb/create_port_vm.json @@ -0,0 +1,143 @@ +{ + "port": { + "binding:host_id": "{BIND_HOST_ID}", + "allowed_address_pairs": [], + "device_owner": "compute:None", + "port_security_enabled": true, + "binding:profile": {}, + "fixed_ips": [ + { + "subnet_id": "{subnetId}", + "ip_address": "10.1.0.3" + } + ], + "id": "{portId}", + "security_groups": [ + { + "tenant_id": "{tntId}", + "description": "Default security group", + "id": "970d6a6d-bebf-43a3-85cc-a860fc994333", + "security_group_rules": [ + { + "remote_group_id": null, + "direction": "egress", + "remote_ip_prefix": null, + "protocol": null, + "ethertype": "IPv4", + "tenant_id": "{tntId}", + "port_range_max": null, + "port_range_min": null, + "id": "3f260b84-637a-4edc-8ba6-a5ff36b2ae79", + "security_group_id": "970d6a6d-bebf-43a3-85cc-a860fc994333" + }, + { + "remote_group_id": null, + "direction": "egress", + "remote_ip_prefix": null, + "protocol": null, + "ethertype": "IPv6", + "tenant_id": "{tntId}", + "port_range_max": null, + "port_range_min": null, + "id": "9c3a324a-822d-4a60-b4d9-bc9fc8a890e9", + "security_group_id": "970d6a6d-bebf-43a3-85cc-a860fc994333" + }, + { + "remote_group_id": "970d6a6d-bebf-43a3-85cc-a860fc994333", + "direction": "ingress", + "remote_ip_prefix": null, + "protocol": null, + "ethertype": "IPv6", + "tenant_id": "{tntId}", + "port_range_max": null, + "port_range_min": null, + "id": "a3dc2551-2939-4a0b-8113-bcbce704c0fd", + "security_group_id": "970d6a6d-bebf-43a3-85cc-a860fc994333" + }, + { + "remote_group_id": "970d6a6d-bebf-43a3-85cc-a860fc994333", + "direction": "ingress", + "remote_ip_prefix": null, + "protocol": null, + "ethertype": "IPv4", + "tenant_id": "{tntId}", + "port_range_max": null, + "port_range_min": null, + "id": "efa8f393-1494-4370-87c2-693f1c109190", + "security_group_id": "970d6a6d-bebf-43a3-85cc-a860fc994333" + } + ], + "name": "default" + } + ], + "device_id": "{deviceId}", + "name": "", + "admin_state_up": true, + "network_id": "{netId}", + "tenant_id": "{tntId}", + "binding:vif_details": {}, + "binding:vnic_type": "normal", + "binding:vif_type": "unbound", + "mac_address": "{macAddr}" + } +}HTTP/1.1 201 Created +Content-Type: application/json +Transfer-Encoding: chunked +Server: Jetty(8.1.15.v20140411) + +8CB +{ + "port" : { + "id" : "341ceaca-24bf-4017-9b08-c3180e86fd24", + "network_id" : "12809f83-ccdf-422c-a20a-4ddae0712655", + "name" : "", + "admin_state_up" : true, + "mac_address" : "FA:16:3E:8E:B8:05", + "fixed_ips" : [ { + "ip_address" : "10.1.0.3", + "subnet_id" : "6c496958-a787-4d8c-9465-f4c4176652e8" + } ], + "device_id" : "20e500c3-41e1-4be0-b854-55c710a1cfb2", + "device_owner" : "compute:None", + "tenant_id" : "cde2563ead464ffa97963c59e002c0cf", + "security_groups" : [ { + "id" : "970d6a6d-bebf-43a3-85cc-a860fc994333", + "name" : "default", + "description" : "Default security group", + "tenant_id" : "cde2563ead464ffa97963c59e002c0cf", + "security_group_rules" : [ { + "id" : "3f260b84-637a-4edc-8ba6-a5ff36b2ae79", + "direction" : "egress", + "ethertype" : "IPv4", + "security_group_id" : "970d6a6d-bebf-43a3-85cc-a860fc994333", + "tenant_id" : "cde2563ead464ffa97963c59e002c0cf" + }, { + "id" : "9c3a324a-822d-4a60-b4d9-bc9fc8a890e9", + "direction" : "egress", + "ethertype" : "IPv6", + "security_group_id" : "970d6a6d-bebf-43a3-85cc-a860fc994333", + "tenant_id" : "cde2563ead464ffa97963c59e002c0cf" + }, { + "id" : "a3dc2551-2939-4a0b-8113-bcbce704c0fd", + "direction" : "ingress", + "ethertype" : "IPv6", + "remote_group_id" : "970d6a6d-bebf-43a3-85cc-a860fc994333", + "security_group_id" : "970d6a6d-bebf-43a3-85cc-a860fc994333", + "tenant_id" : "cde2563ead464ffa97963c59e002c0cf" + }, { + "id" : "efa8f393-1494-4370-87c2-693f1c109190", + "direction" : "ingress", + "ethertype" : "IPv4", + "remote_group_id" : "970d6a6d-bebf-43a3-85cc-a860fc994333", + "security_group_id" : "970d6a6d-bebf-43a3-85cc-a860fc994333", + "tenant_id" : "cde2563ead464ffa97963c59e002c0cf" + } ] + } ], + "allowed_address_pairs" : [ ], + "binding:host_id" : "{BIND_HOST_ID}", + "binding:vnic_type" : "normal", + "binding:vif_type" : "unbound", + "binding:vif_details" : [ { + } ] + } +} \ No newline at end of file diff --git a/test/csit/variables/ovsdb/create_router.json b/test/csit/variables/ovsdb/create_router.json new file mode 100644 index 0000000000..c07af59f02 --- /dev/null +++ b/test/csit/variables/ovsdb/create_router.json @@ -0,0 +1,13 @@ +{ + "router": { + "status": "ACTIVE", + "external_gateway_info": null, + "name": "rtr1", + "gw_port_id": null, + "admin_state_up": true, + "routes": [], + "tenant_id": "{tntId}", + "distributed": false, + "id": "{rtrId}" + } +} \ No newline at end of file diff --git a/test/csit/variables/ovsdb/create_tnt_net.json b/test/csit/variables/ovsdb/create_tnt_net.json new file mode 100644 index 0000000000..6d17722733 --- /dev/null +++ b/test/csit/variables/ovsdb/create_tnt_net.json @@ -0,0 +1,14 @@ +{ + "network": { + "name": "{netName}", + "provider:physical_network": null, + "router:external": false, + "tenant_id": "{tntId}", + "admin_state_up": true, + "provider:network_type": "vxlan", + "shared": false, + "port_security_enabled": true, + "id": "{netId}", + "provider:segmentation_id": {netSegm} + } +} \ No newline at end of file diff --git a/test/csit/variables/ovsdb/create_tnt_subnet.json b/test/csit/variables/ovsdb/create_tnt_subnet.json new file mode 100644 index 0000000000..a107d7806b --- /dev/null +++ b/test/csit/variables/ovsdb/create_tnt_subnet.json @@ -0,0 +1,26 @@ +{ + "subnet": { + "name": "{subnetName}", + "enable_dhcp": true, + "network_id": "{netId}", + "tenant_id": "{tntId}", + "dns_nameservers": [ + "192.168.111.254" + ], + "gateway_ip": "10.1.0.1", + "ipv6_ra_mode": null, + "allocation_pools": [ + { + "start": "10.1.0.2", + "end": "10.1.0.254" + } + ], + "host_routes": [], + "shared": false, + "ip_version": 4, + "ipv6_address_mode": null, + "cidr": "10.1.0.0/24", + "id": "{subnetId}", + "subnetpool_id": null + } +} \ No newline at end of file diff --git a/test/csit/variables/ovsdb/update_port_dhcp.json b/test/csit/variables/ovsdb/update_port_dhcp.json new file mode 100644 index 0000000000..c02e012cd5 --- /dev/null +++ b/test/csit/variables/ovsdb/update_port_dhcp.json @@ -0,0 +1,19 @@ +{ +"port": { + "binding:host_id": "{BIND_HOST_ID}", + "allowed_address_pairs": [], + "extra_dhcp_opts": [], + "device_owner": "network:dhcp", + "binding:profile": {}, + "port_security_enabled": false, + "security_groups": [], + "device_id": "{dhcpDeviceId}", + "name": "", + "admin_state_up": true, + "binding:vif_details": { + "port_filter": true + }, + "binding:vnic_type": "normal", + "binding:vif_type": "ovs" + } +} \ No newline at end of file diff --git a/test/csit/variables/ovsdb/update_router_interface.json b/test/csit/variables/ovsdb/update_router_interface.json new file mode 100644 index 0000000000..4301435ac8 --- /dev/null +++ b/test/csit/variables/ovsdb/update_router_interface.json @@ -0,0 +1,6 @@ +{ + "subnet_id": "{subnetId}", + "tenant_id": "{tntId}", + "port_id": "{portId}", + "id": "{rtrId}" +} \ No newline at end of file diff --git a/test/csit/variables/ovsdb/update_router_port_gateway.json b/test/csit/variables/ovsdb/update_router_port_gateway.json new file mode 100644 index 0000000000..b0ae395cbd --- /dev/null +++ b/test/csit/variables/ovsdb/update_router_port_gateway.json @@ -0,0 +1,19 @@ +{ + "router": { + "external_gateway_info": { + "network_id": "{netId}", + "enable_snat": true, + "external_fixed_ips": [ + { + "subnet_id": "{subnetId}", + "ip_address": "192.168.111.21" + } + ] + }, + "name": "rtr1", + "gw_port_id": "{portId}", + "admin_state_up": true, + "distributed": false, + "routes": [] + } +} \ No newline at end of file