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-2692a63bff004187a3ce0d0e55dae4c9, instance_id=server-id-61382f8dc5214c7692b1cf8525eb7077, 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-a4f9e892bfa048a4804afe512ef3b0aa, id=floating-ip-id-e616fc1ed5e344ae8fd2fa6948a32d7e, keys=<MagicMock id='165552272'>, port_id=port-id-638ca39592df4186a109b78f3576c7ba, project_id=project-id-a9d731d42d79496ab41e9631fefe55e7, router_id=router-id-7c63909fe2904b70a353d20765dc8357, status=DOWN, tenant_id=project-id-a9d731d42d79496ab41e9631fefe55e7>
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-f52b55667772441fbe6b775841ddbfb1', '1.0.9.0', '2.0.9.0', 'server-id-bb1a5c6e95e94490ad8a1ebf8dbd0abd', 'public'), ('floating-ip-id-ed80f8191d854f89baadaeb9c9965f3f', '1.0.9.0', '2.0.9.0', 'server-id-01ae5175ac3649c891bfcdfe0a39e2d8', 'public'), ('floating-ip-id-c9bb536cf5b94145aac1a1eead4f3a03', '1.0.9.0', '2.0.9.0', 'server-id-3e7f4e27e7f04cce822f9c2aa7a88c3c', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-f52b55667772441fbe6b775841ddbfb1, instance_id=server-id-bb1a5c6e95e94490ad8a1ebf8dbd0abd, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-ed80f8191d854f89baadaeb9c9965f3f, instance_id=server-id-01ae5175ac3649c891bfcdfe0a39e2d8, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-c9bb536cf5b94145aac1a1eead4f3a03, instance_id=server-id-3e7f4e27e7f04cce822f9c2aa7a88c3c, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-c9bb536cf5b94145aac1a1eead4f3a03, instance_id=server-id-3e7f4e27e7f04cce822f9c2aa7a88c3c, 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-eb606d2f47d7439ea40ce76d7dec11c1', '1.0.9.0', '2.0.9.0', 'port-id-8b2f579dcc144d579b3285934ee372b7'), ('floating-ip-id-4c0bc20ed69640138b0e6dd640951f29', '1.0.9.0', '2.0.9.0', 'port-id-a8aefbd2621b4f3cbfd61036a7b0bcb9'), ('floating-ip-id-a35f740d9aca407cac70ac2d556d1d54', '1.0.9.0', '2.0.9.0', 'port-id-b02ab2ab6eea4be58c0388fe924bd947')]
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-759224d88d75400c8b8c357466e77870, id=floating-ip-id-eb606d2f47d7439ea40ce76d7dec11c1, keys=<MagicMock id='111312592'>, port_id=port-id-8b2f579dcc144d579b3285934ee372b7, project_id=project-id-730fa8c76e124fa1b4c8824914e36429, router_id=router-id-68899155b0144e02a2a176fa567a51b3, status=DOWN, tenant_id=project-id-730fa8c76e124fa1b4c8824914e36429>, <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-890ef1e5fa2c4aa3a7712ed1aad1adf0, id=floating-ip-id-4c0bc20ed69640138b0e6dd640951f29, keys=<MagicMock id='111342864'>, port_id=port-id-a8aefbd2621b4f3cbfd61036a7b0bcb9, project_id=project-id-8a55fe9a50724ef09a29dd408232c909, router_id=router-id-60a3b24e84154510b6c57b2697e1a8de, status=DOWN, tenant_id=project-id-8a55fe9a50724ef09a29dd408232c909>, <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-b0045e2021a94769a8ad09b1c13c9cd1, id=floating-ip-id-a35f740d9aca407cac70ac2d556d1d54, keys=<MagicMock id='154820944'>, port_id=port-id-b02ab2ab6eea4be58c0388fe924bd947, project_id=project-id-38984e8222cf45f38ae1e1444c772540, router_id=router-id-8e7950233882405c9cf9eb41da671f0c, status=DOWN, tenant_id=project-id-38984e8222cf45f38ae1e1444c772540>]
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-b0045e2021a94769a8ad09b1c13c9cd1, id=floating-ip-id-a35f740d9aca407cac70ac2d556d1d54, keys=<MagicMock id='154820944'>, port_id=port-id-b02ab2ab6eea4be58c0388fe924bd947, project_id=project-id-38984e8222cf45f38ae1e1444c772540, router_id=router-id-8e7950233882405c9cf9eb41da671f0c, status=DOWN, tenant_id=project-id-38984e8222cf45f38ae1e1444c772540>
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-f9b3d8f22f0549618062691913da6087', 'server-id-9068c010d47d4cc1a223cc9cf60dee09', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-f9b3d8f22f0549618062691913da6087, instance_id=server-id-9068c010d47d4cc1a223cc9cf60dee09, 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-6edc3205342145f1938c7393f3e5b5dd', 'floating-ip-id-c335b961cfa540a99bf70ff6d215e782', 'port-id-8cd390f4e8964ff39290a6e1b393940b', 'project-id-275bc0f595784c45b46a001ee53ddba0', 'router-id-b637a7a6d07e45b8a688ed12100651e0', '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-6edc3205342145f1938c7393f3e5b5dd, id=floating-ip-id-c335b961cfa540a99bf70ff6d215e782, keys=<MagicMock id='164891216'>, port_id=port-id-8cd390f4e8964ff39290a6e1b393940b, project_id=project-id-275bc0f595784c45b46a001ee53ddba0, router_id=router-id-b637a7a6d07e45b8a688ed12100651e0, status=DOWN, tenant_id=project-id-275bc0f595784c45b46a001ee53ddba0>
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-f7e716585eb34709b88c355f542224e6', False, 'network-label-2860bdeecfc74902bd75515010b65db2', None, False, '255.255.255.0', None, None, 'project-id-364cbff01fb7405e87e33ad2bb0645d5', 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-73c834c9ec2b47b5af182f14e21e3e3f', 'network-name-80726848558e4abdb8d3f08efd173a50', '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-c9728da060a44ad5986577cc16baa61b', 'network-name-f978777d1c23405ea9adb54d47be10be', '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-8509246efebd4c92abe65b37b6ab209c', 'network-name-b598750d5ac5460c92be1fe4da18d4d4', 'a, b'), ('network-id-c1dde6537e7c454abf440da70e540a39', 'network-name-550e57f1087e489c8b848fbd294ccfd2', 'a, b'), ('network-id-1f1078be0c9c4d8082bda5b0bae33120', 'network-name-082779cb2c6c4de4be5ec96cc1dc3010', 'a, b')]
data_long = [('network-id-8509246efebd4c92abe65b37b6ab209c', 'network-name-b598750d5ac5460c92be1fe4da18d4d4', 'ACTIVE', 'project-id-e33042be22e34084ae99ca5b5656d7bb', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-c1dde6537e7c454abf440da70e540a39', 'network-name-550e57f1087e489c8b848fbd294ccfd2', 'ACTIVE', 'project-id-1d443e785ddc4e00a619f9052ef61c03', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-1f1078be0c9c4d8082bda5b0bae33120', 'network-name-082779cb2c6c4de4be5ec96cc1dc3010', 'ACTIVE', 'project-id-6e80e0bdb9d64fa7a68db3e405e6402f', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-1f1078be0c9c4d8082bda5b0bae33120, keys=<MagicMock id='152667344'>, name=network-name-082779cb2c6c4de4be5ec96cc1dc3010, project_id=project-id-6e80e0bdb9d64fa7a68db3e405e6402f, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-6e80e0bdb9d64fa7a68db3e405e6402f>
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-e882d687cd0f404fa1ed652c1a5e606c', 'network-label-a9e1bdb636844b878ee2534230b2ca16', '10.0.0.0/24'), ('network-id-cd9d5260ce7a40f7a44fd74e347c84b9', 'network-label-85714f5ede8c48528a9528bdab7e1cf0', '10.0.0.0/24'), ('network-id-1acc60f5f43a4bd6ad0399641d90cadd', 'network-label-cc5a4b334819413fad2bc407e5adc51c', '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-1acc60f5f43a4bd6ad0399641d90cadd, injected=False, keys=<MagicMock id='168508112'>, label=network-label-cc5a4b334819413fad2bc407e5adc51c, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-c130f413d1d54a5fb3d2ed5aac3b8f08, 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-e454b9ff9f0644a48f9df0d749ee49ee', 'network-name-671a17d1d09246b8b9e54b6cbaf8fa16', 'project-id-171127e1dd6f41049d0bb2f4d733a4a5', '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-c7b2deb7e3d344d69573c3376b2f6279', False, 'network-label-31872500446540c88260e6a0ecee032f', None, False, '255.255.255.0', None, None, 'project-id-6fae3100b3b748e9a8ec930f0f2bafca', 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-3071ff1dda36453c9b4a5af3f7b44ecf', '', '', 'ovs', 'normal', 'device-id-7a20914c4028497d9863c7263dddf710', 'compute:nova', '', 'dns-name-94dcd0984e1a4984bf022a21970a274d', '', '', 'port-id-37fbf8130c5e4cc78128cf8281819f90', 'fa:16:3e:a9:4e:72', 'port-name-4000b8512f494ac1870b2606db3d41ab', 'network-id-3ea8eb5190594df2a8aaa1488b99e938', True, 'project-id-851fdaef8a0149ffa99742a82eca1ced', '', '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-0150af65d51745ea99b97f7c793c493e', 'router-name-8b0f07f247ca485391093a984b2f46a7', 'project-id-a0fd5c1bc5c14a56b9124fdb6cb3d49d')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-0150af65d51745ea99b97f7c793c493e, keys=<MagicMock id='172002000'>, name=router-name-8b0f07f247ca485391093a984b2f46a7, routes=[], status=ACTIVE, tenant_id=project-id-a0fd5c1bc5c14a56b9124fdb6cb3d49d>
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-9b7e6dbef3de441cb0801a454f78877b', 'router-name-f1785efd02684734a22989818c56b7ac', 'ACTIVE', 'UP', False, False, 'project-id-b04fac7d4fb44c328ac22b7430b11aab'), ('router-id-d8563efc0bba44699777b5ba54d1375c', 'router-name-e09bf98f37d14614b3320cd37c66d8a4', 'ACTIVE', 'UP', False, False, 'project-id-d5cc1f478409453bb4098110bc9d3ccd'), ('router-id-a21078b42ea94adbb04977c665fc8992', 'router-name-1dc77933a38240a4a873736bb1467787', 'ACTIVE', 'UP', False, False, 'project-id-8dd275d3d7d04129b20a3ee81bad2d42')]
data_long = [('router-id-9b7e6dbef3de441cb0801a454f78877b', 'router-name-f1785efd02684734a22989818c56b7ac', 'ACTIVE', 'UP', False, False, 'project-id-b04fac7d4fb44c328ac22b7430b11aab', [], '{}', ''), ('router-id-d8563efc0bba44699777b5ba54d1375c', 'router-name-e09bf98f37d14614b3320cd37c66d8a4', 'ACTIVE', 'UP', False, False, 'project-id-d5cc1f478409453bb4098110bc9d3ccd', [], '{}', ''), ('router-id-a21078b42ea94adbb04977c665fc8992', 'router-name-1dc77933a38240a4a873736bb1467787', 'ACTIVE', 'UP', False, False, 'project-id-8dd275d3d7d04129b20a3ee81bad2d42', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-a21078b42ea94adbb04977c665fc8992, keys=<MagicMock id='172067728'>, name=router-name-1dc77933a38240a4a873736bb1467787, routes=[], status=ACTIVE, tenant_id=project-id-8dd275d3d7d04129b20a3ee81bad2d42>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-9b7e6dbef3de441cb0801a454f78877b, keys=<MagicMock id='172061648'>, name=router-name-f1785efd02684734a22989818c56b7ac, routes=[], status=ACTIVE, tenant_id=project-id-b04fac7d4fb44c328ac22b7430b11aab>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-d8563efc0bba44699777b5ba54d1375c, keys=<MagicMock id='172070864'>, name=router-name-e09bf98f37d14614b3320cd37c66d8a4, routes=[], status=ACTIVE, tenant_id=project-id-d5cc1f478409453bb4098110bc9d3ccd>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-a21078b42ea94adbb04977c665fc8992, keys=<MagicMock id='172067728'>, name=router-name-1dc77933a38240a4a873736bb1467787, routes=[], status=ACTIVE, tenant_id=project-id-8dd275d3d7d04129b20a3ee81bad2d42>]
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-6d64000214da40a4972372ce473d7ac4', 'router-name-c5152307be774fdb911b8bb9b34bd994', 'project-id-cbf5bc6664a94bf7aa9a60198b235327')
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-f18819e3e4d741f6a8d9173d7d3744b0', 'security-group-name-b55d4fc78bc84535b1c5480e7df44f7a', 'security-group-description-a7872651c79a4abe809f32e903052cf8'),)
expected_data_all_projects = (('security-group-id-f18819e3e4d741f6a8d9173d7d3744b0', 'security-group-name-b55d4fc78bc84535b1c5480e7df44f7a', 'security-group-description-a7872651c79a4abe809f32e903052cf8', 'project-id-fea2cce9dda54506b8960b5697265e81'),)
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-a25336675fe9469cb5b82ba654f3ed3c', 'security-group-name-d2180edc4a244c96bf2c7652af0b6e0f', 'security-group-description-aa1a759a051c4a52821bb75aece59938', 'project-id-b2f4b6d7756b4c3a926f74829504e347'),)
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-641a1fa34ecb4abe9517c23e479e078d', 'icmp', '0.0.0.0/0', 'security-group-id-d7356ab7fff14aa6bc5f4007230f72bc', '', '')
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-2a609e0792494e1a9f6ae4cb053ecd9c', None, None, 'project-id-e2712a1ab2ae446e9f3df0a76321fcb0', None, 'remote-security-group-id-73ab8e0315274de7aabea978d2880196', None, 'security-group-id-aebd905b84dc40e483568c6a388fc426')
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-512d323b842345269ddca52f65b8e179', 'subnet-name-1a81d64ba0814523b3c6ffc7e970f21f', 'network-id-48cf47a4c3c34127abda2833cdd7cc96', '10.10.10.0/24'), ('subnet-id-a8546efa16744c6995af834ad8ca0108', 'subnet-name-87d9a472b6434c82b7ca5f94cc1e85da', 'network-id-4191a4f9c6ad41debdbc0882068b55da', '10.10.10.0/24'), ('subnet-id-b7c312e93b7d49b78ec9ce9ad2c50ff8', 'subnet-name-81e3bb599d774dea859d34f2cc663ba7', 'network-id-3398aeb5aa0846d7887b525a3f12d032', '10.10.10.0/24')]
data_long = [('subnet-id-512d323b842345269ddca52f65b8e179', 'subnet-name-1a81d64ba0814523b3c6ffc7e970f21f', 'network-id-48cf47a4c3c34127abda2833cdd7cc96', '10.10.10.0/24', 'project-id-6dd7bd204b574ce994cfe359309044fe', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-a8546efa16744c6995af834ad8ca0108', 'subnet-name-87d9a472b6434c82b7ca5f94cc1e85da', 'network-id-4191a4f9c6ad41debdbc0882068b55da', '10.10.10.0/24', 'project-id-0694e69dbe414c12a7552eb827fa6348', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-b7c312e93b7d49b78ec9ce9ad2c50ff8', 'subnet-name-81e3bb599d774dea859d34f2cc663ba7', 'network-id-3398aeb5aa0846d7887b525a3f12d032', '10.10.10.0/24', 'project-id-7060fab68dc24a9d8cba6bc88360cd45', 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-b7c312e93b7d49b78ec9ce9ad2c50ff8, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='65706000'>, name=subnet-name-81e3bb599d774dea859d34f2cc663ba7, network_id=network-id-3398aeb5aa0846d7887b525a3f12d032, project_id=project-id-7060fab68dc24a9d8cba6bc88360cd45, subnetpool_id=None, tenant_id=project-id-7060fab68dc24a9d8cba6bc88360cd45>
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-92e4430506104a50b263e49d5be22be6', '4', 'None', 'None', 'subnet-name-ab5e731af4b842b5865274abae32cb8b', 'network-id-2e7ca7b9d30347bab510f04aa058a997', 'project-id-1c0a3b61f4f6414d84df61fc94614e6d', '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-f849e1b48e9140b5b028e88cf3469d92', 'subnet-pool-name-d0e90905b16f46b8b5ba41c1a2105194', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-f6ed9da498db4db5a8fe4af18a0ff75d', 'subnet-pool-name-dddd450b0fd44d7ab92c21967c9e77b4', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-aa84d6acead74656a69295ef0bff8281', 'subnet-pool-name-2c3b7152907b46619200803598f95769', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-f849e1b48e9140b5b028e88cf3469d92', 'subnet-pool-name-d0e90905b16f46b8b5ba41c1a2105194', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-1242a45ec9674aaba8334ca78901c00d'), ('subnet-pool-id-f6ed9da498db4db5a8fe4af18a0ff75d', 'subnet-pool-name-dddd450b0fd44d7ab92c21967c9e77b4', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-e6483b4d3d0340a185f6c75011f39457'), ('subnet-pool-id-aa84d6acead74656a69295ef0bff8281', 'subnet-pool-name-2c3b7152907b46619200803598f95769', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-9237e682fc1a4ab2b6f47c36dd83186a')]
pool = <FakeResource address_scope_id=address-scope-id-9237e682fc1a4ab2b6f47c36dd83186a, default_prefixlen=8, default_quota=None, id=subnet-pool-id-aa84d6acead74656a69295ef0bff8281, ip_version=4, is_default=False, keys=<MagicMock id='140141840'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-2c3b7152907b46619200803598f95769, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-be2afcdafbd049bcb7ce022b358ec931, shared=False, tenant_id=project-id-be2afcdafbd049bcb7ce022b358ec931>
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-cd116da5ca174a6eab4e3ee59fccd86b', 8, None, 'subnet-pool-id-606da478bf3b4f138be32ca7350ad53a', 4, False, 32, 8, 'subnet-pool-name-1808ae6e297b4fa1810eb5252f128767', '10.0.0.0/24, 10.1.0.0/24', 'project-id-f2d791fd308e427f8722c1ddba3c901b', 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