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-4ba20f586fd34f92bc2162e9db7ba44b, instance_id=server-id-27eb9315adfe4964b31277873e322489, 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-c7e7e924aee648efb1d7e3324429b2b5, id=floating-ip-id-7fe43783ead34054b7d4bb9f04e2b5bf, keys=<MagicMock id='140304058990928'>, port_id=port-id-ab3f69416de8478db70b1ab90f25654a, project_id=project-id-f80681cdd8b44ec6b874c5773a4b82f1, router_id=router-id-4c68f604b5314fe4a7a7eaf4a1859c0e, status=DOWN, tenant_id=project-id-f80681cdd8b44ec6b874c5773a4b82f1>
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-bc19f1fc2d884458a5faf84ff162d398', '1.0.9.0', '2.0.9.0', 'server-id-75e35054d66f4ecd8d899ff7dee120f5', 'public'), ('floating-ip-id-f6e795d88ca84c95bac3c70aa9837292', '1.0.9.0', '2.0.9.0', 'server-id-55ee4c062cf1437187dd9753cc5ed903', 'public'), ('floating-ip-id-c471624fdde74d96ab686123909fb776', '1.0.9.0', '2.0.9.0', 'server-id-f63388aef1c749189d15b8103a4f51d5', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-bc19f1fc2d884458a5faf84ff162d398, instance_id=server-id-75e35054d66f4ecd8d899ff7dee120f5, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-f6e795d88ca84c95bac3c70aa9837292, instance_id=server-id-55ee4c062cf1437187dd9753cc5ed903, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-c471624fdde74d96ab686123909fb776, instance_id=server-id-f63388aef1c749189d15b8103a4f51d5, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-c471624fdde74d96ab686123909fb776, instance_id=server-id-f63388aef1c749189d15b8103a4f51d5, 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-47b484f3639b42459a1995f61e3e3899', '1.0.9.0', '2.0.9.0', 'port-id-fbe9a405cf95490d8e8dfee4b62e384a'), ('floating-ip-id-74dd75b27e0d4475821a7e00fdd3b71d', '1.0.9.0', '2.0.9.0', 'port-id-858f91592c564db59a24ab15f0e703e1'), ('floating-ip-id-9a24ae28dfbe4a3c87bfbaf98f6dd1ca', '1.0.9.0', '2.0.9.0', 'port-id-3b50829b8ec148b583989179728a7162')]
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-9c7a03ddec97458a81d043da66975ab5, id=floating-ip-id-47b484f3639b42459a1995f61e3e3899, keys=<MagicMock id='140304175983056'>, port_id=port-id-fbe9a405cf95490d8e8dfee4b62e384a, project_id=project-id-e5e9e3638add4893b4de02800931e8b5, router_id=router-id-a06ff55d894a422692010d42987b474c, status=DOWN, tenant_id=project-id-e5e9e3638add4893b4de02800931e8b5>, <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-d7362c0bb7ea4141a4c9a176c7019875, id=floating-ip-id-74dd75b27e0d4475821a7e00fdd3b71d, keys=<MagicMock id='140304082363152'>, port_id=port-id-858f91592c564db59a24ab15f0e703e1, project_id=project-id-a7602c11f4094048ac8be5e85dae2374, router_id=router-id-b6ad67e31da94cf89c9f32219fa54aee, status=DOWN, tenant_id=project-id-a7602c11f4094048ac8be5e85dae2374>, <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-8a2629a2634b444c9dcc759cdb028bda, id=floating-ip-id-9a24ae28dfbe4a3c87bfbaf98f6dd1ca, keys=<MagicMock id='140304077401040'>, port_id=port-id-3b50829b8ec148b583989179728a7162, project_id=project-id-dd46fe58a030486b82274f604ed0a555, router_id=router-id-983af25945e14a139689c7f8ba5e2b7a, status=DOWN, tenant_id=project-id-dd46fe58a030486b82274f604ed0a555>]
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-8a2629a2634b444c9dcc759cdb028bda, id=floating-ip-id-9a24ae28dfbe4a3c87bfbaf98f6dd1ca, keys=<MagicMock id='140304077401040'>, port_id=port-id-3b50829b8ec148b583989179728a7162, project_id=project-id-dd46fe58a030486b82274f604ed0a555, router_id=router-id-983af25945e14a139689c7f8ba5e2b7a, status=DOWN, tenant_id=project-id-dd46fe58a030486b82274f604ed0a555>
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-8e55e66457fd4c9cab12b932b451d90e', 'server-id-36e96f1c51d744e5a3f54d364fddb6f2', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-8e55e66457fd4c9cab12b932b451d90e, instance_id=server-id-36e96f1c51d744e5a3f54d364fddb6f2, 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-9b34bf0909854a849831cfc85b2a6c89', 'floating-ip-id-7f66fa6e501c4a10aaf9c3818c6e4efd', 'port-id-d4eaf01c4c7c447c9a1aae46d1d45b0f', 'project-id-d372e045710d4e84a5cea23febb8b256', 'router-id-3587706c13b6493fa60e3c05385e4130', '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-9b34bf0909854a849831cfc85b2a6c89, id=floating-ip-id-7f66fa6e501c4a10aaf9c3818c6e4efd, keys=<MagicMock id='140304057583248'>, port_id=port-id-d4eaf01c4c7c447c9a1aae46d1d45b0f, project_id=project-id-d372e045710d4e84a5cea23febb8b256, router_id=router-id-3587706c13b6493fa60e3c05385e4130, status=DOWN, tenant_id=project-id-d372e045710d4e84a5cea23febb8b256>
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-2ada9897b2c546e7901fee3dd12e82d0', False, 'network-label-934f57157e5641ad9bbfacf17c02764e', None, False, '255.255.255.0', None, None, 'project-id-54de7617d0034c3e899cbc40c456af46', 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-7f803fa0abbf4b3b921691580ea627d6', 'network-name-29cdca0af80c4eef9a79eddabed4aec2', '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-f8f5db96edf34679abdbb779f42c6b7a', 'network-name-9e249752c1284deca2bd3e25555b830b', '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-4df80c51068b4617b5cd1001b94572a8', 'network-name-d75a8d7a868e43ec828aefadfb9fce73', 'a, b'), ('network-id-be4042d84c464e9c9aa8bcd78e3e6cc1', 'network-name-06d3e1c0027648c5a9838825ee8159b4', 'a, b'), ('network-id-2104a3253b4843f5b7f2aff5ebb7877c', 'network-name-8af9a899ee524846b89a752e023f266f', 'a, b')]
data_long = [('network-id-4df80c51068b4617b5cd1001b94572a8', 'network-name-d75a8d7a868e43ec828aefadfb9fce73', 'ACTIVE', 'project-id-257632cbfd0f4de9aa22f12ae1953e24', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-be4042d84c464e9c9aa8bcd78e3e6cc1', 'network-name-06d3e1c0027648c5a9838825ee8159b4', 'ACTIVE', 'project-id-00c59c2dad1143ef9ec705f3379bc762', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-2104a3253b4843f5b7f2aff5ebb7877c', 'network-name-8af9a899ee524846b89a752e023f266f', 'ACTIVE', 'project-id-89b1009ac3144a60a12da5b0fc5f6fc2', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-2104a3253b4843f5b7f2aff5ebb7877c, keys=<MagicMock id='140304153486672'>, name=network-name-8af9a899ee524846b89a752e023f266f, project_id=project-id-89b1009ac3144a60a12da5b0fc5f6fc2, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-89b1009ac3144a60a12da5b0fc5f6fc2>
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-2fbc03949db04d9281abdc335e020cf6', 'network-label-7051c06c3143437699c4f2072d3690a8', '10.0.0.0/24'), ('network-id-ef76f86350da4e2294444b861aea94ca', 'network-label-9be3a6fd34384c52b06109eb846f0427', '10.0.0.0/24'), ('network-id-98ef6a31b43342d8b4a1a12139d97f4f', 'network-label-5450b92dad88418ab0d636133eb4f99f', '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-98ef6a31b43342d8b4a1a12139d97f4f, injected=False, keys=<MagicMock id='140304045761296'>, label=network-label-5450b92dad88418ab0d636133eb4f99f, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-2f96924deeaa4780ac5f421afa95ae3a, 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-e19c949dae824484b481ee8f80357d14', 'network-name-c042f7091a44464592cf735cd1da4347', 'project-id-7e57341e5aaa434e9846a77ef80bc465', '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-b419c7ab11f0497cba9bcbdd77e8e4c6', False, 'network-label-803682ea8dee49e99e03f340e719b677', None, False, '255.255.255.0', None, None, 'project-id-93f3c04ba40645efbbb3c6604a53db15', 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-04dd7660e13e4e4cb05a49bca6cae205', '', '', 'ovs', 'normal', 'device-id-5dbe5e0856dd42938a941e68b5013485', 'compute:nova', '', 'dns-name-2e2bba429af049ff9668c0d73a4a9057', '', '', 'port-id-24d8d266b8434bb290de96400b8ca46d', 'fa:16:3e:a9:4e:72', 'port-name-aab8d3c37127415e9707d0db3a381a1e', 'network-id-c595d22e0165462eb6cd937caecad5fc', True, 'project-id-d533fd06f58943be893f301848aec58c', '', '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-f291ff21057548e19197e6f6227b0583', 'router-name-1e91989a2ea64d8a96f22131f9d9d291', 'project-id-167a9b89810e48d196dbad9df83f6ce0')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-f291ff21057548e19197e6f6227b0583, keys=<MagicMock id='140304185652880'>, name=router-name-1e91989a2ea64d8a96f22131f9d9d291, routes=[], status=ACTIVE, tenant_id=project-id-167a9b89810e48d196dbad9df83f6ce0>
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-ebdc71682f8e434681dae121d4575e61', 'router-name-e6660472ac514bc8a3b6808fb267efb0', 'ACTIVE', 'UP', False, False, 'project-id-54f360dadbf043b9b63acad765493ab9'), ('router-id-ae3e4505330345bd8c095656aaf75072', 'router-name-50cce76ddb3d4069a5ea48f3c2038b0f', 'ACTIVE', 'UP', False, False, 'project-id-d007324ca7e341c8a912931592dee4cc'), ('router-id-5737b79dc25646a0bd4b640d9cd51b67', 'router-name-f404bfc280b0498e81b5391252325684', 'ACTIVE', 'UP', False, False, 'project-id-cc4e1724451c4f83bc9918e47c05b981')]
data_long = [('router-id-ebdc71682f8e434681dae121d4575e61', 'router-name-e6660472ac514bc8a3b6808fb267efb0', 'ACTIVE', 'UP', False, False, 'project-id-54f360dadbf043b9b63acad765493ab9', [], '{}', ''), ('router-id-ae3e4505330345bd8c095656aaf75072', 'router-name-50cce76ddb3d4069a5ea48f3c2038b0f', 'ACTIVE', 'UP', False, False, 'project-id-d007324ca7e341c8a912931592dee4cc', [], '{}', ''), ('router-id-5737b79dc25646a0bd4b640d9cd51b67', 'router-name-f404bfc280b0498e81b5391252325684', 'ACTIVE', 'UP', False, False, 'project-id-cc4e1724451c4f83bc9918e47c05b981', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-5737b79dc25646a0bd4b640d9cd51b67, keys=<MagicMock id='140304164347344'>, name=router-name-f404bfc280b0498e81b5391252325684, routes=[], status=ACTIVE, tenant_id=project-id-cc4e1724451c4f83bc9918e47c05b981>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-ebdc71682f8e434681dae121d4575e61, keys=<MagicMock id='140304083259792'>, name=router-name-e6660472ac514bc8a3b6808fb267efb0, routes=[], status=ACTIVE, tenant_id=project-id-54f360dadbf043b9b63acad765493ab9>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-ae3e4505330345bd8c095656aaf75072, keys=<MagicMock id='140304189751696'>, name=router-name-50cce76ddb3d4069a5ea48f3c2038b0f, routes=[], status=ACTIVE, tenant_id=project-id-d007324ca7e341c8a912931592dee4cc>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-5737b79dc25646a0bd4b640d9cd51b67, keys=<MagicMock id='140304164347344'>, name=router-name-f404bfc280b0498e81b5391252325684, routes=[], status=ACTIVE, tenant_id=project-id-cc4e1724451c4f83bc9918e47c05b981>]
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-620230a602f34f0b862e31c915fad911', 'router-name-b554f03c08ff4135bb9888c6376e54af', 'project-id-9fad15959def4b0fa466bdfc34b50ee8')
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-eee0ac7b70a54e8799fc805518dc09bc', 'security-group-name-557c7ca402e847608affe332c74bef5f', 'security-group-description-9ecec4bab01646069d1bcfde39c4f1d5'),)
expected_data_all_projects = (('security-group-id-eee0ac7b70a54e8799fc805518dc09bc', 'security-group-name-557c7ca402e847608affe332c74bef5f', 'security-group-description-9ecec4bab01646069d1bcfde39c4f1d5', 'project-id-9e4eaa11b16d4fd49f5b0aaa9519af50'),)
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-41a9b6964ca5470bbba0cf8eb3ffe4d5', 'security-group-name-4da0577115d94213805d55ff194ad23f', 'security-group-description-7d9240559c8f4478a0a3f364e2666eeb', 'project-id-c39bb8b2dc094901a2a3061b86b4c26a'),)
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-9d173418631e418d8d0de93d53fd2774', 'icmp', '0.0.0.0/0', 'security-group-id-58fc5c3823e146bf9ff9ce19053ca07f', '', '')
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-a1d4fe679d09460cb526695160998133', None, None, 'project-id-7b4676381209429aabccf796c9f9817c', None, 'remote-security-group-id-03ff263f71ad4319b7841e5c6e4990ef', None, 'security-group-id-2ab45121015f4da2a6566a3622d1d02c')
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-dccebb9100484c40b1a8b5ef5631b176', 'subnet-name-7a0987846b4e4450b3701abdeddbf8cd', 'network-id-b6e0f2ab1e4444ff8922350b857a7547', '10.10.10.0/24'), ('subnet-id-698e4c1152584f919b1f390f227906ef', 'subnet-name-7e191bf4bb8f4e8f800c9cf9d07434ca', 'network-id-d94e059d48e14cedba7bec2d5ad6eb98', '10.10.10.0/24'), ('subnet-id-b26af6de9380484388fd836d3124ed8b', 'subnet-name-1af1bcb3686e4b71b3bfee511b2cd0e1', 'network-id-393e67a464c74e639693aac82845bdd4', '10.10.10.0/24')]
data_long = [('subnet-id-dccebb9100484c40b1a8b5ef5631b176', 'subnet-name-7a0987846b4e4450b3701abdeddbf8cd', 'network-id-b6e0f2ab1e4444ff8922350b857a7547', '10.10.10.0/24', 'project-id-e3c767cd733b4be19a9bffefa0c42a4f', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-698e4c1152584f919b1f390f227906ef', 'subnet-name-7e191bf4bb8f4e8f800c9cf9d07434ca', 'network-id-d94e059d48e14cedba7bec2d5ad6eb98', '10.10.10.0/24', 'project-id-0961a077dab94059aad12bee75cadc7b', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-b26af6de9380484388fd836d3124ed8b', 'subnet-name-1af1bcb3686e4b71b3bfee511b2cd0e1', 'network-id-393e67a464c74e639693aac82845bdd4', '10.10.10.0/24', 'project-id-747b60f4c917460b820cddd4f6793a50', 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-b26af6de9380484388fd836d3124ed8b, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='140304075213584'>, name=subnet-name-1af1bcb3686e4b71b3bfee511b2cd0e1, network_id=network-id-393e67a464c74e639693aac82845bdd4, project_id=project-id-747b60f4c917460b820cddd4f6793a50, subnetpool_id=None, tenant_id=project-id-747b60f4c917460b820cddd4f6793a50>
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-5dac6ae027cf41239d10ac498f344ec8', '4', 'None', 'None', 'subnet-name-c7ec699fdfb641f68f402dda6d86b645', 'network-id-f1d1397fd2254fa18e26e02b8cb5db36', 'project-id-34b22af7e93b449e98e640160e9e37e3', '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-8f804364751c4e8c8753020a69ee88de', 'subnet-pool-name-6fa42ec7fb9840fbaa65e7298d3f7fb8', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-c02d90fe4e89419ca13a853ebc6957f4', 'subnet-pool-name-1e32e35255a14cd3aa108f9f1d56d3f3', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-d1f3f7aaad544fc3b40f835e90365e30', 'subnet-pool-name-5fe6270384fd43f0b577f221b3acae3f', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-8f804364751c4e8c8753020a69ee88de', 'subnet-pool-name-6fa42ec7fb9840fbaa65e7298d3f7fb8', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-758d33c1f1954728bf5755a4a06cd148'), ('subnet-pool-id-c02d90fe4e89419ca13a853ebc6957f4', 'subnet-pool-name-1e32e35255a14cd3aa108f9f1d56d3f3', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-ff6e30a6137e4122bdebf43897d3ff7c'), ('subnet-pool-id-d1f3f7aaad544fc3b40f835e90365e30', 'subnet-pool-name-5fe6270384fd43f0b577f221b3acae3f', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-ad7223653b324e9d9cb324caff11aaf4')]
pool = <FakeResource address_scope_id=address-scope-id-ad7223653b324e9d9cb324caff11aaf4, default_prefixlen=8, default_quota=None, id=subnet-pool-id-d1f3f7aaad544fc3b40f835e90365e30, ip_version=4, is_default=False, keys=<MagicMock id='140304067881680'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-5fe6270384fd43f0b577f221b3acae3f, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-c47fbba06e4e4e9a90990904a1459572, shared=False, tenant_id=project-id-c47fbba06e4e4e9a90990904a1459572>
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-6c22f0d58d304d0ca9f2e6ea59587161', 8, None, 'subnet-pool-id-f7cec31133e242c1902c75ee2ca205c5', 4, False, 32, 8, 'subnet-pool-name-9b5528681a114ceaa9b1fbed0fd3e170', '10.0.0.0/24, 10.1.0.0/24', 'project-id-22ce7903f7924b26b16cbbcec3c8ec80', 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