Create Session: create a HTTP session to a server
session
http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
auth=${AUTH}
headers=${HEADERS_XML}
Creating Session using : alias=session, url=http://192.16.1.222:8181, headers={u'Content-Type': u'application/xml'}, cookies=None, auth=<requests.auth.HTTPBasicAuth object at 0x7f5c04796090>, timeout=None, proxies=None, verify=False, debug=0
Send a GET request on the session object found using the
session
${MODULES_API}
${resp}
ConnectionError: HTTPConnectionPool(host='192.16.1.222', port=8181): Max retries exceeded with url: /restconf/modules (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5c047961d0>: Failed to establish a new connection: [Errno 111] Connection refused',))
Get the restconf modules, check 200 status and ietf-restconf presence.
ConnectionError: HTTPConnectionPool(host='192.16.1.222', port=8181): Max retries exceeded with url: /restconf/modules (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5c047961d0>: Failed to establish a new connection: [Errno 111] Connection refused',))
Removes all the session objects
Delete All Sessions
Test suite to verify Restconf is OK.
Create Session: create a HTTP session to a server
KeyStoneSession
${KEYSTONEURL}
headers=${HEADERS}
Creating Session using : alias=KeyStoneSession, url=https://192.16.1.222:5000, headers={u'Content-Type': u'application/json'}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0
**Deprecated- See Post Request now**
KeyStoneSession
/v3/auth/tokens
${UserInfo}
${resp}
Deprecation Warning: Use Post Request in the future
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
${resp} = <Response [201]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
201
Argument types are:
<type 'int'>
<type 'unicode'>
Returns a value from the given ``dictionary`` based on the given ``key``.
${resp.headers}
X-Subject-Token
${TOKEN}
${TOKEN} = gAAAAABbmAB8tZwkgeMEcH7NwmpzOuYhbTKSsVn8gKhXELV2vGXGbykUd1xqzQFdM01bErpISGgbgcNt2WE5XyMYn1CQ2SsPWxK9GW1OA0zKWlogpr2ZzNyeiCF8SZXm0pybzJqWp-fm1I82eHIfy39TURgsgeKrIzAWtruXdpxVqZzJgSP2VWI
Creates and returns a dictionary based on the given ``items``.
X-Auth-Token=${TOKEN}
Content-Type=application/json
${X-AUTH}
${X-AUTH} = {u'X-Auth-Token': 'gAAAAABbmAB8tZwkgeMEcH7NwmpzOuYhbTKSsVn8gKhXELV2vGXGbykUd1xqzQFdM01bErpISGgbgcNt2WE5XyMYn1CQ2SsPWxK9GW1OA0zKWlogpr2ZzNyeiCF8SZXm0pybzJqWp-fm1I82eHIfy39TURgsgeKrIzAWtruXdpxVqZzJgSP2V...
Creates and returns a dictionary based on the given ``items``.
X-Auth-Token=${TOKEN}
${X-AUTH-NOCONTENT}
${X-AUTH-NOCONTENT} = {u'X-Auth-Token': 'gAAAAABbmAB8tZwkgeMEcH7NwmpzOuYhbTKSsVn8gKhXELV2vGXGbykUd1xqzQFdM01bErpISGgbgcNt2WE5XyMYn1CQ2SsPWxK9GW1OA0zKWlogpr2ZzNyeiCF8SZXm0pybzJqWp-fm1I82eHIfy39TURgsgeKrIzAWtruXdpxVqZzJgSP2V...
Makes a variable available globally in all tests and suites.
${X-AUTH}
${X-AUTH} = {u'X-Auth-Token': 'gAAAAABbmAB8tZwkgeMEcH7NwmpzOuYhbTKSsVn8gKhXELV2vGXGbykUd1xqzQFdM01bErpISGgbgcNt2WE5XyMYn1CQ2SsPWxK9GW1OA0zKWlogpr2ZzNyeiCF8SZXm0pybzJqWp-fm1I82eHIfy39TURgsgeKrIzAWtruXdpxVqZzJgSP2V...
Makes a variable available globally in all tests and suites.
${X-AUTH-NOCONTENT}
${X-AUTH-NOCONTENT} = {u'X-Auth-Token': 'gAAAAABbmAB8tZwkgeMEcH7NwmpzOuYhbTKSsVn8gKhXELV2vGXGbykUd1xqzQFdM01bErpISGgbgcNt2WE5XyMYn1CQ2SsPWxK9GW1OA0zKWlogpr2ZzNyeiCF8SZXm0pybzJqWp-fm1I82eHIfy39TURgsgeKrIzAWtruXdpxVqZzJgSP2V...
Create Session: create a HTTP session to a server
ODL
http://${ODL_SYSTEM_IP}:${PORT}
headers=${HEADERS}
auth=${AUTH}
Creating Session using : alias=ODL, url=http://192.16.1.222:8080, headers={u'Content-Type': u'application/json'}, cookies=None, auth=<requests.auth.HTTPBasicAuth object at 0x7f5c047ef090>, timeout=None, proxies=None, verify=False, debug=0
Send a GET request on the session object found using the
ODL
${NEUTRON_NETWORKS_API}
${resp}
Get Request using : alias=ODL, uri=/controller/nb/v2/neutron/networks, headers=None json=None
${resp} = <Response [200]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
200
Argument types are:
<type 'int'>
<type 'unicode'>
Get the complete list of networks
reachability
Send a GET request on the session object found using the
ODL
${NEUTRON_SUBNETS_API}
${resp}
Get Request using : alias=ODL, uri=/controller/nb/v2/neutron/subnets, headers=None json=None
${resp} = <Response [200]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
200
Argument types are:
<type 'int'>
<type 'unicode'>
Get the complete list of subnets
reachability
Send a GET request on the session object found using the
ODL
${NEUTRON_PORTS_API}
${resp}
Get Request using : alias=ODL, uri=/controller/nb/v2/neutron/ports, headers=None json=None
${resp} = <Response [200]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
200
Argument types are:
<type 'int'>
<type 'unicode'>
Get the complete list of ports
reachability
Removes all the session objects
Delete All Sessions
Create Session: create a HTTP session to a server
OSSession
${NEUTRONURL}
headers=${X-AUTH}
Creating Session using : alias=OSSession, url=https://192.16.1.222:9696, headers={u'X-Auth-Token': 'gAAAAABbmAB8tZwkgeMEcH7NwmpzOuYhbTKSsVn8gKhXELV2vGXGbykUd1xqzQFdM01bErpISGgbgcNt2WE5XyMYn1CQ2SsPWxK9GW1OA0zKWlogpr2ZzNyeiCF8SZXm0pybzJqWp-fm1I82eHIfy39TURgsgeKrIzAWtruXdpxVqZzJgSP2VWI', u'Content-Type': u'application/json'}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0
Logs the given message with the given level.
${X-AUTH}
{u'X-Auth-Token': 'gAAAAABbmAB8tZwkgeMEcH7NwmpzOuYhbTKSsVn8gKhXELV2vGXGbykUd1xqzQFdM01bErpISGgbgcNt2WE5XyMYn1CQ2SsPWxK9GW1OA0zKWlogpr2ZzNyeiCF8SZXm0pybzJqWp-fm1I82eHIfy39TURgsgeKrIzAWtruXdpxVqZzJgSP2VWI', u'Content-Type': u'application/json'}
Send a GET request on the session object found using the
OSSession
${OSREST}
${resp}
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
Get Request using : alias=OSSession, uri=/v2.0/networks, headers=None json=None
${resp} = <Response [200]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
200
Argument types are:
<type 'int'>
<type 'unicode'>
Convert a string to a JSON object
${resp.content}
${OSResult}
To JSON using : content={"networks":[{"provider:physical_network":"physnet","ipv6_address_scope":null,"revision_number":2,"port_security_enabled":true,"mtu":1500,"id":"ce1850b8-a123-4914-87ad-21978b471b1e","router:external":true,"availability_zone_hints":[],"availability_zones":["nova"],"ipv4_address_scope":null,"shared":false,"project_id":"a634861a18c245398951ded622aeb00c","status":"ACTIVE","subnets":["72a3fde2-4376-4581-8675-146f6e55ba69"],"description":"","tags":[],"updated_at":"2018-09-11T17:39:17Z","is_default":false,"provider:segmentation_id":null,"name":"ext-net","admin_state_up":true,"tenant_id":"a634861a18c245398951ded622aeb00c","created_at":"2018-09-11T17:39:12Z","provider:network_type":"flat"}]}
To JSON using : pretty_print=False
${OSResult} = {u'networks': [{u'provider:physical_network': u'physnet', u'ipv6_address_scope': None, u'revision_number': 2, u'port_security_enabled': True, u'provider:network_type': u'flat', u'id': u'ce1850b8-a123-...
Logs the given message with the given level.
${OSResult}
{u'networks': [{u'provider:physical_network': u'physnet', u'ipv6_address_scope': None, u'revision_number': 2, u'port_security_enabled': True, u'provider:network_type': u'flat', u'id': u'ce1850b8-a123-4914-87ad-21978b471b1e', u'router:external': True, u'availability_zone_hints': [], u'availability_zones': [u'nova'], u'ipv4_address_scope': None, u'shared': False, u'project_id': u'a634861a18c245398951ded622aeb00c', u'status': u'ACTIVE', u'subnets': [u'72a3fde2-4376-4581-8675-146f6e55ba69'], u'description': u'', u'tags': [], u'updated_at': u'2018-09-11T17:39:17Z', u'is_default': False, u'provider:segmentation_id': None, u'name': u'ext-net', u'admin_state_up': True, u'tenant_id': u'a634861a18c245398951ded622aeb00c', u'created_at': u'2018-09-11T17:39:12Z', u'mtu': 1500}]}
Checking OpenStack Neutron for known networks
Network Neutron OpenStack
Create Session: create a HTTP session to a server
ODLSession
http://${ODL_SYSTEM_IP}:${PORT}
headers=${HEADERS}
auth=${AUTH}
Creating Session using : alias=ODLSession, url=http://192.16.1.222:8080, headers={u'Content-Type': u'application/json'}, cookies=None, auth=<requests.auth.HTTPBasicAuth object at 0x7f5c046b0950>, timeout=None, proxies=None, verify=False, debug=0
Send a GET request on the session object found using the
ODLSession
${NEUTRON_NETWORKS_API}
${resp}
Get Request using : alias=ODLSession, uri=/controller/nb/v2/neutron/networks, headers=None json=None
${resp} = <Response [200]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
200
Argument types are:
<type 'int'>
<type 'unicode'>
Convert a string to a JSON object
${resp.content}
${ODLResult}
To JSON using : content={
"networks" : [ {
"id" : "ce1850b8-a123-4914-87ad-21978b471b1e",
"tenant_id" : "a634861a18c245398951ded622aeb00c",
"project_id" : "a634861a18c245398951ded622aeb00c",
"revision_number" : 1,
"name" : "ext-net",
"admin_state_up" : true,
"status" : "ACTIVE",
"shared" : false,
"router:external" : true,
"provider:network_type" : "flat",
"provider:physical_network" : "physnet",
"segments" : [ ]
}, {
"id" : "bd8db3a8-2b30-4083-a8b3-b3fd46401142",
"tenant_id" : "bd8db3a82b304083a8b3b3fd46401142",
"project_id" : "bd8db3a8-2b30-4083-a8b3-b3fd46401142",
"name" : "Sync Canary Network",
"admin_state_up" : false,
"status" : "ACTIVE",
"shared" : false,
"router:external" : false,
"provider:network_type" : "flat",
"segments" : [ ]
} ]
}
To JSON using : pretty_print=False
${ODLResult} = {u'networks': [{u'status': u'ACTIVE', u'router:external': True, u'name': u'ext-net', u'provider:physical_network': u'physnet', u'admin_state_up': True, u'tenant_id': u'a634861a18c245398951ded622aeb00c...
Logs the given message with the given level.
${ODLResult}
{u'networks': [{u'status': u'ACTIVE', u'router:external': True, u'name': u'ext-net', u'provider:physical_network': u'physnet', u'admin_state_up': True, u'tenant_id': u'a634861a18c245398951ded622aeb00c', u'segments': [], u'provider:network_type': u'flat', u'revision_number': 1, u'shared': False, u'project_id': u'a634861a18c245398951ded622aeb00c', u'id': u'ce1850b8-a123-4914-87ad-21978b471b1e'}, {u'status': u'ACTIVE', u'router:external': False, u'name': u'Sync Canary Network', u'admin_state_up': False, u'tenant_id': u'bd8db3a82b304083a8b3b3fd46401142', u'segments': [], u'provider:network_type': u'flat', u'shared': False, u'project_id': u'bd8db3a8-2b30-4083-a8b3-b3fd46401142', u'id': u'bd8db3a8-2b30-4083-a8b3-b3fd46401142'}]}
Checking OpenDaylight Neutron API for known networks
Network Neutron OpenDaylight
Logs the given message with the given level.
${postNet}
{"network":{"name":"odl_network","admin_state_up":true}}
Send a POST request on the session object found using the
OSSession
${OSREST}
data=${postNet}
${resp}
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
Post Request using : alias=OSSession, uri=/v2.0/networks, data=<empty>, headers=None, files=None, allow_redirects=True
${resp} = <Response [201]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
201
Argument types are:
<type 'int'>
<type 'unicode'>
Convert a string to a JSON object
${resp.content}
${result}
To JSON using : content={"network":{"provider:physical_network":null,"ipv6_address_scope":null,"revision_number":1,"port_security_enabled":true,"provider:network_type":"vxlan","id":"4d51e400-7360-4759-9d69-bf9a27d895d5","router:external":false,"availability_zone_hints":[],"availability_zones":[],"ipv4_address_scope":null,"shared":false,"project_id":"a634861a18c245398951ded622aeb00c","status":"ACTIVE","subnets":[],"description":"","tags":[],"updated_at":"2018-09-11T17:50:53Z","is_default":false,"provider:segmentation_id":12,"name":"odl_network","admin_state_up":true,"tenant_id":"a634861a18c245398951ded622aeb00c","created_at":"2018-09-11T17:50:53Z","mtu":1450}}
To JSON using : pretty_print=False
${result} = {u'network': {u'provider:physical_network': None, u'ipv6_address_scope': None, u'revision_number': 1, u'port_security_enabled': True, u'mtu': 1450, u'id': u'4d51e400-7360-4759-9d69-bf9a27d895d5', u'ro...
Returns a value from the given ``dictionary`` based on the given ``key``.
${result}
network
${result}
${result} = {u'provider:physical_network': None, u'ipv6_address_scope': None, u'revision_number': 1, u'port_security_enabled': True, u'mtu': 1450, u'id': u'4d51e400-7360-4759-9d69-bf9a27d895d5', u'router:external...
Returns a value from the given ``dictionary`` based on the given ``key``.
${result}
id
${NETID}
${NETID} = 4d51e400-7360-4759-9d69-bf9a27d895d5
Logs the given message with the given level.
${result}
{u'provider:physical_network': None, u'ipv6_address_scope': None, u'revision_number': 1, u'port_security_enabled': True, u'mtu': 1450, u'id': u'4d51e400-7360-4759-9d69-bf9a27d895d5', u'router:external': False, u'availability_zone_hints': [], u'availability_zones': [], u'ipv4_address_scope': None, u'shared': False, u'project_id': u'a634861a18c245398951ded622aeb00c', u'status': u'ACTIVE', u'subnets': [], u'description': u'', u'tags': [], u'updated_at': u'2018-09-11T17:50:53Z', u'is_default': False, u'provider:segmentation_id': 12, u'name': u'odl_network', u'admin_state_up': True, u'tenant_id': u'a634861a18c245398951ded622aeb00c', u'created_at': u'2018-09-11T17:50:53Z', u'provider:network_type': u'vxlan'}
Logs the given message with the given level.
${NETID}
4d51e400-7360-4759-9d69-bf9a27d895d5
Makes a variable available globally in all tests and suites.
${NETID}
${NETID} = 4d51e400-7360-4759-9d69-bf9a27d895d5
Pauses the test executed for the given time.
2
Slept 2 seconds
Create new network in OpenStack
Create Network OpenStack Neutron
Send a GET request on the session object found using the
ODLSession
${NEUTRON_NETWORKS_API}/${NetID}
${resp}
Get Request using : alias=ODLSession, uri=/controller/nb/v2/neutron/networks/4d51e400-7360-4759-9d69-bf9a27d895d5, headers=None json=None
${resp} = <Response [200]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
200
Argument types are:
<type 'int'>
<type 'unicode'>
Check network created in OpenDaylight
Check
Network OpenDaylight
Removes all the session objects
Delete All Sessions
Checking Network created in OpenStack are pushed to OpenDaylight
Create Session: create a HTTP session to a server
OSSession
${NEUTRONURL}
headers=${X-AUTH}
Creating Session using : alias=OSSession, url=https://192.16.1.222:9696, headers={u'X-Auth-Token': 'gAAAAABbmAB8tZwkgeMEcH7NwmpzOuYhbTKSsVn8gKhXELV2vGXGbykUd1xqzQFdM01bErpISGgbgcNt2WE5XyMYn1CQ2SsPWxK9GW1OA0zKWlogpr2ZzNyeiCF8SZXm0pybzJqWp-fm1I82eHIfy39TURgsgeKrIzAWtruXdpxVqZzJgSP2VWI', u'Content-Type': u'application/json'}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0
Logs the given message with the given level.
${X-AUTH}
{u'X-Auth-Token': 'gAAAAABbmAB8tZwkgeMEcH7NwmpzOuYhbTKSsVn8gKhXELV2vGXGbykUd1xqzQFdM01bErpISGgbgcNt2WE5XyMYn1CQ2SsPWxK9GW1OA0zKWlogpr2ZzNyeiCF8SZXm0pybzJqWp-fm1I82eHIfy39TURgsgeKrIzAWtruXdpxVqZzJgSP2VWI', u'Content-Type': u'application/json'}
Send a GET request on the session object found using the
OSSession
${OSREST}
${resp}
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
Get Request using : alias=OSSession, uri=/v2.0/subnets, headers=None json=None
${resp} = <Response [200]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
200
Argument types are:
<type 'int'>
<type 'unicode'>
Convert a string to a JSON object
${resp.content}
${OSResult}
To JSON using : content={"subnets":[{"service_types":[],"description":"","enable_dhcp":true,"tags":[],"network_id":"ce1850b8-a123-4914-87ad-21978b471b1e","tenant_id":"a634861a18c245398951ded622aeb00c","created_at":"2018-09-11T17:39:17Z","dns_nameservers":[],"updated_at":"2018-09-11T17:39:17Z","ipv6_ra_mode":null,"allocation_pools":[{"start":"192.16.1.101","end":"192.16.1.199"}],"gateway_ip":"192.16.1.1","revision_number":0,"ipv6_address_mode":null,"ip_version":4,"host_routes":[],"cidr":"192.16.1.0/24","project_id":"a634861a18c245398951ded622aeb00c","id":"72a3fde2-4376-4581-8675-146f6e55ba69","subnetpool_id":null,"name":"ext-subnet"}]}
To JSON using : pretty_print=False
${OSResult} = {u'subnets': [{u'host_routes': [], u'service_types': [], u'description': u'', u'enable_dhcp': True, u'tags': [], u'network_id': u'ce1850b8-a123-4914-87ad-21978b471b1e', u'tenant_id': u'a634861a18c2453...
Logs the given message with the given level.
${OSResult}
{u'subnets': [{u'host_routes': [], u'service_types': [], u'description': u'', u'enable_dhcp': True, u'tags': [], u'network_id': u'ce1850b8-a123-4914-87ad-21978b471b1e', u'tenant_id': u'a634861a18c245398951ded622aeb00c', u'created_at': u'2018-09-11T17:39:17Z', u'dns_nameservers': [], u'updated_at': u'2018-09-11T17:39:17Z', u'ipv6_ra_mode': None, u'allocation_pools': [{u'start': u'192.16.1.101', u'end': u'192.16.1.199'}], u'gateway_ip': u'192.16.1.1', u'revision_number': 0, u'ip_version': 4, u'ipv6_address_mode': None, u'cidr': u'192.16.1.0/24', u'project_id': u'a634861a18c245398951ded622aeb00c', u'id': u'72a3fde2-4376-4581-8675-146f6e55ba69', u'subnetpool_id': None, u'name': u'ext-subnet'}]}
Checking OpenStack Neutron for known subnets
Subnets Neutron OpenStack
Create Session: create a HTTP session to a server
ODLSession
http://${ODL_SYSTEM_IP}:${PORT}
headers=${HEADERS}
auth=${AUTH}
Creating Session using : alias=ODLSession, url=http://192.16.1.222:8080, headers={u'Content-Type': u'application/json'}, cookies=None, auth=<requests.auth.HTTPBasicAuth object at 0x7f5c047ef0d0>, timeout=None, proxies=None, verify=False, debug=0
Send a GET request on the session object found using the
ODLSession
${NEUTRON_SUBNETS_API}
${resp}
Get Request using : alias=ODLSession, uri=/controller/nb/v2/neutron/subnets, headers=None json=None
${resp} = <Response [200]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
200
Argument types are:
<type 'int'>
<type 'unicode'>
Convert a string to a JSON object
${resp.content}
${ODLResult}
To JSON using : content={
"subnets" : [ {
"id" : "72a3fde2-4376-4581-8675-146f6e55ba69",
"tenant_id" : "a634861a18c245398951ded622aeb00c",
"project_id" : "a634861a18c245398951ded622aeb00c",
"revision_number" : 0,
"name" : "ext-subnet",
"network_id" : "ce1850b8-a123-4914-87ad-21978b471b1e",
"ip_version" : 4,
"cidr" : "192.16.1.0/24",
"gateway_ip" : "192.16.1.1",
"dns_nameservers" : [ ],
"allocation_pools" : [ {
"start" : "192.16.1.101",
"end" : "192.16.1.199"
} ],
"host_routes" : [ ],
"enable_dhcp" : true,
"ipv6_address_mode" : null,
"ipv6_ra_mode" : null
} ]
}
To JSON using : pretty_print=False
${ODLResult} = {u'subnets': [{u'name': u'ext-subnet', u'enable_dhcp': True, u'network_id': u'ce1850b8-a123-4914-87ad-21978b471b1e', u'tenant_id': u'a634861a18c245398951ded622aeb00c', u'dns_nameservers': [], u'ipv6_r...
Logs the given message with the given level.
${ODLResult}
{u'subnets': [{u'name': u'ext-subnet', u'enable_dhcp': True, u'network_id': u'ce1850b8-a123-4914-87ad-21978b471b1e', u'tenant_id': u'a634861a18c245398951ded622aeb00c', u'dns_nameservers': [], u'ipv6_ra_mode': None, u'allocation_pools': [{u'start': u'192.16.1.101', u'end': u'192.16.1.199'}], u'gateway_ip': u'192.16.1.1', u'revision_number': 0, u'ipv6_address_mode': None, u'ip_version': 4, u'host_routes': [], u'cidr': u'192.16.1.0/24', u'project_id': u'a634861a18c245398951ded622aeb00c', u'id': u'72a3fde2-4376-4581-8675-146f6e55ba69'}]}
Checking OpenDaylight Neutron API for known subnets
Subnets Neutron OpenDaylight
Logs the given message with the given level.
${data}
{"subnet":{"network_id":"4d51e400-7360-4759-9d69-bf9a27d895d5","ip_version":4,"cidr":"172.16.64.0/24","allocation_pools":[{"start":"172.16.64.20","end":"172.16.64.120"}]}}
Send a POST request on the session object found using the
OSSession
${OSREST}
data=${data}
${resp}
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
Post Request using : alias=OSSession, uri=/v2.0/subnets, data=<empty>, headers=None, files=None, allow_redirects=True
${resp} = <Response [201]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
201
Argument types are:
<type 'int'>
<type 'unicode'>
Convert a string to a JSON object
${resp.content}
${result}
To JSON using : content={"subnet":{"service_types":[],"description":"","enable_dhcp":true,"tags":[],"network_id":"4d51e400-7360-4759-9d69-bf9a27d895d5","tenant_id":"a634861a18c245398951ded622aeb00c","created_at":"2018-09-11T17:50:56Z","dns_nameservers":[],"updated_at":"2018-09-11T17:50:56Z","gateway_ip":"172.16.64.1","ipv6_ra_mode":null,"allocation_pools":[{"start":"172.16.64.20","end":"172.16.64.120"}],"host_routes":[],"revision_number":0,"ip_version":4,"ipv6_address_mode":null,"cidr":"172.16.64.0/24","project_id":"a634861a18c245398951ded622aeb00c","id":"479adabf-0d56-4213-bf75-e2b9e47cb897","subnetpool_id":null,"name":""}}
To JSON using : pretty_print=False
${result} = {u'subnet': {u'service_types': [], u'description': u'', u'enable_dhcp': True, u'tags': [], u'network_id': u'4d51e400-7360-4759-9d69-bf9a27d895d5', u'tenant_id': u'a634861a18c245398951ded622aeb00c', u'...
Returns a value from the given ``dictionary`` based on the given ``key``.
${result}
subnet
${result}
${result} = {u'service_types': [], u'description': u'', u'enable_dhcp': True, u'tags': [], u'network_id': u'4d51e400-7360-4759-9d69-bf9a27d895d5', u'tenant_id': u'a634861a18c245398951ded622aeb00c', u'created_at':...
Returns a value from the given ``dictionary`` based on the given ``key``.
${result}
id
${SUBNETID}
${SUBNETID} = 479adabf-0d56-4213-bf75-e2b9e47cb897
Logs the given message with the given level.
${result}
{u'service_types': [], u'description': u'', u'enable_dhcp': True, u'tags': [], u'network_id': u'4d51e400-7360-4759-9d69-bf9a27d895d5', u'tenant_id': u'a634861a18c245398951ded622aeb00c', u'created_at': u'2018-09-11T17:50:56Z', u'dns_nameservers': [], u'updated_at': u'2018-09-11T17:50:56Z', u'ipv6_ra_mode': None, u'allocation_pools': [{u'start': u'172.16.64.20', u'end': u'172.16.64.120'}], u'gateway_ip': u'172.16.64.1', u'revision_number': 0, u'ipv6_address_mode': None, u'ip_version': 4, u'host_routes': [], u'cidr': u'172.16.64.0/24', u'project_id': u'a634861a18c245398951ded622aeb00c', u'id': u'479adabf-0d56-4213-bf75-e2b9e47cb897', u'subnetpool_id': None, u'name': u''}
Logs the given message with the given level.
${SUBNETID}
479adabf-0d56-4213-bf75-e2b9e47cb897
Makes a variable available globally in all tests and suites.
${SUBNETID}
${SUBNETID} = 479adabf-0d56-4213-bf75-e2b9e47cb897
Pauses the test executed for the given time.
2
Slept 2 seconds
Create new subnet in OpenStack
Create Subnet OpenStack Neutron
Send a GET request on the session object found using the
ODLSession
${NEUTRON_SUBNETS_API}/${SUBNETID}
${resp}
Get Request using : alias=ODLSession, uri=/controller/nb/v2/neutron/subnets/479adabf-0d56-4213-bf75-e2b9e47cb897, headers=None json=None
${resp} = <Response [200]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
200
Argument types are:
<type 'int'>
<type 'unicode'>
Check new subnet created in OpenDaylight
Check
subnet OpenDaylight
Removes all the session objects
Delete All Sessions
Checking Subnets created in OpenStack are pushed to OpenDaylight
Create Session: create a HTTP session to a server
OSSession
${NEUTRONURL}
headers=${X-AUTH}
Creating Session using : alias=OSSession, url=https://192.16.1.222:9696, headers={u'X-Auth-Token': 'gAAAAABbmAB8tZwkgeMEcH7NwmpzOuYhbTKSsVn8gKhXELV2vGXGbykUd1xqzQFdM01bErpISGgbgcNt2WE5XyMYn1CQ2SsPWxK9GW1OA0zKWlogpr2ZzNyeiCF8SZXm0pybzJqWp-fm1I82eHIfy39TURgsgeKrIzAWtruXdpxVqZzJgSP2VWI', u'Content-Type': u'application/json'}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0
Logs the given message with the given level.
${X-AUTH}
{u'X-Auth-Token': 'gAAAAABbmAB8tZwkgeMEcH7NwmpzOuYhbTKSsVn8gKhXELV2vGXGbykUd1xqzQFdM01bErpISGgbgcNt2WE5XyMYn1CQ2SsPWxK9GW1OA0zKWlogpr2ZzNyeiCF8SZXm0pybzJqWp-fm1I82eHIfy39TURgsgeKrIzAWtruXdpxVqZzJgSP2VWI', u'Content-Type': u'application/json'}
Send a GET request on the session object found using the
OSSession
${OSREST}
${resp}
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
Get Request using : alias=OSSession, uri=/v2.0/ports, headers=None json=None
${resp} = <Response [200]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
200
Argument types are:
<type 'int'>
<type 'unicode'>
Convert a string to a JSON object
${resp.content}
${OSResult}
To JSON using : content={"ports":[{"allowed_address_pairs":[],"extra_dhcp_opts":[],"updated_at":"2018-09-11T17:39:25Z","device_owner":"network:dhcp","revision_number":3,"port_security_enabled":false,"binding:profile":{},"fixed_ips":[{"subnet_id":"72a3fde2-4376-4581-8675-146f6e55ba69","ip_address":"192.16.1.101"}],"id":"77e8441a-39af-46ce-bd4b-6fb4035f4c6e","security_groups":[],"binding:vif_details":{"support_vhost_user":false,"has_datapath_type_netdev":false,"uuid":"d0dc59e6-0030-453f-9207-e198a07483ca","host_addresses":["host1"]},"binding:vif_type":"ovs","mac_address":"fa:16:3e:d6:c1:23","project_id":"a634861a18c245398951ded622aeb00c","status":"ACTIVE","binding:host_id":"host1","description":"","tags":[],"device_id":"dhcp540ba512-ba2e-5213-b381-56c767787d41-ce1850b8-a123-4914-87ad-21978b471b1e","name":"","admin_state_up":true,"network_id":"ce1850b8-a123-4914-87ad-21978b471b1e","tenant_id":"a634861a18c245398951ded622aeb00c","created_at":"2018-09-11T17:39:18Z","binding:vnic_type":"normal"},{"allowed_address_pairs":[],"extra_dhcp_opts":[],"updated_at":"2018-09-11T17:50:57Z","device_owner":"network:dhcp","revision_number":2,"port_security_enabled":false,"binding:profile":{},"fixed_ips":[{"subnet_id":"479adabf-0d56-4213-bf75-e2b9e47cb897","ip_address":"172.16.64.20"}],"id":"bb18f85f-b8e0-487a-9d1e-56b6a1fa4566","security_groups":[],"binding:vif_details":{"support_vhost_user":false,"has_datapath_type_netdev":false,"uuid":"d0dc59e6-0030-453f-9207-e198a07483ca","host_addresses":["host1"]},"binding:vif_type":"ovs","mac_address":"fa:16:3e:f2:b6:19","project_id":"a634861a18c245398951ded622aeb00c","status":"DOWN","binding:host_id":"host1","description":"","tags":[],"device_id":"dhcp540ba512-ba2e-5213-b381-56c767787d41-4d51e400-7360-4759-9d69-bf9a27d895d5","name":"","admin_state_up":true,"network_id":"4d51e400-7360-4759-9d69-bf9a27d895d5","tenant_id":"a634861a18c245398951ded622aeb00c","created_at":"2018-09-11T17:50:57Z","binding:vnic_type":"normal"}]}
To JSON using : pretty_print=False
${OSResult} = {u'ports': [{u'allowed_address_pairs': [], u'extra_dhcp_opts': [], u'updated_at': u'2018-09-11T17:39:25Z', u'device_owner': u'network:dhcp', u'revision_number': 3, u'port_security_enabled': False, u'b...
Logs the given message with the given level.
${OSResult}
{u'ports': [{u'allowed_address_pairs': [], u'extra_dhcp_opts': [], u'updated_at': u'2018-09-11T17:39:25Z', u'device_owner': u'network:dhcp', u'revision_number': 3, u'port_security_enabled': False, u'binding:profile': {}, u'fixed_ips': [{u'subnet_id': u'72a3fde2-4376-4581-8675-146f6e55ba69', u'ip_address': u'192.16.1.101'}], u'id': u'77e8441a-39af-46ce-bd4b-6fb4035f4c6e', u'security_groups': [], u'binding:vif_details': {u'support_vhost_user': False, u'has_datapath_type_netdev': False, u'uuid': u'd0dc59e6-0030-453f-9207-e198a07483ca', u'host_addresses': [u'host1']}, u'binding:vif_type': u'ovs', u'mac_address': u'fa:16:3e:d6:c1:23', u'project_id': u'a634861a18c245398951ded622aeb00c', u'status': u'ACTIVE', u'binding:host_id': u'host1', u'description': u'', u'tags': [], u'device_id': u'dhcp540ba512-ba2e-5213-b381-56c767787d41-ce1850b8-a123-4914-87ad-21978b471b1e', u'name': u'', u'admin_state_up': True, u'network_id': u'ce1850b8-a123-4914-87ad-21978b471b1e', u'tenant_id': u'a634861a18c245398951ded622aeb00c', u'created_at': u'2018-09-11T17:39:18Z', u'binding:vnic_type': u'normal'}, {u'allowed_address_pairs': [], u'extra_dhcp_opts': [], u'updated_at': u'2018-09-11T17:50:57Z', u'device_owner': u'network:dhcp', u'revision_number': 2, u'port_security_enabled': False, u'binding:profile': {}, u'fixed_ips': [{u'subnet_id': u'479adabf-0d56-4213-bf75-e2b9e47cb897', u'ip_address': u'172.16.64.20'}], u'id': u'bb18f85f-b8e0-487a-9d1e-56b6a1fa4566', u'security_groups': [], u'binding:vif_details': {u'support_vhost_user': False, u'has_datapath_type_netdev': False, u'uuid': u'd0dc59e6-0030-453f-9207-e198a07483ca', u'host_addresses': [u'host1']}, u'binding:vif_type': u'ovs', u'mac_address': u'fa:16:3e:f2:b6:19', u'project_id': u'a634861a18c245398951ded622aeb00c', u'status': u'DOWN', u'binding:host_id': u'host1', u'description': u'', u'tags': [], u'device_id': u'dhcp540ba512-ba2e-5213-b381-56c767787d41-4d51e400-7360-4759-9d69-bf9a27d895d5', u'name': u'', u'admin_state_up': True, u'network_id': u'4d51e400-7360-4759-9d69-bf9a27d895d5', u'tenant_id': u'a634861a18c245398951ded622aeb00c', u'created_at': u'2018-09-11T17:50:57Z', u'binding:vnic_type': u'normal'}]}
Checking OpenStack Neutron for known ports
Ports Neutron OpenStack
Create Session: create a HTTP session to a server
ODLSession
http://${ODL_SYSTEM_IP}:${PORT}
headers=${HEADERS}
auth=${AUTH}
Creating Session using : alias=ODLSession, url=http://192.16.1.222:8080, headers={u'Content-Type': u'application/json'}, cookies=None, auth=<requests.auth.HTTPBasicAuth object at 0x7f5c04671a90>, timeout=None, proxies=None, verify=False, debug=0
Send a GET request on the session object found using the
ODLSession
${NEUTRON_PORTS_API}
${resp}
Get Request using : alias=ODLSession, uri=/controller/nb/v2/neutron/ports, headers=None json=None
${resp} = <Response [200]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
200
Argument types are:
<type 'int'>
<type 'unicode'>
Convert a string to a JSON object
${resp.content}
${ODLResult}
To JSON using : content={
"ports" : [ {
"id" : "bb18f85f-b8e0-487a-9d1e-56b6a1fa4566",
"tenant_id" : "a634861a18c245398951ded622aeb00c",
"revision_number" : 1,
"name" : "",
"admin_state_up" : true,
"network_id" : "4d51e400-7360-4759-9d69-bf9a27d895d5",
"mac_address" : "fa:16:3e:f2:b6:19",
"fixed_ips" : [ {
"ip_address" : "172.16.64.20",
"subnet_id" : "479adabf-0d56-4213-bf75-e2b9e47cb897"
} ],
"device_id" : "dhcp540ba512-ba2e-5213-b381-56c767787d41-4d51e400-7360-4759-9d69-bf9a27d895d5",
"device_owner" : "network:dhcp",
"security_groups" : [ ],
"allowed_address_pairs" : [ ],
"binding:host_id" : "host1",
"binding:vnic_type" : "normal",
"binding:vif_type" : "ovs",
"Map" : {
"uuid" : "d0dc59e6-0030-453f-9207-e198a07483ca",
"support_vhost_user" : "false",
"has_datapath_type_netdev" : "false"
},
"extra_dhcp_opts" : [ ],
"port_security_enabled" : false
}, {
"id" : "77e8441a-39af-46ce-bd4b-6fb4035f4c6e",
"tenant_id" : "a634861a18c245398951ded622aeb00c",
"revision_number" : 3,
"name" : "",
"admin_state_up" : true,
"network_id" : "ce1850b8-a123-4914-87ad-21978b471b1e",
"mac_address" : "fa:16:3e:d6:c1:23",
"fixed_ips" : [ {
"ip_address" : "192.16.1.101",
"subnet_id" : "72a3fde2-4376-4581-8675-146f6e55ba69"
} ],
"device_id" : "dhcp540ba512-ba2e-5213-b381-56c767787d41-ce1850b8-a123-4914-87ad-21978b471b1e",
"device_owner" : "network:dhcp",
"security_groups" : [ ],
"allowed_address_pairs" : [ ],
"binding:host_id" : "host1",
"binding:vnic_type" : "normal",
"binding:vif_type" : "ovs",
"Map" : {
"uuid" : "d0dc59e6-0030-453f-9207-e198a07483ca",
"support_vhost_user" : "false",
"has_datapath_type_netdev" : "false"
},
"extra_dhcp_opts" : [ ],
"port_security_enabled" : false
} ]
}
To JSON using : pretty_print=False
${ODLResult} = {u'ports': [{u'Map': {u'support_vhost_user': u'false', u'has_datapath_type_netdev': u'false', u'uuid': u'd0dc59e6-0030-453f-9207-e198a07483ca'}, u'binding:host_id': u'host1', u'name': u'', u'allowed_a...
Logs the given message with the given level.
${ODLResult}
{u'ports': [{u'Map': {u'support_vhost_user': u'false', u'has_datapath_type_netdev': u'false', u'uuid': u'd0dc59e6-0030-453f-9207-e198a07483ca'}, u'binding:host_id': u'host1', u'name': u'', u'allowed_address_pairs': [], u'admin_state_up': True, u'network_id': u'4d51e400-7360-4759-9d69-bf9a27d895d5', u'tenant_id': u'a634861a18c245398951ded622aeb00c', u'extra_dhcp_opts': [], u'binding:vnic_type': u'normal', u'binding:vif_type': u'ovs', u'device_owner': u'network:dhcp', u'revision_number': 1, u'mac_address': u'fa:16:3e:f2:b6:19', u'port_security_enabled': False, u'fixed_ips': [{u'subnet_id': u'479adabf-0d56-4213-bf75-e2b9e47cb897', u'ip_address': u'172.16.64.20'}], u'id': u'bb18f85f-b8e0-487a-9d1e-56b6a1fa4566', u'security_groups': [], u'device_id': u'dhcp540ba512-ba2e-5213-b381-56c767787d41-4d51e400-7360-4759-9d69-bf9a27d895d5'}, {u'Map': {u'support_vhost_user': u'false', u'has_datapath_type_netdev': u'false', u'uuid': u'd0dc59e6-0030-453f-9207-e198a07483ca'}, u'binding:host_id': u'host1', u'name': u'', u'allowed_address_pairs': [], u'admin_state_up': True, u'network_id': u'ce1850b8-a123-4914-87ad-21978b471b1e', u'tenant_id': u'a634861a18c245398951ded622aeb00c', u'extra_dhcp_opts': [], u'binding:vnic_type': u'normal', u'binding:vif_type': u'ovs', u'device_owner': u'network:dhcp', u'revision_number': 3, u'mac_address': u'fa:16:3e:d6:c1:23', u'port_security_enabled': False, u'fixed_ips': [{u'subnet_id': u'72a3fde2-4376-4581-8675-146f6e55ba69', u'ip_address': u'192.16.1.101'}], u'id': u'77e8441a-39af-46ce-bd4b-6fb4035f4c6e', u'security_groups': [], u'device_id': u'dhcp540ba512-ba2e-5213-b381-56c767787d41-ce1850b8-a123-4914-87ad-21978b471b1e'}]}
Checking OpenDaylight Neutron API for known ports
Ports Neutron OpenDaylight
Logs the given message with the given level.
${data}
{"port":{"network_id":"4d51e400-7360-4759-9d69-bf9a27d895d5","admin_state_up": true}}
Send a POST request on the session object found using the
OSSession
${OSREST}
data=${data}
${resp}
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
Post Request using : alias=OSSession, uri=/v2.0/ports, data=<empty>, headers=None, files=None, allow_redirects=True
${resp} = <Response [201]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
201
Argument types are:
<type 'int'>
<type 'unicode'>
Convert a string to a JSON object
${resp.content}
${result}
To JSON using : content={"port":{"allowed_address_pairs":[],"extra_dhcp_opts":[],"updated_at":"2018-09-11T17:50:59Z","device_owner":"","revision_number":1,"binding:profile":{},"port_security_enabled":true,"fixed_ips":[{"subnet_id":"479adabf-0d56-4213-bf75-e2b9e47cb897","ip_address":"172.16.64.42"}],"id":"fff4df16-dbe7-4012-bc87-df61da2c2a56","security_groups":["66d343ec-d564-4fa4-acee-5eede43c9ff3"],"binding:vif_details":{},"binding:vif_type":"unbound","mac_address":"fa:16:3e:3e:f2:10","project_id":"a634861a18c245398951ded622aeb00c","status":"DOWN","binding:host_id":"","description":"","tags":[],"device_id":"","name":"","admin_state_up":true,"network_id":"4d51e400-7360-4759-9d69-bf9a27d895d5","tenant_id":"a634861a18c245398951ded622aeb00c","created_at":"2018-09-11T17:50:59Z","binding:vnic_type":"normal"}}
To JSON using : pretty_print=False
${result} = {u'port': {u'allowed_address_pairs': [], u'extra_dhcp_opts': [], u'updated_at': u'2018-09-11T17:50:59Z', u'device_owner': u'', u'revision_number': 1, u'binding:profile': {}, u'port_security_enabled': ...
Returns a value from the given ``dictionary`` based on the given ``key``.
${result}
port
${result}
${result} = {u'allowed_address_pairs': [], u'extra_dhcp_opts': [], u'updated_at': u'2018-09-11T17:50:59Z', u'device_owner': u'', u'revision_number': 1, u'binding:profile': {}, u'port_security_enabled': True, u'fi...
Returns a value from the given ``dictionary`` based on the given ``key``.
${result}
id
${PORTID}
${PORTID} = fff4df16-dbe7-4012-bc87-df61da2c2a56
Logs the given message with the given level.
${result}
{u'allowed_address_pairs': [], u'extra_dhcp_opts': [], u'updated_at': u'2018-09-11T17:50:59Z', u'device_owner': u'', u'revision_number': 1, u'binding:profile': {}, u'port_security_enabled': True, u'fixed_ips': [{u'subnet_id': u'479adabf-0d56-4213-bf75-e2b9e47cb897', u'ip_address': u'172.16.64.42'}], u'id': u'fff4df16-dbe7-4012-bc87-df61da2c2a56', u'security_groups': [u'66d343ec-d564-4fa4-acee-5eede43c9ff3'], u'binding:vif_details': {}, u'binding:vif_type': u'unbound', u'mac_address': u'fa:16:3e:3e:f2:10', u'project_id': u'a634861a18c245398951ded622aeb00c', u'status': u'DOWN', u'binding:host_id': u'', u'description': u'', u'tags': [], u'device_id': u'', u'name': u'', u'admin_state_up': True, u'network_id': u'4d51e400-7360-4759-9d69-bf9a27d895d5', u'tenant_id': u'a634861a18c245398951ded622aeb00c', u'created_at': u'2018-09-11T17:50:59Z', u'binding:vnic_type': u'normal'}
Logs the given message with the given level.
${PORTID}
fff4df16-dbe7-4012-bc87-df61da2c2a56
Makes a variable available globally in all tests and suites.
${PORTID}
${PORTID} = fff4df16-dbe7-4012-bc87-df61da2c2a56
Pauses the test executed for the given time.
2
Slept 2 seconds
Create new port in OpenStack
Create port OpenStack Neutron
Send a GET request on the session object found using the
ODLSession
${NEUTRON_PORTS_API}/${PORTID}
${resp}
Get Request using : alias=ODLSession, uri=/controller/nb/v2/neutron/ports/fff4df16-dbe7-4012-bc87-df61da2c2a56, headers=None json=None
${resp} = <Response [200]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
200
Argument types are:
<type 'int'>
<type 'unicode'>
Check new port created in OpenDaylight
Check port OpenDaylight
Removes all the session objects
Delete All Sessions
Checking Port created in OpenStack are pushed to OpenDaylight
Create Session: create a HTTP session to a server
OSSession
${NEUTRONURL}
headers=${X-AUTH-NOCONTENT}
Creating Session using : alias=OSSession, url=https://192.16.1.222:9696, headers={u'X-Auth-Token': 'gAAAAABbmAB8tZwkgeMEcH7NwmpzOuYhbTKSsVn8gKhXELV2vGXGbykUd1xqzQFdM01bErpISGgbgcNt2WE5XyMYn1CQ2SsPWxK9GW1OA0zKWlogpr2ZzNyeiCF8SZXm0pybzJqWp-fm1I82eHIfy39TURgsgeKrIzAWtruXdpxVqZzJgSP2VWI'}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0
Create Session: create a HTTP session to a server
ODLSession
http://${ODL_SYSTEM_IP}:${PORT}
headers=${HEADERS}
auth=${AUTH}
Creating Session using : alias=ODLSession, url=http://192.16.1.222:8080, headers={u'Content-Type': u'application/json'}, cookies=None, auth=<requests.auth.HTTPBasicAuth object at 0x7f5c0460ff10>, timeout=None, proxies=None, verify=False, debug=0
${PORTID}
Send a GET request on the session object found using the
ODLSession
${NEUTRON_PORTS_API}/${portid}
${resp}
Get Request using : alias=ODLSession, uri=/controller/nb/v2/neutron/ports/fff4df16-dbe7-4012-bc87-df61da2c2a56, headers=None json=None
${resp} = <Response [200]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
200
Argument types are:
<type 'int'>
<type 'unicode'>
Logs the given message with the given level.
${data}
{"port":{"network_id":"4d51e400-7360-4759-9d69-bf9a27d895d5","admin_state_up": true}}
Send a DELETE request on the session object found using the
OSSession
${OSREST}
${resp}
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
Delete Request using : alias=OSSession, uri=/v2.0/ports/fff4df16-dbe7-4012-bc87-df61da2c2a56, data=(), headers=None, allow_redirects=True
${resp} = <Response [204]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
204
Argument types are:
<type 'int'>
<type 'unicode'>
Logs the given message with the given level.
${resp.content}
Pauses the test executed for the given time.
2
Slept 2 seconds
Delete previously created port in OpenStack
Delete port OpenStack Neutron
Send a GET request on the session object found using the
ODLSession
${NEUTRON_PORTS_API}
${resp}
Get Request using : alias=ODLSession, uri=/controller/nb/v2/neutron/ports, headers=None json=None
${resp} = <Response [200]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
200
Argument types are:
<type 'int'>
<type 'unicode'>
Convert a string to a JSON object
${resp.content}
${ODLResult}
To JSON using : content={
"ports" : [ {
"id" : "bb18f85f-b8e0-487a-9d1e-56b6a1fa4566",
"tenant_id" : "a634861a18c245398951ded622aeb00c",
"revision_number" : 3,
"name" : "",
"admin_state_up" : true,
"network_id" : "4d51e400-7360-4759-9d69-bf9a27d895d5",
"mac_address" : "fa:16:3e:f2:b6:19",
"fixed_ips" : [ {
"ip_address" : "172.16.64.20",
"subnet_id" : "479adabf-0d56-4213-bf75-e2b9e47cb897"
} ],
"device_id" : "dhcp540ba512-ba2e-5213-b381-56c767787d41-4d51e400-7360-4759-9d69-bf9a27d895d5",
"device_owner" : "network:dhcp",
"security_groups" : [ ],
"allowed_address_pairs" : [ ],
"binding:host_id" : "host1",
"binding:vnic_type" : "normal",
"binding:vif_type" : "ovs",
"Map" : {
"uuid" : "d0dc59e6-0030-453f-9207-e198a07483ca",
"support_vhost_user" : "false",
"has_datapath_type_netdev" : "false"
},
"extra_dhcp_opts" : [ ],
"port_security_enabled" : false
}, {
"id" : "77e8441a-39af-46ce-bd4b-6fb4035f4c6e",
"tenant_id" : "a634861a18c245398951ded622aeb00c",
"revision_number" : 3,
"name" : "",
"admin_state_up" : true,
"network_id" : "ce1850b8-a123-4914-87ad-21978b471b1e",
"mac_address" : "fa:16:3e:d6:c1:23",
"fixed_ips" : [ {
"ip_address" : "192.16.1.101",
"subnet_id" : "72a3fde2-4376-4581-8675-146f6e55ba69"
} ],
"device_id" : "dhcp540ba512-ba2e-5213-b381-56c767787d41-ce1850b8-a123-4914-87ad-21978b471b1e",
"device_owner" : "network:dhcp",
"security_groups" : [ ],
"allowed_address_pairs" : [ ],
"binding:host_id" : "host1",
"binding:vnic_type" : "normal",
"binding:vif_type" : "ovs",
"Map" : {
"uuid" : "d0dc59e6-0030-453f-9207-e198a07483ca",
"support_vhost_user" : "false",
"has_datapath_type_netdev" : "false"
},
"extra_dhcp_opts" : [ ],
"port_security_enabled" : false
} ]
}
To JSON using : pretty_print=False
${ODLResult} = {u'ports': [{u'Map': {u'support_vhost_user': u'false', u'has_datapath_type_netdev': u'false', u'uuid': u'd0dc59e6-0030-453f-9207-e198a07483ca'}, u'binding:host_id': u'host1', u'name': u'', u'allowed_a...
Logs the given message with the given level.
${ODLResult}
{u'ports': [{u'Map': {u'support_vhost_user': u'false', u'has_datapath_type_netdev': u'false', u'uuid': u'd0dc59e6-0030-453f-9207-e198a07483ca'}, u'binding:host_id': u'host1', u'name': u'', u'allowed_address_pairs': [], u'admin_state_up': True, u'network_id': u'4d51e400-7360-4759-9d69-bf9a27d895d5', u'tenant_id': u'a634861a18c245398951ded622aeb00c', u'extra_dhcp_opts': [], u'binding:vnic_type': u'normal', u'binding:vif_type': u'ovs', u'device_owner': u'network:dhcp', u'revision_number': 3, u'mac_address': u'fa:16:3e:f2:b6:19', u'port_security_enabled': False, u'fixed_ips': [{u'subnet_id': u'479adabf-0d56-4213-bf75-e2b9e47cb897', u'ip_address': u'172.16.64.20'}], u'id': u'bb18f85f-b8e0-487a-9d1e-56b6a1fa4566', u'security_groups': [], u'device_id': u'dhcp540ba512-ba2e-5213-b381-56c767787d41-4d51e400-7360-4759-9d69-bf9a27d895d5'}, {u'Map': {u'support_vhost_user': u'false', u'has_datapath_type_netdev': u'false', u'uuid': u'd0dc59e6-0030-453f-9207-e198a07483ca'}, u'binding:host_id': u'host1', u'name': u'', u'allowed_address_pairs': [], u'admin_state_up': True, u'network_id': u'ce1850b8-a123-4914-87ad-21978b471b1e', u'tenant_id': u'a634861a18c245398951ded622aeb00c', u'extra_dhcp_opts': [], u'binding:vnic_type': u'normal', u'binding:vif_type': u'ovs', u'device_owner': u'network:dhcp', u'revision_number': 3, u'mac_address': u'fa:16:3e:d6:c1:23', u'port_security_enabled': False, u'fixed_ips': [{u'subnet_id': u'72a3fde2-4376-4581-8675-146f6e55ba69', u'ip_address': u'192.16.1.101'}], u'id': u'77e8441a-39af-46ce-bd4b-6fb4035f4c6e', u'security_groups': [], u'device_id': u'dhcp540ba512-ba2e-5213-b381-56c767787d41-ce1850b8-a123-4914-87ad-21978b471b1e'}]}
Send a GET request on the session object found using the
ODLSession
${NEUTRON_PORTS_API}/${PORTID}
${resp}
Get Request using : alias=ODLSession, uri=/controller/nb/v2/neutron/ports/fff4df16-dbe7-4012-bc87-df61da2c2a56, headers=None json=None
${resp} = <Response [404]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
404
Argument types are:
<type 'int'>
<type 'unicode'>
Check port deleted in OpenDaylight
Check port deleted OpenDaylight
Removes all the session objects
Delete All Sessions
Checking Port deleted in OpenStack are deleted also in OpenDaylight
Create Session: create a HTTP session to a server
OSSession
${NEUTRONURL}
headers=${X-AUTH-NOCONTENT}
Creating Session using : alias=OSSession, url=https://192.16.1.222:9696, headers={u'X-Auth-Token': 'gAAAAABbmAB8tZwkgeMEcH7NwmpzOuYhbTKSsVn8gKhXELV2vGXGbykUd1xqzQFdM01bErpISGgbgcNt2WE5XyMYn1CQ2SsPWxK9GW1OA0zKWlogpr2ZzNyeiCF8SZXm0pybzJqWp-fm1I82eHIfy39TURgsgeKrIzAWtruXdpxVqZzJgSP2VWI'}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0
Create Session: create a HTTP session to a server
ODLSession
http://${ODL_SYSTEM_IP}:${PORT}
headers=${HEADERS}
auth=${AUTH}
Creating Session using : alias=ODLSession, url=http://192.16.1.222:8080, headers={u'Content-Type': u'application/json'}, cookies=None, auth=<requests.auth.HTTPBasicAuth object at 0x7f5c04659990>, timeout=None, proxies=None, verify=False, debug=0
${SUBNETID}
Send a GET request on the session object found using the
ODLSession
${NEUTRON_SUBNETS_API}/${subnetid}
${resp}
Get Request using : alias=ODLSession, uri=/controller/nb/v2/neutron/subnets/479adabf-0d56-4213-bf75-e2b9e47cb897, headers=None json=None
${resp} = <Response [200]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
200
Argument types are:
<type 'int'>
<type 'unicode'>
Logs the given message with the given level.
${data}
{"subnet":{"network_id":"4d51e400-7360-4759-9d69-bf9a27d895d5","ip_version":4,"cidr":"172.16.64.0/24","allocation_pools":[{"start":"172.16.64.20","end":"172.16.64.120"}]}}
Send a DELETE request on the session object found using the
OSSession
${OSREST}
${resp}
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
Delete Request using : alias=OSSession, uri=/v2.0/subnets/479adabf-0d56-4213-bf75-e2b9e47cb897, data=(), headers=None, allow_redirects=True
${resp} = <Response [204]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
204
Argument types are:
<type 'int'>
<type 'unicode'>
Logs the given message with the given level.
${resp.content}
Pauses the test executed for the given time.
2
Slept 2 seconds
Delete previously created subnet in OpenStack
Delete Subnet OpenStack Neutron
Send a GET request on the session object found using the
ODLSession
${NEUTRON_SUBNETS_API}
${resp}
Get Request using : alias=ODLSession, uri=/controller/nb/v2/neutron/subnets, headers=None json=None
${resp} = <Response [200]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
200
Argument types are:
<type 'int'>
<type 'unicode'>
Convert a string to a JSON object
${resp.content}
${ODLResult}
To JSON using : content={
"subnets" : [ {
"id" : "72a3fde2-4376-4581-8675-146f6e55ba69",
"tenant_id" : "a634861a18c245398951ded622aeb00c",
"project_id" : "a634861a18c245398951ded622aeb00c",
"revision_number" : 0,
"name" : "ext-subnet",
"network_id" : "ce1850b8-a123-4914-87ad-21978b471b1e",
"ip_version" : 4,
"cidr" : "192.16.1.0/24",
"gateway_ip" : "192.16.1.1",
"dns_nameservers" : [ ],
"allocation_pools" : [ {
"start" : "192.16.1.101",
"end" : "192.16.1.199"
} ],
"host_routes" : [ ],
"enable_dhcp" : true,
"ipv6_address_mode" : null,
"ipv6_ra_mode" : null
} ]
}
To JSON using : pretty_print=False
${ODLResult} = {u'subnets': [{u'name': u'ext-subnet', u'enable_dhcp': True, u'network_id': u'ce1850b8-a123-4914-87ad-21978b471b1e', u'tenant_id': u'a634861a18c245398951ded622aeb00c', u'dns_nameservers': [], u'ipv6_r...
Logs the given message with the given level.
${ODLResult}
{u'subnets': [{u'name': u'ext-subnet', u'enable_dhcp': True, u'network_id': u'ce1850b8-a123-4914-87ad-21978b471b1e', u'tenant_id': u'a634861a18c245398951ded622aeb00c', u'dns_nameservers': [], u'ipv6_ra_mode': None, u'allocation_pools': [{u'start': u'192.16.1.101', u'end': u'192.16.1.199'}], u'gateway_ip': u'192.16.1.1', u'revision_number': 0, u'ipv6_address_mode': None, u'ip_version': 4, u'host_routes': [], u'cidr': u'192.16.1.0/24', u'project_id': u'a634861a18c245398951ded622aeb00c', u'id': u'72a3fde2-4376-4581-8675-146f6e55ba69'}]}
Send a GET request on the session object found using the
ODLSession
${NEUTRON_SUBNETS_API}/${SUBNETID}
${resp}
Get Request using : alias=ODLSession, uri=/controller/nb/v2/neutron/subnets/479adabf-0d56-4213-bf75-e2b9e47cb897, headers=None json=None
${resp} = <Response [404]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
404
Argument types are:
<type 'int'>
<type 'unicode'>
Check subnet deleted in OpenDaylight
Check subnet deleted OpenDaylight
Removes all the session objects
Delete All Sessions
Checking Subnets deleted in OpenStack are deleted also in OpenDaylight
Create Session: create a HTTP session to a server
OSSession
${NEUTRONURL}
headers=${X-AUTH-NOCONTENT}
Creating Session using : alias=OSSession, url=https://192.16.1.222:9696, headers={u'X-Auth-Token': 'gAAAAABbmAB8tZwkgeMEcH7NwmpzOuYhbTKSsVn8gKhXELV2vGXGbykUd1xqzQFdM01bErpISGgbgcNt2WE5XyMYn1CQ2SsPWxK9GW1OA0zKWlogpr2ZzNyeiCF8SZXm0pybzJqWp-fm1I82eHIfy39TURgsgeKrIzAWtruXdpxVqZzJgSP2VWI'}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0
Create Session: create a HTTP session to a server
ODLSession
http://${ODL_SYSTEM_IP}:${PORT}
headers=${HEADERS}
auth=${AUTH}
Creating Session using : alias=ODLSession, url=http://192.16.1.222:8080, headers={u'Content-Type': u'application/json'}, cookies=None, auth=<requests.auth.HTTPBasicAuth object at 0x7f5c04671850>, timeout=None, proxies=None, verify=False, debug=0
${NETID}
Send a GET request on the session object found using the
ODLSession
${NEUTRON_NETWORKS_API}/${netid}
${resp}
Get Request using : alias=ODLSession, uri=/controller/nb/v2/neutron/networks/4d51e400-7360-4759-9d69-bf9a27d895d5, headers=None json=None
${resp} = <Response [200]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
200
Argument types are:
<type 'int'>
<type 'unicode'>
Logs the given message with the given level.
${postNet}
{"network":{"name":"odl_network","admin_state_up":true}}
Send a DELETE request on the session object found using the
OSSession
${OSREST}
${resp}
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
Delete Request using : alias=OSSession, uri=/v2.0/networks/4d51e400-7360-4759-9d69-bf9a27d895d5, data=(), headers=None, allow_redirects=True
${resp} = <Response [204]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
204
Argument types are:
<type 'int'>
<type 'unicode'>
Logs the given message with the given level.
${resp.content}
Pauses the test executed for the given time.
2
Slept 2 seconds
Delete network in OpenStack
Delete Network OpenStack Neutron
Send a GET request on the session object found using the
ODLSession
${NEUTRON_NETWORKS_API}
${resp}
Get Request using : alias=ODLSession, uri=/controller/nb/v2/neutron/networks, headers=None json=None
${resp} = <Response [200]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
200
Argument types are:
<type 'int'>
<type 'unicode'>
Convert a string to a JSON object
${resp.content}
${ODLResult}
To JSON using : content={
"networks" : [ {
"id" : "bd8db3a8-2b30-4083-a8b3-b3fd46401142",
"tenant_id" : "bd8db3a82b304083a8b3b3fd46401142",
"project_id" : "bd8db3a8-2b30-4083-a8b3-b3fd46401142",
"name" : "Sync Canary Network",
"admin_state_up" : false,
"status" : "ACTIVE",
"shared" : false,
"router:external" : false,
"provider:network_type" : "flat",
"segments" : [ ]
}, {
"id" : "ce1850b8-a123-4914-87ad-21978b471b1e",
"tenant_id" : "a634861a18c245398951ded622aeb00c",
"project_id" : "a634861a18c245398951ded622aeb00c",
"revision_number" : 1,
"name" : "ext-net",
"admin_state_up" : true,
"status" : "ACTIVE",
"shared" : false,
"router:external" : true,
"provider:network_type" : "flat",
"provider:physical_network" : "physnet",
"segments" : [ ]
} ]
}
To JSON using : pretty_print=False
${ODLResult} = {u'networks': [{u'status': u'ACTIVE', u'router:external': False, u'name': u'Sync Canary Network', u'admin_state_up': False, u'tenant_id': u'bd8db3a82b304083a8b3b3fd46401142', u'segments': [], u'provid...
Logs the given message with the given level.
${ODLResult}
{u'networks': [{u'status': u'ACTIVE', u'router:external': False, u'name': u'Sync Canary Network', u'admin_state_up': False, u'tenant_id': u'bd8db3a82b304083a8b3b3fd46401142', u'segments': [], u'provider:network_type': u'flat', u'shared': False, u'project_id': u'bd8db3a8-2b30-4083-a8b3-b3fd46401142', u'id': u'bd8db3a8-2b30-4083-a8b3-b3fd46401142'}, {u'status': u'ACTIVE', u'router:external': True, u'name': u'ext-net', u'provider:physical_network': u'physnet', u'admin_state_up': True, u'tenant_id': u'a634861a18c245398951ded622aeb00c', u'segments': [], u'provider:network_type': u'flat', u'revision_number': 1, u'shared': False, u'project_id': u'a634861a18c245398951ded622aeb00c', u'id': u'ce1850b8-a123-4914-87ad-21978b471b1e'}]}
Send a GET request on the session object found using the
ODLSession
${NEUTRON_NETWORKS_API}/${NETID}
${resp}
Get Request using : alias=ODLSession, uri=/controller/nb/v2/neutron/networks/4d51e400-7360-4759-9d69-bf9a27d895d5, headers=None json=None
${resp} = <Response [404]>
Fails if objects are unequal after converting them to strings.
${resp.status_code}
404
Argument types are:
<type 'int'>
<type 'unicode'>
Check network deleted in OpenDaylight
Check Network OpenDaylight
Removes all the session objects
Delete All Sessions
Checking Network deleted in OpenStack are deleted also in OpenDaylight
Removes all the session objects
Delete All Sessions
Test suite for Neutron Plugin
Critical Tests
All Tests
Check
Check Network OpenDaylight
Check port deleted OpenDaylight
Check port OpenDaylight
Check subnet deleted OpenDaylight
Create Network OpenStack Neutron
Create port OpenStack Neutron
Create Subnet OpenStack Neutron
Delete Network OpenStack Neutron
Delete port OpenStack Neutron
Delete Subnet OpenStack Neutron
Network Neutron OpenDaylight
Network Neutron OpenStack
Network OpenDaylight
Ports Neutron OpenDaylight
Ports Neutron OpenStack
reachability
subnet OpenDaylight
Subnets Neutron OpenDaylight
Subnets Neutron OpenStack
Basic & Neutron
Basic & Neutron.Basic
Basic & Neutron.Basic.Restconf Modules
Basic & Neutron.Neutron
Basic & Neutron.Neutron.Reachability
Basic & Neutron.Neutron.Networks
Basic & Neutron.Neutron.Subnets
Basic & Neutron.Neutron.Ports
Basic & Neutron.Neutron.Delete Ports
Basic & Neutron.Neutron.Delete Subnets
Basic & Neutron.Neutron.Delete Networks
Deprecation Warning: Use Post Request in the future
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)