openstackclient.tests.network.v2 package

Submodules

openstackclient.tests.network.v2.fakes module

class openstackclient.tests.network.v2.fakes.FakeAvailabilityZone

Bases: object

Fake one or more network availability zones (AZs).

static create_availability_zones(attrs={}, methods={}, count=2)

Create multiple fake AZs.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • methods (Dictionary) – A dictionary with all methods
  • count (int) – The number of AZs to fake
Returns:

A list of FakeResource objects faking the AZs

static create_one_availability_zone(attrs={}, methods={})

Create a fake AZ.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • methods (Dictionary) – A dictionary with all methods
Returns:

A FakeResource object with name, state, etc.

class openstackclient.tests.network.v2.fakes.FakeFloatingIP

Bases: object

Fake one or more floating ip.

static create_floating_ips(attrs={}, methods={}, count=2)

Create multiple fake floating ips.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • methods (Dictionary) – A dictionary with all methods
  • count (int) – The number of floating ips to fake
Returns:

A list of FakeResource objects faking the floating ips

static create_one_floating_ip(attrs={}, methods={})

Create a fake floating ip.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • methods (Dictionary) – A dictionary with all methods
Returns:

A FakeResource object, with id, ip, and so on

static get_floating_ips(floating_ips=None, count=2)

Get an iterable MagicMock object with a list of faked floating ips.

If floating_ips list is provided, then initialize the Mock object with the list. Otherwise create one.

Parameters:
  • floating ips (List) – A list of FakeResource objects faking floating ips
  • count (int) – The number of floating ips to fake
Returns:

An iterable Mock object with side_effect set to a list of faked floating ips

class openstackclient.tests.network.v2.fakes.FakeNetwork

Bases: object

Fake one or more networks.

static create_networks(attrs={}, methods={}, count=2)

Create multiple fake networks.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • methods (Dictionary) – A dictionary with all methods
  • count (int) – The number of networks to fake
Returns:

A list of FakeResource objects faking the networks

static create_one_network(attrs={}, methods={})

Create a fake network.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • methods (Dictionary) – A dictionary with all methods
Returns:

A FakeResource object, with id, name, admin_state_up, router_external, status, subnets, tenant_id

static get_networks(networks=None, count=2)

Get an iterable MagicMock object with a list of faked networks.

If networks list is provided, then initialize the Mock object with the list. Otherwise create one.

Parameters:
  • networks (List) – A list of FakeResource objects faking networks
  • count (int) – The number of networks to fake
Returns:

An iterable Mock object with side_effect set to a list of faked networks

class openstackclient.tests.network.v2.fakes.FakeNetworkV2Client(**kwargs)

Bases: object

class openstackclient.tests.network.v2.fakes.FakePort

Bases: object

Fake one or more ports.

static create_one_port(attrs={}, methods={})

Create a fake port.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • methods (Dictionary) – A dictionary with all methods
Returns:

A FakeResource object, with id, name, etc.

static create_ports(attrs={}, methods={}, count=2)

Create multiple fake ports.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • methods (Dictionary) – A dictionary with all methods
  • count (int) – The number of ports to fake
Returns:

A list of FakeResource objects faking the ports

static get_ports(ports=None, count=2)

Get an iterable MagicMock object with a list of faked ports.

If ports list is provided, then initialize the Mock object with the list. Otherwise create one.

Parameters:
  • ports (List) – A list of FakeResource objects faking ports
  • count (int) – The number of ports to fake
Returns:

An iterable Mock object with side_effect set to a list of faked ports

class openstackclient.tests.network.v2.fakes.FakeRouter

Bases: object

Fake one or more routers.

static create_one_router(attrs={}, methods={})

Create a fake router.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • methods (Dictionary) – A dictionary with all methods
Returns:

A FakeResource object, with id, name, admin_state_up, status, tenant_id

static create_routers(attrs={}, methods={}, count=2)

Create multiple fake routers.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • methods (Dictionary) – A dictionary with all methods
  • count (int) – The number of routers to fake
Returns:

A list of FakeResource objects faking the routers

static get_routers(routers=None, count=2)

Get an iterable MagicMock object with a list of faked routers.

If routers list is provided, then initialize the Mock object with the list. Otherwise create one.

Parameters:
  • routers (List) – A list of FakeResource objects faking routers
  • count (int) – The number of routers to fake
Returns:

An iterable Mock object with side_effect set to a list of faked routers

class openstackclient.tests.network.v2.fakes.FakeSecurityGroup

Bases: object

Fake one or more security groups.

static create_one_security_group(attrs={}, methods={})

Create a fake security group.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • methods (Dictionary) – A dictionary with all methods
Returns:

A FakeResource object, with id, name, etc.

static create_security_groups(attrs={}, methods={}, count=2)

Create multiple fake security groups.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • methods (Dictionary) – A dictionary with all methods
  • count (int) – The number of security groups to fake
Returns:

A list of FakeResource objects faking the security groups

class openstackclient.tests.network.v2.fakes.FakeSecurityGroupRule

Bases: object

Fake one or more security group rules.

static create_one_security_group_rule(attrs={}, methods={})

Create a fake security group rule.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • methods (Dictionary) – A dictionary with all methods
Returns:

A FakeResource object, with id, etc.

static create_security_group_rules(attrs={}, methods={}, count=2)

Create multiple fake security group rules.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • methods (Dictionary) – A dictionary with all methods
  • count (int) – The number of security group rules to fake
