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-83a230c47b1447a09d7c6cf127cefd10, instance_id=server-id-1c21bc45eabe440bb60d402951678087, 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-e45b8cd7a30a41ea8e594f0bbfacb821, id=floating-ip-id-f575b972501a4161845d4bdf6e1b9416, keys=<MagicMock id='4076533804'>, port_id=port-id-cfe949dc52db47358cf7b80e46ed4229, project_id=project-id-b0b7ed28a112477abc28274352b633c3, router_id=router-id-a9e30fca1e1544efb02f6c64ae08367f, status=DOWN, tenant_id=project-id-b0b7ed28a112477abc28274352b633c3>
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-3e582dbbbf714f8fac4e3176959a87de', '1.0.9.0', '2.0.9.0', 'server-id-49d947ef64e545f3be5fd09b4b42a488', 'public'), ('floating-ip-id-2fd744b88d8346eca798ca872ab7a483', '1.0.9.0', '2.0.9.0', 'server-id-c566481cbc0442aa8a382edd814ddacd', 'public'), ('floating-ip-id-3dacfaa3d5a24cb1a27716f13bf6951f', '1.0.9.0', '2.0.9.0', 'server-id-113a63fc1bb64d30bed11cdb2bdda533', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-3e582dbbbf714f8fac4e3176959a87de, instance_id=server-id-49d947ef64e545f3be5fd09b4b42a488, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-2fd744b88d8346eca798ca872ab7a483, instance_id=server-id-c566481cbc0442aa8a382edd814ddacd, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-3dacfaa3d5a24cb1a27716f13bf6951f, instance_id=server-id-113a63fc1bb64d30bed11cdb2bdda533, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-3dacfaa3d5a24cb1a27716f13bf6951f, instance_id=server-id-113a63fc1bb64d30bed11cdb2bdda533, 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-fdd8b618ee524b7496fb7c42cb210a16', '1.0.9.0', '2.0.9.0', 'port-id-8413f5657ed04858af02909cff1cb328'), ('floating-ip-id-0aaa3b375f734a5889ef812869db45aa', '1.0.9.0', '2.0.9.0', 'port-id-89b9c702ef72422896b3f38807771020'), ('floating-ip-id-0b86172b3beb48298c137858187291d5', '1.0.9.0', '2.0.9.0', 'port-id-b2b677f7d488400b8aa71ecaa7312433')]
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-b68289abfabd4c2aa4086c5967780072, id=floating-ip-id-fdd8b618ee524b7496fb7c42cb210a16, keys=<MagicMock id='4076763916'>, port_id=port-id-8413f5657ed04858af02909cff1cb328, project_id=project-id-965fbead10c346dfa3e51c2c1b63edfa, router_id=router-id-bd732e08a11146b4a91a6d21eb94e080, status=DOWN, tenant_id=project-id-965fbead10c346dfa3e51c2c1b63edfa>, <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-5f75eaf4b06a4612941c6f3b7fabd8c9, id=floating-ip-id-0aaa3b375f734a5889ef812869db45aa, keys=<MagicMock id='4076594700'>, port_id=port-id-89b9c702ef72422896b3f38807771020, project_id=project-id-e51a3999727746e0bd3ba1da4f7b0678, router_id=router-id-1fdee91b62c8447c805da0786a8b9805, status=DOWN, tenant_id=project-id-e51a3999727746e0bd3ba1da4f7b0678>, <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-e0f414ff92eb41579afb54a9848c35af, id=floating-ip-id-0b86172b3beb48298c137858187291d5, keys=<MagicMock id='4076581580'>, port_id=port-id-b2b677f7d488400b8aa71ecaa7312433, project_id=project-id-1535731d37a84015874b94c4feb7ec7f, router_id=router-id-cbbfe604dbb347c5995ac14f06a18b3b, status=DOWN, tenant_id=project-id-1535731d37a84015874b94c4feb7ec7f>]
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-e0f414ff92eb41579afb54a9848c35af, id=floating-ip-id-0b86172b3beb48298c137858187291d5, keys=<MagicMock id='4076581580'>, port_id=port-id-b2b677f7d488400b8aa71ecaa7312433, project_id=project-id-1535731d37a84015874b94c4feb7ec7f, router_id=router-id-cbbfe604dbb347c5995ac14f06a18b3b, status=DOWN, tenant_id=project-id-1535731d37a84015874b94c4feb7ec7f>
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-f4b43e6b31354650a91706f29cf52273', 'server-id-f370a3d455d94bed85c7e23f40f6ed40', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-f4b43e6b31354650a91706f29cf52273, instance_id=server-id-f370a3d455d94bed85c7e23f40f6ed40, 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-f14aa4e2fd1c4278bfe97179f4c3ff1a', 'floating-ip-id-1a0d828552884d9088b3bc25032574df', 'port-id-a1d5bb0038304109bf6f941b6f5b6631', 'project-id-9541a276ff644877a20664cdaa3aef5f', 'router-id-72630789627042ed9cea34564d3274d3', '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-f14aa4e2fd1c4278bfe97179f4c3ff1a, id=floating-ip-id-1a0d828552884d9088b3bc25032574df, keys=<MagicMock id='4076750476'>, port_id=port-id-a1d5bb0038304109bf6f941b6f5b6631, project_id=project-id-9541a276ff644877a20664cdaa3aef5f, router_id=router-id-72630789627042ed9cea34564d3274d3, status=DOWN, tenant_id=project-id-9541a276ff644877a20664cdaa3aef5f>
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-609c85a098ab4d5daee31e1768a54b8e', False, 'network-label-5f229f9ef1e746f0b2f742305381a01e', None, False, '255.255.255.0', None, None, 'project-id-18b3575fab294084b37604d30725f9b0', 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-46bf66de65e447d4a2e7737101a335ee', 'network-name-a54a860701ed4bf581f627420aa9c84d', '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-09425801cf49426e9c5526fe08cc3601', 'network-name-0220ff4fbef64c04a0914f016fbd8293', '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-8a82c936a4c14adfb979ef8b7421271b', 'network-name-84a753e0dd584e9789ca4daa534ac35d', 'a, b'), ('network-id-0e5b8a4447054303b15dd2f3fa24cd2f', 'network-name-2de5357058e84c0995a5f1dc42054d35', 'a, b'), ('network-id-b2536e4668d64c808aecd8e7177b3672', 'network-name-e4a91927bd1047a6a787ec722ff15871', 'a, b')]
data_long = [('network-id-8a82c936a4c14adfb979ef8b7421271b', 'network-name-84a753e0dd584e9789ca4daa534ac35d', 'ACTIVE', 'project-id-ac8dd13d8c31468699dbb31d39b47694', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-0e5b8a4447054303b15dd2f3fa24cd2f', 'network-name-2de5357058e84c0995a5f1dc42054d35', 'ACTIVE', 'project-id-579d380acecd4325af6baecee3dd03d6', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-b2536e4668d64c808aecd8e7177b3672', 'network-name-e4a91927bd1047a6a787ec722ff15871', 'ACTIVE', 'project-id-cdc3c87cd8be432d8539b3d4516e499a', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-b2536e4668d64c808aecd8e7177b3672, keys=<MagicMock id='4093713420'>, name=network-name-e4a91927bd1047a6a787ec722ff15871, project_id=project-id-cdc3c87cd8be432d8539b3d4516e499a, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-cdc3c87cd8be432d8539b3d4516e499a>
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-625c1f70b1ec4a1fa4adf817aa394034', 'network-label-e5529fc0f25f4d87b40e58f773973612', '10.0.0.0/24'), ('network-id-de23606ee1b9438d9572d458d0d52e29', 'network-label-5fe47d79e44447c2b935f5197068adf5', '10.0.0.0/24'), ('network-id-d1616f8e477c4b5bb558c99cf3aad6ab', 'network-label-9422f21047c24651bf4ab5465b728947', '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-d1616f8e477c4b5bb558c99cf3aad6ab, injected=False, keys=<MagicMock id='4118651596'>, label=network-label-9422f21047c24651bf4ab5465b728947, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-73ec90f97526496ea7ae7aba3db9a91e, 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-3195dd05c78c4994ad68deb3497552ef', 'network-name-88ab185f1b764c5fb525fe52916f6148', 'project-id-b0a2a21405654fa890da4065ef3c4790', '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-b779100147b24e0888a549b935a56d3e', False, 'network-label-ac9834c8434a4cf9b28408b7165f7d0f', None, False, '255.255.255.0', None, None, 'project-id-0096409c6f894ff59818146decb62e1f', 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-b9ef8bbd23ad4926ac566b13a5c3e033', '', '', 'ovs', 'normal', 'device-id-ff504c7ccd6a4a648c1746eb7b6c716c', 'compute:nova', '', 'dns-name-40d9c7c9e4214139a261a074c1f442be', '', '', 'port-id-57fa4bec0ed14d6da37094d9dd8a1933', 'fa:16:3e:a9:4e:72', 'port-name-48380ac71a6b4a6eb2334193e87ed702', 'network-id-b3b455edab0f4126a2692dfc11eeafc4', True, 'project-id-aed8c68db4d44bd9bfbb594f7d4a3bda', '', '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-dfd73657874a4107a00de9817a181338', 'router-name-af5793fbe8524fc88408b804b3e443fe', 'project-id-8c52de660e7a4cb4b9babec6807512b8')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-dfd73657874a4107a00de9817a181338, keys=<MagicMock id='4087120396'>, name=router-name-af5793fbe8524fc88408b804b3e443fe, routes=[], status=ACTIVE, tenant_id=project-id-8c52de660e7a4cb4b9babec6807512b8>
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-12cd9dbbd96347c3824364eac9746320', 'router-name-bb8fd27a9f414105ab34284ae9518ccd', 'ACTIVE', 'UP', False, False, 'project-id-df44598c22034750a58eab29613751ac'), ('router-id-c018b56d5d96497683a401da17790985', 'router-name-8f19f03b77224ae98b01e84ad53243f4', 'ACTIVE', 'UP', False, False, 'project-id-a385a87717074b788a1debf29686f509'), ('router-id-013cddc0fd054dea8e24507fb05c07e1', 'router-name-23e2858f9e4c447a903e4d6e05c1381a', 'ACTIVE', 'UP', False, False, 'project-id-9116d814822f4ddda97244118dac9b51')]
data_long = [('router-id-12cd9dbbd96347c3824364eac9746320', 'router-name-bb8fd27a9f414105ab34284ae9518ccd', 'ACTIVE', 'UP', False, False, 'project-id-df44598c22034750a58eab29613751ac', [], '{}', ''), ('router-id-c018b56d5d96497683a401da17790985', 'router-name-8f19f03b77224ae98b01e84ad53243f4', 'ACTIVE', 'UP', False, False, 'project-id-a385a87717074b788a1debf29686f509', [], '{}', ''), ('router-id-013cddc0fd054dea8e24507fb05c07e1', 'router-name-23e2858f9e4c447a903e4d6e05c1381a', 'ACTIVE', 'UP', False, False, 'project-id-9116d814822f4ddda97244118dac9b51', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-013cddc0fd054dea8e24507fb05c07e1, keys=<MagicMock id='4083521484'>, name=router-name-23e2858f9e4c447a903e4d6e05c1381a, routes=[], status=ACTIVE, tenant_id=project-id-9116d814822f4ddda97244118dac9b51>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-12cd9dbbd96347c3824364eac9746320, keys=<MagicMock id='4079723756'>, name=router-name-bb8fd27a9f414105ab34284ae9518ccd, routes=[], status=ACTIVE, tenant_id=project-id-df44598c22034750a58eab29613751ac>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-c018b56d5d96497683a401da17790985, keys=<MagicMock id='4075148780'>, name=router-name-8f19f03b77224ae98b01e84ad53243f4, routes=[], status=ACTIVE, tenant_id=project-id-a385a87717074b788a1debf29686f509>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-013cddc0fd054dea8e24507fb05c07e1, keys=<MagicMock id='4083521484'>, name=router-name-23e2858f9e4c447a903e4d6e05c1381a, routes=[], status=ACTIVE, tenant_id=project-id-9116d814822f4ddda97244118dac9b51>]
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-929018f4270346989f9b524df05ba706', 'router-name-2ab92dd37abb4031bcacd67d4f224c08', 'project-id-32692378780f4a31a4d9fa56689c4c75')
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-0b3c4ad5f3fa4da3aa35cf576377f29a', 'security-group-name-a50e53b5e491467fa47bb80360773edd', 'security-group-description-e020522e79374cddb835855d090030d1'),)
expected_data_all_projects = (('security-group-id-0b3c4ad5f3fa4da3aa35cf576377f29a', 'security-group-name-a50e53b5e491467fa47bb80360773edd', 'security-group-description-e020522e79374cddb835855d090030d1', 'project-id-a81b54fc764a4109a802c20e984cf23c'),)
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-c047b77c85804af2b4e936ed24edb913', 'security-group-name-ed04ba49e378422fb6c58c96b150d9c4', 'security-group-description-eec21624a1b74584a065b455818144c5', 'project-id-a60ee5bf4105437cbd7f8621ba291342'),)
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-c844bde3f60247e1aa3b181905fd3a7e', 'icmp', '0.0.0.0/0', 'security-group-id-0b210a08848e4bd6ad09e47af0bdac9b', '', '')
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-712966092bf54e83914ebb48e3ada8b5', None, None, 'project-id-e335bdf0d58a4e989944b033f8757bee', None, 'remote-security-group-id-d7187e9d405e41aaaa40032de5deb7a3', None, 'security-group-id-c1e56d76aeaa4e689fd7f7e3c5a85dc7')
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-06a568d9d41a4b3d8adf53045a8922b5', 'subnet-name-df2bf59e688d4e4f991ab00d74c200d2', 'network-id-f962729a8a9a432ca6ce98f447d4a160', '10.10.10.0/24'), ('subnet-id-0976a8f3a3194b4e823794c449cc3667', 'subnet-name-71b661dd2b0d4ba49cc0970d22f34afc', 'network-id-ca2de1b3ad6b484f83566c6560d40200', '10.10.10.0/24'), ('subnet-id-5fee0b255ce34d50958680d55c426d6f', 'subnet-name-f409f1fd3abf4c42923a76b9aadeb390', 'network-id-aa5ca8923a9b43218b4f60da239ec24d', '10.10.10.0/24')]
data_long = [('subnet-id-06a568d9d41a4b3d8adf53045a8922b5', 'subnet-name-df2bf59e688d4e4f991ab00d74c200d2', 'network-id-f962729a8a9a432ca6ce98f447d4a160', '10.10.10.0/24', 'project-id-8d1c22b5c9014eefab4faa5454055146', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-0976a8f3a3194b4e823794c449cc3667', 'subnet-name-71b661dd2b0d4ba49cc0970d22f34afc', 'network-id-ca2de1b3ad6b484f83566c6560d40200', '10.10.10.0/24', 'project-id-cfb107b76aea48038b0a577838113a90', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-5fee0b255ce34d50958680d55c426d6f', 'subnet-name-f409f1fd3abf4c42923a76b9aadeb390', 'network-id-aa5ca8923a9b43218b4f60da239ec24d', '10.10.10.0/24', 'project-id-16acb0258e4d424cb74866e0f4ff0425', 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-5fee0b255ce34d50958680d55c426d6f, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='4070521644'>, name=subnet-name-f409f1fd3abf4c42923a76b9aadeb390, network_id=network-id-aa5ca8923a9b43218b4f60da239ec24d, project_id=project-id-16acb0258e4d424cb74866e0f4ff0425, subnetpool_id=None, tenant_id=project-id-16acb0258e4d424cb74866e0f4ff0425>
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-86ba21a5ae674d30953fc50193c31270', '4', 'None', 'None', 'subnet-name-2f639731828a4f26b1d9bf71c53c9d96', 'network-id-65cfaed0e67e4f599ed97015730a3b9f', 'project-id-069e8b44314a4187a9c91d0ff8eb4093', '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-7300654ccbdb40a5a9126cf129d470d1', 'subnet-pool-name-aeedc81a7a5049698bea4b7485eabd7e', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-ebc6061702044d6eb57b98c2a36da084', 'subnet-pool-name-67708a881c794da38c35019ee85fd882', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-9b40c7493a3148b1b535bff5019b4c7f', 'subnet-pool-name-ad772ad112ea46dfa47c4a8f661680ee', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-7300654ccbdb40a5a9126cf129d470d1', 'subnet-pool-name-aeedc81a7a5049698bea4b7485eabd7e', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-0ba3bd2b410d42339ff2e142ff6a50f3'), ('subnet-pool-id-ebc6061702044d6eb57b98c2a36da084', 'subnet-pool-name-67708a881c794da38c35019ee85fd882', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-deba0daf86c24c5e8ae641b55ec0108b'), ('subnet-pool-id-9b40c7493a3148b1b535bff5019b4c7f', 'subnet-pool-name-ad772ad112ea46dfa47c4a8f661680ee', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-f9394437b8e14dba9f8bfca40bcf57ad')]
pool = <FakeResource address_scope_id=address-scope-id-f9394437b8e14dba9f8bfca40bcf57ad, default_prefixlen=8, default_quota=None, id=subnet-pool-id-9b40c7493a3148b1b535bff5019b4c7f, ip_version=4, is_default=False, keys=<MagicMock id='4073080172'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-ad772ad112ea46dfa47c4a8f661680ee, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-c9bd9e937aa64fdfb13209bfe0a0f2fc, shared=False, tenant_id=project-id-c9bd9e937aa64fdfb13209bfe0a0f2fc>
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-de1ba472aad8434b93f452a789b7ea98', 8, None, 'subnet-pool-id-88b857f9be994e97885cc710c0ffbc27', 4, False, 32, 8, 'subnet-pool-name-7ab1f08b8a5649a0bca64ee24cb268df', '10.0.0.0/24, 10.1.0.0/24', 'project-id-df0b2fea922341688ce09d07841bd367', 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