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-aa268d7993f741faa8706abfb820d2d1, instance_id=server-id-7bc559ca59db415ea044d4b619d2b462, 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-b6717f81225b41198d837853941211e1, id=floating-ip-id-313f7f9ee19b4a24a9d3ae8b767f7b4e, keys=<MagicMock id='1531903436'>, port_id=port-id-c6a9747feeb946e688bfbac4a25bf9f5, project_id=project-id-adaba57efc2c408b9ec4dc6fbc075098, router_id=router-id-126cd58a7c26413eb324a794abce87a1, status=DOWN, tenant_id=project-id-adaba57efc2c408b9ec4dc6fbc075098>
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-90811720b3634075b39fcdee947745b8', '1.0.9.0', '2.0.9.0', 'server-id-ef9ff0869965410b877bad37e2861331', 'public'), ('floating-ip-id-a0621ab39ddc456f8e21da01747e5848', '1.0.9.0', '2.0.9.0', 'server-id-e2e2174ac15c455da7253a36bc1e5c2a', 'public'), ('floating-ip-id-9f9d3f07a79145409bb28d700f817a9e', '1.0.9.0', '2.0.9.0', 'server-id-5aa51009c28947bc98f3ac5a31ceb605', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-90811720b3634075b39fcdee947745b8, instance_id=server-id-ef9ff0869965410b877bad37e2861331, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-a0621ab39ddc456f8e21da01747e5848, instance_id=server-id-e2e2174ac15c455da7253a36bc1e5c2a, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-9f9d3f07a79145409bb28d700f817a9e, instance_id=server-id-5aa51009c28947bc98f3ac5a31ceb605, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-9f9d3f07a79145409bb28d700f817a9e, instance_id=server-id-5aa51009c28947bc98f3ac5a31ceb605, 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-c3899066b8a34f0aad26917adfcf4102', '1.0.9.0', '2.0.9.0', 'port-id-37a5191305e64629aaa9d526d20217c2'), ('floating-ip-id-502214285a194dce83bf28ef3a462493', '1.0.9.0', '2.0.9.0', 'port-id-109f879a9a6848baae059f65fa8cd086'), ('floating-ip-id-0d5187ecd6dd4ad38e8f0df728e93585', '1.0.9.0', '2.0.9.0', 'port-id-ffd971dd7a254d928701f90057e3fa2d')]
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-c2d946f337f944999751952b80e6660a, id=floating-ip-id-c3899066b8a34f0aad26917adfcf4102, keys=<MagicMock id='1522324876'>, port_id=port-id-37a5191305e64629aaa9d526d20217c2, project_id=project-id-4e57c2bd015e4a949dfd98580d14ba69, router_id=router-id-6f33ebb18717473a81b790d1f468c5bb, status=DOWN, tenant_id=project-id-4e57c2bd015e4a949dfd98580d14ba69>, <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-b25ac236963a455baa6bd812e7d98386, id=floating-ip-id-502214285a194dce83bf28ef3a462493, keys=<MagicMock id='1532755020'>, port_id=port-id-109f879a9a6848baae059f65fa8cd086, project_id=project-id-5433d7bac7344b9eac107f8d683b44fb, router_id=router-id-d115c54d56f344938224e00c18fb56b9, status=DOWN, tenant_id=project-id-5433d7bac7344b9eac107f8d683b44fb>, <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-56a87f0b49ab42369e1d4dc5d17a9548, id=floating-ip-id-0d5187ecd6dd4ad38e8f0df728e93585, keys=<MagicMock id='1532266700'>, port_id=port-id-ffd971dd7a254d928701f90057e3fa2d, project_id=project-id-d48ed42b22394d798d0fede593a128ff, router_id=router-id-ca8944df95cf4f5b8dc5b4944d67eecd, status=DOWN, tenant_id=project-id-d48ed42b22394d798d0fede593a128ff>]
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-56a87f0b49ab42369e1d4dc5d17a9548, id=floating-ip-id-0d5187ecd6dd4ad38e8f0df728e93585, keys=<MagicMock id='1532266700'>, port_id=port-id-ffd971dd7a254d928701f90057e3fa2d, project_id=project-id-d48ed42b22394d798d0fede593a128ff, router_id=router-id-ca8944df95cf4f5b8dc5b4944d67eecd, status=DOWN, tenant_id=project-id-d48ed42b22394d798d0fede593a128ff>
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-53b18440a4ed4dfc84fc36b8abe7d82c', 'server-id-cf3593a9a76a46a3bc6632fe9da9d6f4', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-53b18440a4ed4dfc84fc36b8abe7d82c, instance_id=server-id-cf3593a9a76a46a3bc6632fe9da9d6f4, 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-0ae57a6b689f4ae5a3a7ff4308737e8f', 'floating-ip-id-a8e7ca7449074886b36a177314ba6d9b', 'port-id-fd7a47022ec848fcaaed1a41275dc6dc', 'project-id-8a9da8d44c5c4f43a5753f21781715a0', 'router-id-75ae3bbd32184b7d8c72711c68a03787', '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-0ae57a6b689f4ae5a3a7ff4308737e8f, id=floating-ip-id-a8e7ca7449074886b36a177314ba6d9b, keys=<MagicMock id='1522199148'>, port_id=port-id-fd7a47022ec848fcaaed1a41275dc6dc, project_id=project-id-8a9da8d44c5c4f43a5753f21781715a0, router_id=router-id-75ae3bbd32184b7d8c72711c68a03787, status=DOWN, tenant_id=project-id-8a9da8d44c5c4f43a5753f21781715a0>
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-c4d5821b69704e089040346ceaae213d', False, 'network-label-16fb8c32dc34484b88cb9b30eb9a8597', None, False, '255.255.255.0', None, None, 'project-id-b85cef582cf74c7085f1bcc79bb88605', 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-65662122597544d286a600a602fac600', 'network-name-ad6bb4330d364a3497c89bd918892ee1', '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-9ac3d0dd54c94d2bb4eeb98e47acbef6', 'network-name-e184ace3e9504da5aa4c5da1975d9c46', '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-455ef8ce5941423389550da8ae8ffa22', 'network-name-dfdd22a9747648f7b9388cbf9cdc2a12', 'a, b'), ('network-id-a7ddc642cd02474b85d7f9f95082a912', 'network-name-a0fa60ca27aa46f2aa3d95fbdeafca5b', 'a, b'), ('network-id-9c556670e0d9485f8bc090aacc40129e', 'network-name-06e0752e98664e08847517e3c0f46ca5', 'a, b')]
data_long = [('network-id-455ef8ce5941423389550da8ae8ffa22', 'network-name-dfdd22a9747648f7b9388cbf9cdc2a12', 'ACTIVE', 'project-id-f51a2c14395941a6ab2a1a9b6fd48347', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-a7ddc642cd02474b85d7f9f95082a912', 'network-name-a0fa60ca27aa46f2aa3d95fbdeafca5b', 'ACTIVE', 'project-id-986e5298a0bd423181cf43e991210c11', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-9c556670e0d9485f8bc090aacc40129e', 'network-name-06e0752e98664e08847517e3c0f46ca5', 'ACTIVE', 'project-id-8c45f73c286d42c29ee8770574ccef8a', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-9c556670e0d9485f8bc090aacc40129e, keys=<MagicMock id='1471573644'>, name=network-name-06e0752e98664e08847517e3c0f46ca5, project_id=project-id-8c45f73c286d42c29ee8770574ccef8a, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-8c45f73c286d42c29ee8770574ccef8a>
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-f13bbe5911b94cbf9397ede5c53b117b', 'network-label-3f2cf188d04e46d8bf3d7211e5a0eb8a', '10.0.0.0/24'), ('network-id-5a131a371b4d4f2db012da2494530d72', 'network-label-59ec09c926f544a6bb91f2e6b8e37e97', '10.0.0.0/24'), ('network-id-cbcb5d8d94ac486185cb9fe45359e249', 'network-label-c2e196bae24d40e297ad4576aec6c182', '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-cbcb5d8d94ac486185cb9fe45359e249, injected=False, keys=<MagicMock id='1520738476'>, label=network-label-c2e196bae24d40e297ad4576aec6c182, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-d3f118b9ba8042a7bc0b7f70a5b84f62, 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-dce83c2218084c0d9fc99780b2fbce3d', 'network-name-c9998a74b5a24e65bc13659bce8dcfe2', 'project-id-a8db818caf02415f8ab027bbefa57ce1', '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-65084be1014c4ecfb861ba5fe0e118fc', False, 'network-label-adee4e8a509e40aba725ce269eb12cde', None, False, '255.255.255.0', None, None, 'project-id-c6a2c257062945d4b7469902b0a84327', 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-7ca8283c08b740d08a2a6d75552c1711', '', '', 'ovs', 'normal', 'device-id-f36429e105194e209e810916007caa13', 'compute:nova', '', 'dns-name-1536d5271a3442d68c49ff6ed5bd533b', '', '', 'port-id-13a80088f12a49a48c721a49fb60e0ec', 'fa:16:3e:a9:4e:72', 'port-name-ba2d341260894a6ca669fdb86e582452', 'network-id-fb6664bc25724cc3abd1c587ef89f11f', True, 'project-id-3ca3af8827e3415a9750c67b1856532e', '', '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-a3e75333a30c4f40ab2e3a8fb2e35f24', 'router-name-0378df7d66064cdb9fb7b1bfd5cc5f29', 'project-id-3f9f2f25313346cf8e7b25ab46cef73e')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-a3e75333a30c4f40ab2e3a8fb2e35f24, keys=<MagicMock id='1528639404'>, name=router-name-0378df7d66064cdb9fb7b1bfd5cc5f29, routes=[], status=ACTIVE, tenant_id=project-id-3f9f2f25313346cf8e7b25ab46cef73e>
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-306643c4c56d475aae74040612e66973', 'router-name-02d25511305f49429df31a6714a1301f', 'ACTIVE', 'UP', False, False, 'project-id-0b145293bb2f4718b3e21ef99c9ed56d'), ('router-id-17ba77f5c1ef43d48bf6411ef707aa6b', 'router-name-9732a1e9b6de41af9f086d3f5842fef5', 'ACTIVE', 'UP', False, False, 'project-id-7349601d93f64eac809183d7baccc643'), ('router-id-b197c1dff1d543fea8b8376df270293d', 'router-name-c539369d64d64dcb86ef6d7308192d78', 'ACTIVE', 'UP', False, False, 'project-id-3b732a76d0bd41afad494e0b033400b9')]
data_long = [('router-id-306643c4c56d475aae74040612e66973', 'router-name-02d25511305f49429df31a6714a1301f', 'ACTIVE', 'UP', False, False, 'project-id-0b145293bb2f4718b3e21ef99c9ed56d', [], '{}', ''), ('router-id-17ba77f5c1ef43d48bf6411ef707aa6b', 'router-name-9732a1e9b6de41af9f086d3f5842fef5', 'ACTIVE', 'UP', False, False, 'project-id-7349601d93f64eac809183d7baccc643', [], '{}', ''), ('router-id-b197c1dff1d543fea8b8376df270293d', 'router-name-c539369d64d64dcb86ef6d7308192d78', 'ACTIVE', 'UP', False, False, 'project-id-3b732a76d0bd41afad494e0b033400b9', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-b197c1dff1d543fea8b8376df270293d, keys=<MagicMock id='1528760012'>, name=router-name-c539369d64d64dcb86ef6d7308192d78, routes=[], status=ACTIVE, tenant_id=project-id-3b732a76d0bd41afad494e0b033400b9>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-306643c4c56d475aae74040612e66973, keys=<MagicMock id='1532198156'>, name=router-name-02d25511305f49429df31a6714a1301f, routes=[], status=ACTIVE, tenant_id=project-id-0b145293bb2f4718b3e21ef99c9ed56d>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-17ba77f5c1ef43d48bf6411ef707aa6b, keys=<MagicMock id='1529083500'>, name=router-name-9732a1e9b6de41af9f086d3f5842fef5, routes=[], status=ACTIVE, tenant_id=project-id-7349601d93f64eac809183d7baccc643>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-b197c1dff1d543fea8b8376df270293d, keys=<MagicMock id='1528760012'>, name=router-name-c539369d64d64dcb86ef6d7308192d78, routes=[], status=ACTIVE, tenant_id=project-id-3b732a76d0bd41afad494e0b033400b9>]
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-73e0fb5dee464319b88b874fe26a29fe', 'router-name-efc7b292a5064eed8586c8d27a152dc6', 'project-id-97e1579abcfc4acb83267dd59072a708')
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-ce2cb5c8e0ca4a048998533d3de23c82', 'security-group-name-18315cc6e9de4597909665f1adb7abab', 'security-group-description-5138cac57599448e9043d2f938b4adb6'),)
expected_data_all_projects = (('security-group-id-ce2cb5c8e0ca4a048998533d3de23c82', 'security-group-name-18315cc6e9de4597909665f1adb7abab', 'security-group-description-5138cac57599448e9043d2f938b4adb6', 'project-id-aa89e41be4bb4c50b7b77c9872f0cdb0'),)
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-76a290f47694435cacd2ea12af844d41', 'security-group-name-7eaa20bc1d294e909791da8efdd2d31e', 'security-group-description-ae582dd79d594a8e81b77a965614f7ba', 'project-id-fb0c1881c387429e9aaf3968631b2889'),)
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-0414e30a7531429e8cd14ce674903783', 'icmp', '0.0.0.0/0', 'security-group-id-8d18575236df4d07aaa4c924643922e9', '', '')
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-9fe1692971d6491a804473580b5de302', None, None, 'project-id-9acdb86d53b047cebdb7180e1d7b36c4', None, 'remote-security-group-id-0deed5e618c44c29871150c53c9ec694', None, 'security-group-id-474e0141beac4e5b9f914e8c9d3cbe96')
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-0b4e3caabc7a42ef86d0a599231febdf', 'subnet-name-5347f1ec3eeb4b1ab04237752ce663a3', 'network-id-698487a0bdd648c0945bcd5b1d8efe4f', '10.10.10.0/24'), ('subnet-id-7c1a493c440c4e6298f05400c97b954b', 'subnet-name-d05a4e6748844996b09a349e287a7ee0', 'network-id-81ae55aebf9b44a388c9412fa025ab4a', '10.10.10.0/24'), ('subnet-id-b1396abf011e45409993bd49c5a06d40', 'subnet-name-55fc59dceb8a4b4cb5fbda3de5e27191', 'network-id-6da4542e5f7b49b0b35c0f75f52e59ed', '10.10.10.0/24')]
data_long = [('subnet-id-0b4e3caabc7a42ef86d0a599231febdf', 'subnet-name-5347f1ec3eeb4b1ab04237752ce663a3', 'network-id-698487a0bdd648c0945bcd5b1d8efe4f', '10.10.10.0/24', 'project-id-687c13e14d6f4e2581651aadad7c7f2d', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-7c1a493c440c4e6298f05400c97b954b', 'subnet-name-d05a4e6748844996b09a349e287a7ee0', 'network-id-81ae55aebf9b44a388c9412fa025ab4a', '10.10.10.0/24', 'project-id-f32f700971db4f9a866e4860f2015c78', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-b1396abf011e45409993bd49c5a06d40', 'subnet-name-55fc59dceb8a4b4cb5fbda3de5e27191', 'network-id-6da4542e5f7b49b0b35c0f75f52e59ed', '10.10.10.0/24', 'project-id-fdecceefe2c34361b6cb2cfb433ee399', 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-b1396abf011e45409993bd49c5a06d40, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='1541380236'>, name=subnet-name-55fc59dceb8a4b4cb5fbda3de5e27191, network_id=network-id-6da4542e5f7b49b0b35c0f75f52e59ed, project_id=project-id-fdecceefe2c34361b6cb2cfb433ee399, subnetpool_id=None, tenant_id=project-id-fdecceefe2c34361b6cb2cfb433ee399>
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-ab501bf8d98a406082be6e874b18bdc4', '4', 'None', 'None', 'subnet-name-9c0b6fb19f554442b80d56eb4b288540', 'network-id-e725262bc0104211b5053fedddd19c4a', 'project-id-f3a7f0fc2993419398885fa84985f004', '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-d6c6e709a3a74d9c877808a6029b803f', 'subnet-pool-name-45b40866207148ec89761a9c396c4221', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-5780cb5395434dedaa091247c5696235', 'subnet-pool-name-f81fb98ade224567bdfe187064295155', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-5562ebc1e7a04f2faa5708ee5fa5918b', 'subnet-pool-name-2b9e57c3f4e646dc8ce1bb90ece2a5ff', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-d6c6e709a3a74d9c877808a6029b803f', 'subnet-pool-name-45b40866207148ec89761a9c396c4221', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-24ebb4e44af74ef0860161940880c685'), ('subnet-pool-id-5780cb5395434dedaa091247c5696235', 'subnet-pool-name-f81fb98ade224567bdfe187064295155', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-2cb1f3787d0f4028bb87abcc4ce35ead'), ('subnet-pool-id-5562ebc1e7a04f2faa5708ee5fa5918b', 'subnet-pool-name-2b9e57c3f4e646dc8ce1bb90ece2a5ff', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-7ab3e2c5eef04e188485fe57842b53a5')]
pool = <FakeResource address_scope_id=address-scope-id-7ab3e2c5eef04e188485fe57842b53a5, default_prefixlen=8, default_quota=None, id=subnet-pool-id-5562ebc1e7a04f2faa5708ee5fa5918b, ip_version=4, is_default=False, keys=<MagicMock id='1540259308'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-2b9e57c3f4e646dc8ce1bb90ece2a5ff, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-44c4582b0c38414380fb4bc4b39fb74d, shared=False, tenant_id=project-id-44c4582b0c38414380fb4bc4b39fb74d>
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-474c091f66b44c6ca4d3e7804bcf002e', 8, None, 'subnet-pool-id-8642b484f3ba4441aaeeccb59c8c4baf', 4, False, 32, 8, 'subnet-pool-name-fb267053265645eaa7b7468a633af201', '10.0.0.0/24, 10.1.0.0/24', 'project-id-feeac4c0756741158635da516597229b', 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