Returns:

A list of FakeResource objects faking the security group rules

class openstackclient.tests.network.v2.fakes.FakeSubnet

Bases: object

Fake one or more subnets.

static create_one_subnet(attrs={}, methods={})

Create a fake subnet.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • methods (Dictionary) – A dictionary with all methods
Returns:

A FakeResource object faking the subnet

static create_subnets(attrs={}, methods={}, count=2)

Create multiple fake subnets.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • methods (Dictionary) – A dictionary with all methods
  • count (int) – The number of subnets to fake
Returns:

A list of FakeResource objects faking the subnets

class openstackclient.tests.network.v2.fakes.FakeSubnetPool

Bases: object

Fake one or more subnet pools.

static create_one_subnet_pool(attrs={}, methods={})

Create a fake subnet pool.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • methods (Dictionary) – A dictionary with all methods
Returns:

A FakeResource object faking the subnet pool

static create_subnet_pools(attrs={}, methods={}, count=2)

Create multiple fake subnet pools.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • methods (Dictionary) – A dictionary with all methods
  • count (int) – The number of subnet pools to fake
Returns:

A list of FakeResource objects faking the subnet pools

class openstackclient.tests.network.v2.fakes.TestNetworkV2(*args, **kwargs)

Bases: openstackclient.tests.utils.TestCommand

setUp()
openstackclient.tests.network.v2.fakes.create_extension()

openstackclient.tests.network.v2.test_floating_ip module

class openstackclient.tests.network.v2.test_floating_ip.TestDeleteFloatingIPCompute(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_floating_ip.TestFloatingIPCompute

floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-dff37674f65d4776865f48bb7b9d68c4, instance_id=server-id-a273fa4222594229be6bd1bfee7d2485, ip=1.0.9.0, pool=public>
setUp()
test_floating_ip_delete()
class openstackclient.tests.network.v2.test_floating_ip.TestDeleteFloatingIPNetwork(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_floating_ip.TestFloatingIPNetwork

floating_ip = <FakeResource dns_domain=None, dns_name=None, fixed_ip_address=2.0.9.0, floating_ip_address=1.0.9.0, floating_network_id=network-id-75c5000425534c76841c84c5252fa507, id=floating-ip-id-2d3c6a1e403e41db8adce9f2052895fb, keys=<MagicMock id='100356688'>, port_id=port-id-3574a20815e04b0f856b5154a4d55cad, project_id=project-id-9fc42f37f3ee41b3a499d9d099ea6492, router_id=router-id-8f7195f423d64bfdad5404ab2fc25db6, status=DOWN, tenant_id=project-id-9fc42f37f3ee41b3a499d9d099ea6492>
setUp()
test_floating_ip_delete()
class openstackclient.tests.network.v2.test_floating_ip.TestFloatingIPCompute(*args, **kwargs)

Bases: openstackclient.tests.compute.v2.fakes.TestComputev2

setUp()
class openstackclient.tests.network.v2.test_floating_ip.TestFloatingIPNetwork(*args, **kwargs)

Bases: openstackclient.tests.network.v2.fakes.TestNetworkV2

setUp()
class openstackclient.tests.network.v2.test_floating_ip.TestListFloatingIPCompute(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_floating_ip.TestFloatingIPCompute

columns = ('ID', 'Floating IP Address', 'Fixed IP Address', 'Server', 'Pool')
data = [('floating-ip-id-4a2be8aa16754f2e841122a23f294542', '1.0.9.0', '2.0.9.0', 'server-id-2c84259289a549dbb1bf402d4876d8b2', 'public'), ('floating-ip-id-13be13ad1dcf433abc9c036244e855ec', '1.0.9.0', '2.0.9.0', 'server-id-8340fe2a67344ee08ce36a8b475e70cf', 'public'), ('floating-ip-id-fa5c94c4d81b4ced82c22f824e6cc50c', '1.0.9.0', '2.0.9.0', 'server-id-7a29e6658dad4a3bad78e6067cf78b92', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-4a2be8aa16754f2e841122a23f294542, instance_id=server-id-2c84259289a549dbb1bf402d4876d8b2, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-13be13ad1dcf433abc9c036244e855ec, instance_id=server-id-8340fe2a67344ee08ce36a8b475e70cf, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-fa5c94c4d81b4ced82c22f824e6cc50c, instance_id=server-id-7a29e6658dad4a3bad78e6067cf78b92, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-fa5c94c4d81b4ced82c22f824e6cc50c, instance_id=server-id-7a29e6658dad4a3bad78e6067cf78b92, ip=1.0.9.0, pool=public>
setUp()
test_floating_ip_list()
class openstackclient.tests.network.v2.test_floating_ip.TestListFloatingIPNetwork(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_floating_ip.TestFloatingIPNetwork

columns = ('ID', 'Floating IP Address', 'Fixed IP Address', 'Port')
data = [('floating-ip-id-e64a1156cb6d4443b187621a646f2c4a', '1.0.9.0', '2.0.9.0', 'port-id-63f4edb35dee4c358494e8d34fd3b716'), ('floating-ip-id-a5cd475fd3a846e3b6d5918f0be8ca89', '1.0.9.0', '2.0.9.0', 'port-id-c6232f73594e4b77a2903275d0cca4f0'), ('floating-ip-id-e914d8f74a4a4c7db5a270b9254589ff', '1.0.9.0', '2.0.9.0', 'port-id-f95e1bbb4498487287e023edec099787')]
floating_ips = [<FakeResource dns_domain=None, dns_name=None, fixed_ip_address=2.0.9.0, floating_ip_address=1.0.9.0, floating_network_id=network-id-bf47fe1756e849548fc0d199741d1d9b, id=floating-ip-id-e64a1156cb6d4443b187621a646f2c4a, keys=<MagicMock id='73562128'>, port_id=port-id-63f4edb35dee4c358494e8d34fd3b716, project_id=project-id-9f78a5851a844136af6be350923a79fd, router_id=router-id-25e477668fec40f3845704a5327a4152, status=DOWN, tenant_id=project-id-9f78a5851a844136af6be350923a79fd>, <FakeResource dns_domain=None, dns_name=None, fixed_ip_address=2.0.9.0, floating_ip_address=1.0.9.0, floating_network_id=network-id-70742d197de04385a5258caf03ff9dc5, id=floating-ip-id-a5cd475fd3a846e3b6d5918f0be8ca89, keys=<MagicMock id='93249808'>, port_id=port-id-c6232f73594e4b77a2903275d0cca4f0, project_id=project-id-2a935f52622b4940a0b311d03f5bc878, router_id=router-id-cfc67d5cb5894beb87c94f3b2627694a, status=DOWN, tenant_id=project-id-2a935f52622b4940a0b311d03f5bc878>, <FakeResource dns_domain=None, dns_name=None, fixed_ip_address=2.0.9.0, floating_ip_address=1.0.9.0, floating_network_id=network-id-1effeca72bf5495e80afeb8ca8d91792, id=floating-ip-id-e914d8f74a4a4c7db5a270b9254589ff, keys=<MagicMock id='63500432'>, port_id=port-id-f95e1bbb4498487287e023edec099787, project_id=project-id-f41c6c55e41242899051cc2cd28be587, router_id=router-id-28a36d22b07d476ca640996f2f4eed79, status=DOWN, tenant_id=project-id-f41c6c55e41242899051cc2cd28be587>]
ip = <FakeResource dns_domain=None, dns_name=None, fixed_ip_address=2.0.9.0, floating_ip_address=1.0.9.0, floating_network_id=network-id-1effeca72bf5495e80afeb8ca8d91792, id=floating-ip-id-e914d8f74a4a4c7db5a270b9254589ff, keys=<MagicMock id='63500432'>, port_id=port-id-f95e1bbb4498487287e023edec099787, project_id=project-id-f41c6c55e41242899051cc2cd28be587, router_id=router-id-28a36d22b07d476ca640996f2f4eed79, status=DOWN, tenant_id=project-id-f41c6c55e41242899051cc2cd28be587>
setUp()
test_floating_ip_list()
class openstackclient.tests.network.v2.test_floating_ip.TestShowFloatingIPCompute(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_floating_ip.TestFloatingIPCompute

columns = ('fixed_ip', 'id', 'instance_id', 'ip', 'pool')
data = ('2.0.9.0', 'floating-ip-id-e7576a7534db491195b5341b5288524f', 'server-id-0bec33f51a304629b969bdc956705180', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-e7576a7534db491195b5341b5288524f, instance_id=server-id-0bec33f51a304629b969bdc956705180, ip=1.0.9.0, pool=public>
setUp()
test_floating_ip_show()
class openstackclient.tests.network.v2.test_floating_ip.TestShowFloatingIPNetwork(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_floating_ip.TestFloatingIPNetwork

columns = ('dns_domain', 'dns_name', 'fixed_ip_address', 'floating_ip_address', 'floating_network_id', 'id', 'port_id', 'project_id', 'router_id', 'status')
data = (None, None, '2.0.9.0', '1.0.9.0', 'network-id-fb05430337104bc2af91c382031238a1', 'floating-ip-id-42eb3ec8b2814ba499f7fdc871d3a1b4', 'port-id-e194363c8009422f9b46cb2245cf32fa', 'project-id-e443b1b5b788456380d26e29a94c4d3c', 'router-id-734646eb5ea74c8db0a8a9d46a76b752', 'DOWN')
floating_ip = <FakeResource dns_domain=None, dns_name=None, fixed_ip_address=2.0.9.0, floating_ip_address=1.0.9.0, floating_network_id=network-id-fb05430337104bc2af91c382031238a1, id=floating-ip-id-42eb3ec8b2814ba499f7fdc871d3a1b4, keys=<MagicMock id='72529104'>, port_id=port-id-e194363c8009422f9b46cb2245cf32fa, project_id=project-id-e443b1b5b788456380d26e29a94c4d3c, router_id=router-id-734646eb5ea74c8db0a8a9d46a76b752, status=DOWN, tenant_id=project-id-e443b1b5b788456380d26e29a94c4d3c>
setUp()
test_floating_ip_show()

openstackclient.tests.network.v2.test_network module

class openstackclient.tests.network.v2.test_network.TestCreateNetworkCompute(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_network.TestNetworkCompute

columns = ('bridge', 'bridge_interface', 'broadcast', 'cidr', 'cidr_v6', 'created_at', 'deleted', 'deleted_at', 'dhcp_server', 'dhcp_start', 'dns1', 'dns2', 'enable_dhcp', 'gateway', 'gateway_v6', 'host', 'id', 'injected', 'label', 'mtu', 'multi_host', 'netmask', 'netmask_v6', 'priority', 'project_id', 'rxtx_base', 'share_address', 'updated_at', 'vlan', 'vpn_private_address', 'vpn_public_address', 'vpn_public_port')
data = ('br100', None, '10.0.0.255', '10.0.0.0/24', None, '2016-02-11T11:17:37.000000', False, None, '10.0.0.1', '10.0.0.2', '8.8.4.4', None, True, '10.0.0.1', None, None, 'network-id-e2f8c140dae244beaecb43163b7f075a', False, 'network-label-699b8769e8db429eb89ed23ed25359a3', None, False, '255.255.255.0', None, None, 'project-id-6d91e5e1b6394b6da8e9f8ade78e7387', None, False, None, None, None, None, None)
setUp()
test_create_default_options()
test_create_no_options()
class openstackclient.tests.network.v2.test_network.TestCreateNetworkIdentityV2(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_network.TestNetwork

columns = ('admin_state_up', 'availability_zone_hints', 'availability_zones', 'id', 'name', 'project_id', 'router_external', 'status', 'subnets')
data = ('UP', '', '', 'network-id-d776c9d87d3b450fa9b636c8a73f8403', 'network-name-4c325a34e1e14a718582a9c0669bebe4', '8-9-64', 'External', 'ACTIVE', 'a, b')
setUp()
test_create_with_domain_identityv2()
test_create_with_project_identityv2()
class openstackclient.tests.network.v2.test_network.TestCreateNetworkIdentityV3(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_network.TestNetwork

columns = ('admin_state_up', 'availability_zone_hints', 'availability_zones', 'id', 'name', 'project_id', 'router_external', 'status', 'subnets')
data = ('UP', 'nova', '', 'network-id-bc25c99ca4224943bfe60ad6cafa806b', 'network-name-e298fc2ed1644104a0bf0fb378213fdc', '8-9-64', 'External', 'ACTIVE', 'a, b')
setUp()
test_create_all_options()
test_create_default_options()
test_create_no_options()
test_create_other_options()
class openstackclient.tests.network.v2.test_network.TestDeleteNetwork(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_network.TestNetwork

setUp()
test_delete()
class openstackclient.tests.network.v2.test_network.TestDeleteNetworkCompute(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_network.TestNetworkCompute

setUp()
test_network_delete()
class openstackclient.tests.network.v2.test_network.TestListNetwork(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_network.TestNetwork

columns = ('ID', 'Name', 'Subnets')
columns_long = ('ID', 'Name', 'Status', 'Project', 'State', 'Shared', 'Subnets', 'Network Type', 'Router Type', 'Availability Zones')
data = [('network-id-6ee827922ee54132b611c594d1aa2161', 'network-name-ea1422e9660943a3ac150db0798a0baf', 'a, b'), ('network-id-af880b21e4cc4eb6ae7ddcbfad13e492', 'network-name-71c6c0dc769e4cf18aafeec5ff915009', 'a, b'), ('network-id-50a512e48682413b8645cdf1dabdb02a', 'network-name-5b6b9a27b4b247778909f871b6ebf9cb', 'a, b')]
data_long = [('network-id-6ee827922ee54132b611c594d1aa2161', 'network-name-ea1422e9660943a3ac150db0798a0baf', 'ACTIVE', 'project-id-0190a2f33a274d8eaf01ebc6d66957c0', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-af880b21e4cc4eb6ae7ddcbfad13e492', 'network-name-71c6c0dc769e4cf18aafeec5ff915009', 'ACTIVE', 'project-id-38550d6ed1f54ffabc84613b78e05f13', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-50a512e48682413b8645cdf1dabdb02a', 'network-name-5b6b9a27b4b247778909f871b6ebf9cb', 'ACTIVE', 'project-id-b662ab235d2649ed86a5ba486f946bde', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-50a512e48682413b8645cdf1dabdb02a, keys=<MagicMock id='94026960'>, name=network-name-5b6b9a27b4b247778909f871b6ebf9cb, project_id=project-id-b662ab235d2649ed86a5ba486f946bde, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-b662ab235d2649ed86a5ba486f946bde>
setUp()
test_list_external()
test_network_list_long()
test_network_list_no_options()
class openstackclient.tests.network.v2.test_network.TestListNetworkCompute(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_network.TestNetworkCompute

columns = ('ID', 'Name', 'Subnet')
data = [('network-id-cb7db4f5d42749918f2a80ad1a253a9a', 'network-label-03666e921d704fc3908ecb50700c65c1', '10.0.0.0/24'), ('network-id-7d2a13fef9c4428d847eeee655353d65', 'network-label-0336143776744a7dbe72e37a1ffdf77e', '10.0.0.0/24'), ('network-id-a4ff8f396cc840ae8d432161b7e99ce9', 'network-label-6a3d248125774d57a84df99ddaa72f5d', '10.0.0.0/24')]
net = <FakeResource bridge=br100, bridge_interface=None, broadcast=10.0.0.255, cidr=10.0.0.0/24, cidr_v6=None, created_at=2016-02-11T11:17:37.000000, deleted=False, deleted_at=None, dhcp_server=10.0.0.1, dhcp_start=10.0.0.2, dns1=8.8.4.4, dns2=None, enable_dhcp=True, gateway=10.0.0.1, gateway_v6=None, host=None, id=network-id-a4ff8f396cc840ae8d432161b7e99ce9, injected=False, keys=<MagicMock id='153975184'>, label=network-label-6a3d248125774d57a84df99ddaa72f5d, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-df0b96e77b58424f9c8a809a09e139bf, rxtx_base=None, share_address=False, updated_at=None, vlan=None, vpn_private_address=None, vpn_public_address=None, vpn_public_port=None>
setUp()
test_network_list_no_options()
class openstackclient.tests.network.v2.test_network.TestNetwork(*args, **kwargs)

Bases: openstackclient.tests.network.v2.fakes.TestNetworkV2

setUp()
class openstackclient.tests.network.v2.test_network.TestNetworkCompute(*args, **kwargs)

Bases: openstackclient.tests.compute.v2.fakes.TestComputev2

setUp()
class openstackclient.tests.network.v2.test_network.TestSetNetwork(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_network.TestNetwork

setUp()
test_set_nothing()
test_set_that()
test_set_this()
class openstackclient.tests.network.v2.test_network.TestShowNetwork(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_network.TestNetwork

columns = ('admin_state_up', 'availability_zone_hints', 'availability_zones', 'id', 'name', 'project_id', 'router_external', 'status', 'subnets')
data = ('UP', '', '', 'network-id-df33cde4c5a84890bd4ae73a7f1383ad', 'network-name-a93b5e1ef5d14050b049ea0697a16f06', 'project-id-bdcee65fe0e446d1a89f8cdd649292e7', 'External', 'ACTIVE', 'a, b')
setUp()
test_show_all_options()
test_show_no_options()
class openstackclient.tests.network.v2.test_network.TestShowNetworkCompute(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_network.TestNetworkCompute

columns = ('bridge', 'bridge_interface', 'broadcast', 'cidr', 'cidr_v6', 'created_at', 'deleted', 'deleted_at', 'dhcp_server', 'dhcp_start', 'dns1', 'dns2', 'enable_dhcp', 'gateway', 'gateway_v6', 'host', 'id', 'injected', 'label', 'mtu', 'multi_host', 'netmask', 'netmask_v6', 'priority', 'project_id', 'rxtx_base', 'share_address', 'updated_at', 'vlan', 'vpn_private_address', 'vpn_public_address', 'vpn_public_port')
data = ('br100', None, '10.0.0.255', '10.0.0.0/24', None, '2016-02-11T11:17:37.000000', False, None, '10.0.0.1', '10.0.0.2', '8.8.4.4', None, True, '10.0.0.1', None, None, 'network-id-0cce294516694213978b70bb4160a096', False, 'network-label-9a885271c08d4adfbc9c977efba07ed2', None, False, '255.255.255.0', None, None, 'project-id-f55594deb01e430c9c48f504a289b106', None, False, None, None, None, None, None)
setUp()
test_show_all_options()
test_show_no_options()

openstackclient.tests.network.v2.test_port module

class openstackclient.tests.network.v2.test_port.TestDeletePort(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_port.TestPort

setUp()
test_delete()
class openstackclient.tests.network.v2.test_port.TestPort(*args, **kwargs)

Bases: openstackclient.tests.network.v2.fakes.TestNetworkV2

setUp()
class openstackclient.tests.network.v2.test_port.TestShowPort(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_port.TestPort

columns = ('admin_state_up', 'allowed_address_pairs', 'binding_host_id', 'binding_profile', 'binding_vif_details', 'binding_vif_type', 'binding_vnic_type', 'device_id', 'device_owner', 'dns_assignment', 'dns_name', 'extra_dhcp_opts', 'fixed_ips', 'id', 'mac_address', 'name', 'network_id', 'port_security_enabled', 'project_id', 'security_groups', 'status')
data = ('UP', '', 'binding-host-id-f270209e2760495d9e58946e4b4160dd', '', '', 'ovs', 'normal', 'device-id-eee4c4d817d443cf8e2e216e679931e0', 'compute:nova', '', 'dns-name-111fd55fa7c94d63a06aaefc226eae1d', '', '', 'port-id-444f32c0438f4fb5b13dbb830e4db572', 'fa:16:3e:a9:4e:72', 'port-name-5118f30f87534d78a1c4c5a4dcbdd48f', 'network-id-5bebaf689a1d4c5b97dec4eef91a6985', True, 'project-id-33e9c043161541e6b7d7daf359405dda', '', 'ACTIVE')
setUp()
test_show_all_options()
test_show_no_options()

openstackclient.tests.network.v2.test_router module

class openstackclient.tests.network.v2.test_router.TestCreateRouter(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_router.TestRouter

columns = ('admin_state_up', 'distributed', 'ha', 'id', 'name', 'project_id')
data = ('UP', False, False, 'router-id-0e18a4fa19614bd1b407e7124f6c8253', 'router-name-19d762c449bc430c8162626a0fa0007b', 'project-id-ed410c8ab80d40669f8f1b4b08e62b6b')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-0e18a4fa19614bd1b407e7124f6c8253, keys=<MagicMock id='180897680'>, name=router-name-19d762c449bc430c8162626a0fa0007b, routes=[], status=ACTIVE, tenant_id=project-id-ed410c8ab80d40669f8f1b4b08e62b6b>
setUp()
test_create_default_options()
test_create_no_options()
test_create_with_AZ_hints()
class openstackclient.tests.network.v2.test_router.TestDeleteRouter(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_router.TestRouter

setUp()
test_delete()
class openstackclient.tests.network.v2.test_router.TestListRouter(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_router.TestRouter

columns = ('ID', 'Name', 'Status', 'State', 'Distributed', 'HA', 'Project')
columns_long = ('ID', 'Name', 'Status', 'State', 'Distributed', 'HA', 'Project', 'Routes', 'External gateway info', 'Availability zones')
data = [('router-id-f7a2f467c7244455a1c516ef5e4a9c32', 'router-name-7c87ac16448745439a301bd9488bc76b', 'ACTIVE', 'UP', False, False, 'project-id-a7cbbaaf891e418d880b883fc1691ab3'), ('router-id-e862ba3bea78414ab77744e9fcee6357', 'router-name-0c6e2fcddaf64e26a573f1777cc1f7af', 'ACTIVE', 'UP', False, False, 'project-id-6673c037ea444497b028702522b2a6fb'), ('router-id-c8bc880ccebb4514b3dd1aca23cde885', 'router-name-04838b029caa4be4a08c40df6e9757c7', 'ACTIVE', 'UP', False, False, 'project-id-241d22ac56e04503bf63e39b8fe73c2b')]
data_long = [('router-id-f7a2f467c7244455a1c516ef5e4a9c32', 'router-name-7c87ac16448745439a301bd9488bc76b', 'ACTIVE', 'UP', False, False, 'project-id-a7cbbaaf891e418d880b883fc1691ab3', [], '{}', ''), ('router-id-e862ba3bea78414ab77744e9fcee6357', 'router-name-0c6e2fcddaf64e26a573f1777cc1f7af', 'ACTIVE', 'UP', False, False, 'project-id-6673c037ea444497b028702522b2a6fb', [], '{}', ''), ('router-id-c8bc880ccebb4514b3dd1aca23cde885', 'router-name-04838b029caa4be4a08c40df6e9757c7', 'ACTIVE', 'UP', False, False, 'project-id-241d22ac56e04503bf63e39b8fe73c2b', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-c8bc880ccebb4514b3dd1aca23cde885, keys=<MagicMock id='182892688'>, name=router-name-04838b029caa4be4a08c40df6e9757c7, routes=[], status=ACTIVE, tenant_id=project-id-241d22ac56e04503bf63e39b8fe73c2b>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-f7a2f467c7244455a1c516ef5e4a9c32, keys=<MagicMock id='182886544'>, name=router-name-7c87ac16448745439a301bd9488bc76b, routes=[], status=ACTIVE, tenant_id=project-id-a7cbbaaf891e418d880b883fc1691ab3>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-e862ba3bea78414ab77744e9fcee6357, keys=<MagicMock id='182895760'>, name=router-name-0c6e2fcddaf64e26a573f1777cc1f7af, routes=[], status=ACTIVE, tenant_id=project-id-6673c037ea444497b028702522b2a6fb>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-c8bc880ccebb4514b3dd1aca23cde885, keys=<MagicMock id='182892688'>, name=router-name-04838b029caa4be4a08c40df6e9757c7, routes=[], status=ACTIVE, tenant_id=project-id-241d22ac56e04503bf63e39b8fe73c2b>]
setUp()
test_router_list_long()
test_router_list_no_options()
class openstackclient.tests.network.v2.test_router.TestRouter(*args, **kwargs)

Bases: openstackclient.tests.network.v2.fakes.TestNetworkV2

setUp()
class openstackclient.tests.network.v2.test_router.TestSetRouter(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_router.TestRouter

setUp()
test_set_clear_routes()
test_set_distributed_centralized()
test_set_nothing()
test_set_route()
test_set_route_clear_routes()
test_set_that()
test_set_this()
class openstackclient.tests.network.v2.test_router.TestShowRouter(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_router.TestRouter

columns = ('admin_state_up', 'distributed', 'ha', 'id', 'name', 'tenant_id')
data = ('UP', False, False, 'router-id-7e3df7d4a3614f3b92552e95f6a3e361', 'router-name-4020e51e096746d9b62e6d04c5766735', 'project-id-860918a4a76f4912b8a5f9805ee8ad10')
setUp()
test_show_all_options()
test_show_no_options()

openstackclient.tests.network.v2.test_security_group module

class openstackclient.tests.network.v2.test_security_group.TestDeleteSecurityGroupCompute(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_security_group.TestSecurityGroupCompute

setUp()
test_security_group_delete()
class openstackclient.tests.network.v2.test_security_group.TestDeleteSecurityGroupNetwork(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_security_group.TestSecurityGroupNetwork

setUp()
test_security_group_delete()
class openstackclient.tests.network.v2.test_security_group.TestListSecurityGroupCompute(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_security_group.TestSecurityGroupCompute

expected_columns = ('ID', 'Name', 'Description')
expected_columns_all_projects = ('ID', 'Name', 'Description', 'Project')
expected_data = (('security-group-id-7b5682d0d5d64588b858d0341a9f45e4', 'security-group-name-88fa4db6c6044422bea816dc1cb586dd', 'security-group-description-24c0793f35f74fc984eee9db8f17924b'),)
expected_data_all_projects = (('security-group-id-7b5682d0d5d64588b858d0341a9f45e4', 'security-group-name-88fa4db6c6044422bea816dc1cb586dd', 'security-group-description-24c0793f35f74fc984eee9db8f17924b', 'project-id-144b661bd522495cb5368a2aa2c3865f'),)
setUp()
test_security_group_list_all_projects()
test_security_group_list_no_options()
class openstackclient.tests.network.v2.test_security_group.TestListSecurityGroupNetwork(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_security_group.TestSecurityGroupNetwork

expected_columns = ('ID', 'Name', 'Description', 'Project')
expected_data = (('security-group-id-e8f6e3aca1ae4dadbff30e5ca85727ca', 'security-group-name-1df15bffafa94e1fa32535a8b7860498', 'security-group-description-75ea7bc88d5840ca9c26bbb8b674dafd', 'project-id-023b16b4f33a44e185ea92096b1ed97b'),)
setUp()
test_security_group_list_all_projects()
test_security_group_list_no_options()
class openstackclient.tests.network.v2.test_security_group.TestSecurityGroupCompute(*args, **kwargs)

Bases: openstackclient.tests.compute.v2.fakes.TestComputev2

setUp()
class openstackclient.tests.network.v2.test_security_group.TestSecurityGroupNetwork(*args, **kwargs)

Bases: openstackclient.tests.network.v2.fakes.TestNetworkV2

setUp()

openstackclient.tests.network.v2.test_security_group_rule module

class openstackclient.tests.network.v2.test_security_group_rule.TestDeleteSecurityGroupRuleCompute(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_security_group_rule.TestSecurityGroupRuleCompute

setUp()
test_security_group_rule_delete()
class openstackclient.tests.network.v2.test_security_group_rule.TestDeleteSecurityGroupRuleNetwork(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_security_group_rule.TestSecurityGroupRuleNetwork

setUp()
test_security_group_rule_delete()
class openstackclient.tests.network.v2.test_security_group_rule.TestSecurityGroupRuleCompute(*args, **kwargs)

Bases: openstackclient.tests.compute.v2.fakes.TestComputev2

setUp()
class openstackclient.tests.network.v2.test_security_group_rule.TestSecurityGroupRuleNetwork(*args, **kwargs)

Bases: openstackclient.tests.network.v2.fakes.TestNetworkV2

setUp()
class openstackclient.tests.network.v2.test_security_group_rule.TestShowSecurityGroupRuleCompute(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_security_group_rule.TestSecurityGroupRuleCompute

columns = ('id', 'ip_protocol', 'ip_range', 'parent_group_id', 'port_range', 'remote_security_group')
data = ('security-group-rule-id-960cba945f1c41d4a7246fe85b506740', 'icmp', '0.0.0.0/0', 'security-group-id-4175b38ac9554dd5b57752e93d85fb10', '', '')
setUp()
test_show_all_options()
test_show_no_options()
class openstackclient.tests.network.v2.test_security_group_rule.TestShowSecurityGroupRuleNetwork(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_security_group_rule.TestSecurityGroupRuleNetwork

columns = ('direction', 'ethertype', 'id', 'port_range_max', 'port_range_min', 'project_id', 'protocol', 'remote_group_id', 'remote_ip_prefix', 'security_group_id')
data = ('ingress', 'IPv4', 'security-group-rule-id-e8b2c680054b49779158ae7b9b7c0d7e', None, None, 'project-id-4d6258f13cfa4c26896b80cde540d7bf', None, 'remote-security-group-id-a27bfffe0a7a4f69bee3e86fbb2f0218', None, 'security-group-id-559178152ff747718f837da29bf422fe')
setUp()
test_show_all_options()
test_show_no_options()

openstackclient.tests.network.v2.test_subnet module

class openstackclient.tests.network.v2.test_subnet.TestDeleteSubnet(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_subnet.TestSubnet

setUp()
test_delete()
class openstackclient.tests.network.v2.test_subnet.TestListSubnet(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_subnet.TestSubnet

columns = ('ID', 'Name', 'Network', 'Subnet')
columns_long = ('ID', 'Name', 'Network', 'Subnet', 'Project', 'DHCP', 'Name Servers', 'Allocation Pools', 'Host Routes', 'IP Version', 'Gateway')
data = [('subnet-id-dda7c273d6224cbeaa455f23011d5f17', 'subnet-name-ef460ef436884200b1b9149bb13b66dc', 'network-id-8abcecf4943647d7a997561a98b21324', '10.10.10.0/24'), ('subnet-id-6cb56a8b9fb94e8e916b9e6eec96d9df', 'subnet-name-b9669270c822444abb2cb2788dea3365', 'network-id-5f1871907f214a9ab198f390c5a1c231', '10.10.10.0/24'), ('subnet-id-9b480db80bd949f0af3de38309bf6365', 'subnet-name-211e4c531c804538af101f8c3e94d5ff', 'network-id-488421d61802444893b5d69933a343d6', '10.10.10.0/24')]
data_long = [('subnet-id-dda7c273d6224cbeaa455f23011d5f17', 'subnet-name-ef460ef436884200b1b9149bb13b66dc', 'network-id-8abcecf4943647d7a997561a98b21324', '10.10.10.0/24', 'project-id-77f148991280469f8934bfd22151a40e', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-6cb56a8b9fb94e8e916b9e6eec96d9df', 'subnet-name-b9669270c822444abb2cb2788dea3365', 'network-id-5f1871907f214a9ab198f390c5a1c231', '10.10.10.0/24', 'project-id-4c21c205fa614d1f9f8553161253e6e2', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-9b480db80bd949f0af3de38309bf6365', 'subnet-name-211e4c531c804538af101f8c3e94d5ff', 'network-id-488421d61802444893b5d69933a343d6', '10.10.10.0/24', 'project-id-89fbea07e39c4b77863f0115ac83a5e6', True, '', '', '', '4', '10.10.10.1')]
setUp()
subnet = <FakeResource allocation_pools=[], cidr=10.10.10.0/24, dns_nameservers=[], enable_dhcp=True, gateway_ip=10.10.10.1, host_routes=[], id=subnet-id-9b480db80bd949f0af3de38309bf6365, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='159975568'>, name=subnet-name-211e4c531c804538af101f8c3e94d5ff, network_id=network-id-488421d61802444893b5d69933a343d6, project_id=project-id-89fbea07e39c4b77863f0115ac83a5e6, subnetpool_id=None, tenant_id=project-id-89fbea07e39c4b77863f0115ac83a5e6>
test_subnet_list_long()
test_subnet_list_no_options()
class openstackclient.tests.network.v2.test_subnet.TestShowSubnet(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_subnet.TestSubnet

columns = ('allocation_pools', 'cidr', 'dns_nameservers', 'enable_dhcp', 'gateway_ip', 'host_routes', 'id', 'ip_version', 'ipv6_address_mode', 'ipv6_ra_mode', 'name', 'network_id', 'project_id', 'subnetpool_id')
data = ('', '10.10.10.0/24', '', True, '10.10.10.1', '', 'subnet-id-886d6011b6f54dd38ad9f90136e5a8a9', '4', 'None', 'None', 'subnet-name-80c62778cbed419e86b7dc43975064fb', 'network-id-07d22250144d4270a4c41bd288c501c8', 'project-id-0b3610559e5f4e43a2b784b8943cfe5b', 'None')
setUp()
test_show_all_options()
test_show_no_options()
class openstackclient.tests.network.v2.test_subnet.TestSubnet(*args, **kwargs)

Bases: openstackclient.tests.network.v2.fakes.TestNetworkV2

setUp()

openstackclient.tests.network.v2.test_subnet_pool module

class openstackclient.tests.network.v2.test_subnet_pool.TestDeleteSubnetPool(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_subnet_pool.TestSubnetPool

setUp()
test_delete()
class openstackclient.tests.network.v2.test_subnet_pool.TestListSubnetPool(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_subnet_pool.TestSubnetPool

columns = ('ID', 'Name', 'Prefixes')
columns_long = ('ID', 'Name', 'Prefixes', 'Default Prefix Length', 'Address Scope')
data = [('subnet-pool-id-0bf91fc8f09b45de88f54ef7441b314c', 'subnet-pool-name-d29d8a2f07a44ed9b57edd9f6ca3e549', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-08f7ec61a9064b1b884791e09fb6c32e', 'subnet-pool-name-d2acf61c48bc4e839a774d7ce022e29a', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-9d07f3625d324ed0b83d8aea2d8a0754', 'subnet-pool-name-e652964efb194be3a83b9900c67b6943', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-0bf91fc8f09b45de88f54ef7441b314c', 'subnet-pool-name-d29d8a2f07a44ed9b57edd9f6ca3e549', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-43372b63ce1a49e0b9e26f17074e5db0'), ('subnet-pool-id-08f7ec61a9064b1b884791e09fb6c32e', 'subnet-pool-name-d2acf61c48bc4e839a774d7ce022e29a', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-a60c3d128dbc4aa6bf72ae9b6a7e94d4'), ('subnet-pool-id-9d07f3625d324ed0b83d8aea2d8a0754', 'subnet-pool-name-e652964efb194be3a83b9900c67b6943', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-0e5f7ed903bd44c1a9c5807b4b9ab210')]
pool = <FakeResource address_scope_id=address-scope-id-0e5f7ed903bd44c1a9c5807b4b9ab210, default_prefixlen=8, default_quota=None, id=subnet-pool-id-9d07f3625d324ed0b83d8aea2d8a0754, ip_version=4, is_default=False, keys=<MagicMock id='171624400'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-e652964efb194be3a83b9900c67b6943, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-e6d58c6eb6e1453299a1ea9c2436c0f5, shared=False, tenant_id=project-id-e6d58c6eb6e1453299a1ea9c2436c0f5>
setUp()
test_subnet_pool_list_long()
test_subnet_pool_list_no_option()
class openstackclient.tests.network.v2.test_subnet_pool.TestShowSubnetPool(*args, **kwargs)

Bases: openstackclient.tests.network.v2.test_subnet_pool.TestSubnetPool

columns = ('address_scope_id', 'default_prefixlen', 'default_quota', 'id', 'ip_version', 'is_default', 'max_prefixlen', 'min_prefixlen', 'name', 'prefixes', 'project_id', 'shared')
data = ('address-scope-id-2a810754ea6c4d5f82399231f77bd4b3', 8, None, 'subnet-pool-id-d871e08f32e34c87965f50dd9660e203', 4, False, 32, 8, 'subnet-pool-name-71c41e9cf0d84571b1deeae44bd8911e', '10.0.0.0/24, 10.1.0.0/24', 'project-id-e225a210c6264c0b83a782bdc3f9cc20', False)
setUp()
test_show_all_options()
test_show_no_options()
class openstackclient.tests.network.v2.test_subnet_pool.TestSubnetPool(*args, **kwargs)

Bases: openstackclient.tests.network.v2.fakes.TestNetworkV2

setUp()

Module contents