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-80f79f4ca4ad42cd93f3b31c15a86399, instance_id=server-id-c257bffabbb54685872dad4574b5fbde, 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-3d67f5a85cd34e7ebbec6c2ab3b7a509, id=floating-ip-id-e1ec71ed0c9640b096933532c309c87a, keys=<MagicMock id='118839440'>, port_id=port-id-5a6202e90792402a94136cf5d78822d3, project_id=project-id-7a52803867c04fdd978ee63c86185085, router_id=router-id-36c4f55125cb4de8b6575464255e6a8c, status=DOWN, tenant_id=project-id-7a52803867c04fdd978ee63c86185085>
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-59641e80a3ba4b099cd29a79c0bad92a', '1.0.9.0', '2.0.9.0', 'server-id-55cd33e949f647aba4ba5d1503ef1e2a', 'public'), ('floating-ip-id-e4403abce4f34b808719a77ce1411ecf', '1.0.9.0', '2.0.9.0', 'server-id-575a02b51d074d84b7256157255e3033', 'public'), ('floating-ip-id-ce2ba8599a5d4f6ea5223fd256dfe8d1', '1.0.9.0', '2.0.9.0', 'server-id-2e942d4616ff4cc987bf4cb376f994ad', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-59641e80a3ba4b099cd29a79c0bad92a, instance_id=server-id-55cd33e949f647aba4ba5d1503ef1e2a, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-e4403abce4f34b808719a77ce1411ecf, instance_id=server-id-575a02b51d074d84b7256157255e3033, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-ce2ba8599a5d4f6ea5223fd256dfe8d1, instance_id=server-id-2e942d4616ff4cc987bf4cb376f994ad, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-ce2ba8599a5d4f6ea5223fd256dfe8d1, instance_id=server-id-2e942d4616ff4cc987bf4cb376f994ad, 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-5318f70d24514192af86699a0fdd488f', '1.0.9.0', '2.0.9.0', 'port-id-947c984de4394ea7bcaa2af3b547e1cf'), ('floating-ip-id-61c38f08ec334ea59cc787557746f4e9', '1.0.9.0', '2.0.9.0', 'port-id-f2ad27e3ab874e2cac7f7e181f898b3f'), ('floating-ip-id-ee6dc777f3cd4874bb5da126f15dcd46', '1.0.9.0', '2.0.9.0', 'port-id-2e7aa2cff04f45408e5f3d5d595233f4')]
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-e28cb983703f4fb2af7e83b36b8b7ffc, id=floating-ip-id-5318f70d24514192af86699a0fdd488f, keys=<MagicMock id='154273808'>, port_id=port-id-947c984de4394ea7bcaa2af3b547e1cf, project_id=project-id-d5a7eafea5554be9a4f724c4e45cac8c, router_id=router-id-cbc3a42ddd43402b8a659bc3f5e5e7bd, status=DOWN, tenant_id=project-id-d5a7eafea5554be9a4f724c4e45cac8c>, <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-4ed603ecd85c4c8b9ba24652d9c75da2, id=floating-ip-id-61c38f08ec334ea59cc787557746f4e9, keys=<MagicMock id='141319568'>, port_id=port-id-f2ad27e3ab874e2cac7f7e181f898b3f, project_id=project-id-ed064a5deb18453cb31cd2cb8b92261c, router_id=router-id-ea0842add66848e185a58a6905b47dad, status=DOWN, tenant_id=project-id-ed064a5deb18453cb31cd2cb8b92261c>, <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-f5fb51144d3a4259b7f10a607cf19394, id=floating-ip-id-ee6dc777f3cd4874bb5da126f15dcd46, keys=<MagicMock id='142544464'>, port_id=port-id-2e7aa2cff04f45408e5f3d5d595233f4, project_id=project-id-a49bb7074c6c4f06be67923eccf33421, router_id=router-id-45198644ea3548d2884c768a49f72f2f, status=DOWN, tenant_id=project-id-a49bb7074c6c4f06be67923eccf33421>]
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-f5fb51144d3a4259b7f10a607cf19394, id=floating-ip-id-ee6dc777f3cd4874bb5da126f15dcd46, keys=<MagicMock id='142544464'>, port_id=port-id-2e7aa2cff04f45408e5f3d5d595233f4, project_id=project-id-a49bb7074c6c4f06be67923eccf33421, router_id=router-id-45198644ea3548d2884c768a49f72f2f, status=DOWN, tenant_id=project-id-a49bb7074c6c4f06be67923eccf33421>
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-bbdc2346529c4272b6fd6c4d0d87a448', 'server-id-18eef66d913d4d23a2f42ec622bbecd9', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-bbdc2346529c4272b6fd6c4d0d87a448, instance_id=server-id-18eef66d913d4d23a2f42ec622bbecd9, 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-1b93c421dea6472bacadb87f324072a1', 'floating-ip-id-67c59368fb5e47b0a8bf02aef49e4e40', 'port-id-c53dfaf7da9b4fafba374120835ecb20', 'project-id-cee4a108f0e84a84bcdab26c6875422e', 'router-id-d4dbb820198140f0944a8a84de63909f', '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-1b93c421dea6472bacadb87f324072a1, id=floating-ip-id-67c59368fb5e47b0a8bf02aef49e4e40, keys=<MagicMock id='144690128'>, port_id=port-id-c53dfaf7da9b4fafba374120835ecb20, project_id=project-id-cee4a108f0e84a84bcdab26c6875422e, router_id=router-id-d4dbb820198140f0944a8a84de63909f, status=DOWN, tenant_id=project-id-cee4a108f0e84a84bcdab26c6875422e>
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-71117cbd6cda49b68ee4c2f59de36610', False, 'network-label-44ca6987c88e4c09999b05802be90e49', None, False, '255.255.255.0', None, None, 'project-id-b8a1e1caed1d4ebfa70c94929e1a9471', 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-afb585151c9f4132b495cf176ead686a', 'network-name-7f434da0b7834246b4bcb1c2ae8143c2', '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-d7d8ede276fd408283cbf27d5dd5c194', 'network-name-598ad3485db94d6693dcc77e48c70bed', '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-9c3b80ba246748a59f85dbac136d8af8', 'network-name-3abdc78850ba46faa43ecdfa451185da', 'a, b'), ('network-id-5fa70a32fbbb4de28f15eb7cbee82992', 'network-name-feed7d455a8446609ad0521e6e078cd3', 'a, b'), ('network-id-518e6309d90c4d4982d71a738d413ae3', 'network-name-32b753ddfe4c44e688e34b53cd625d90', 'a, b')]
data_long = [('network-id-9c3b80ba246748a59f85dbac136d8af8', 'network-name-3abdc78850ba46faa43ecdfa451185da', 'ACTIVE', 'project-id-882017b68d3446adb2b1e5942e71dda8', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-5fa70a32fbbb4de28f15eb7cbee82992', 'network-name-feed7d455a8446609ad0521e6e078cd3', 'ACTIVE', 'project-id-084840d05f7d43858743e3f394678825', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-518e6309d90c4d4982d71a738d413ae3', 'network-name-32b753ddfe4c44e688e34b53cd625d90', 'ACTIVE', 'project-id-e634ccc641e347e6a6109ebdd4d08847', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-518e6309d90c4d4982d71a738d413ae3, keys=<MagicMock id='153512144'>, name=network-name-32b753ddfe4c44e688e34b53cd625d90, project_id=project-id-e634ccc641e347e6a6109ebdd4d08847, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-e634ccc641e347e6a6109ebdd4d08847>
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-ae0aa145cc694fa0b2bd05c930da712f', 'network-label-ab7db731e173448e8479695190d1babc', '10.0.0.0/24'), ('network-id-5777364c828746859795718602948d42', 'network-label-bd93c811c2ca45718f99f2a1077176fa', '10.0.0.0/24'), ('network-id-1da511edcdd24d99a2eca49c2acb821a', 'network-label-bf3306096a644ce48931c5231beeb20f', '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-1da511edcdd24d99a2eca49c2acb821a, injected=False, keys=<MagicMock id='148681360'>, label=network-label-bf3306096a644ce48931c5231beeb20f, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-65341fdf53c142c4ac7a955dfe4eb96d, 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-7907b09de9444f8cbb116ee13087a9fa', 'network-name-5946a192100d49d9a8d132e49384791e', 'project-id-3ee13a32ac7a4763a35fa944b38af912', '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-7925fe49f53c469c9261153c3d60e2a6', False, 'network-label-48e86cdc1fd2428d95a0deb738f25f3c', None, False, '255.255.255.0', None, None, 'project-id-f7e26701d73d4f169035d936d5911e36', 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-654e761b60f741e6b865d7cfbc552a25', '', '', 'ovs', 'normal', 'device-id-9541a4cb116b479ea6f3c922405ad128', 'compute:nova', '', 'dns-name-8febe45ae5264568b09ea2f3438002ee', '', '', 'port-id-2f621b5bf9da41edb0ffb2ab16e9766a', 'fa:16:3e:a9:4e:72', 'port-name-5e8a9fdf1256496b8e7ed2b1e97fdaae', 'network-id-25325d31523240c18793c929cdb547e2', True, 'project-id-a69fb3ec1a3a4ea4a197ceba502f78d5', '', '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-2d6e818835074ee2891aa97ae0977fc4', 'router-name-ebf3182e72fd468892057284100c91da', 'project-id-9536bef24cb741bd8ae752c1ccdcc9fd')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-2d6e818835074ee2891aa97ae0977fc4, keys=<MagicMock id='176623824'>, name=router-name-ebf3182e72fd468892057284100c91da, routes=[], status=ACTIVE, tenant_id=project-id-9536bef24cb741bd8ae752c1ccdcc9fd>
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-cd05482e537e44c188239586a9c7f61f', 'router-name-24971dbed6264e4a83c1043e3cc8aea7', 'ACTIVE', 'UP', False, False, 'project-id-073d4bc35f7e4780bc2d8c20f46a2672'), ('router-id-3b8805f92bfa460dbe32d9155c4b1283', 'router-name-efeb71474a9940e68484f4e3b38d461a', 'ACTIVE', 'UP', False, False, 'project-id-3d70d0e42f014e57bbd095bed45208a2'), ('router-id-d0156d3a89d647588e88fa5a2a055055', 'router-name-9598dc2df05d4163aca70e71b9bf8abd', 'ACTIVE', 'UP', False, False, 'project-id-69fa4e6a1f0f44d397eee9dcdcfe682c')]
data_long = [('router-id-cd05482e537e44c188239586a9c7f61f', 'router-name-24971dbed6264e4a83c1043e3cc8aea7', 'ACTIVE', 'UP', False, False, 'project-id-073d4bc35f7e4780bc2d8c20f46a2672', [], '{}', ''), ('router-id-3b8805f92bfa460dbe32d9155c4b1283', 'router-name-efeb71474a9940e68484f4e3b38d461a', 'ACTIVE', 'UP', False, False, 'project-id-3d70d0e42f014e57bbd095bed45208a2', [], '{}', ''), ('router-id-d0156d3a89d647588e88fa5a2a055055', 'router-name-9598dc2df05d4163aca70e71b9bf8abd', 'ACTIVE', 'UP', False, False, 'project-id-69fa4e6a1f0f44d397eee9dcdcfe682c', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-d0156d3a89d647588e88fa5a2a055055, keys=<MagicMock id='176644560'>, name=router-name-9598dc2df05d4163aca70e71b9bf8abd, routes=[], status=ACTIVE, tenant_id=project-id-69fa4e6a1f0f44d397eee9dcdcfe682c>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-cd05482e537e44c188239586a9c7f61f, keys=<MagicMock id='176634256'>, name=router-name-24971dbed6264e4a83c1043e3cc8aea7, routes=[], status=ACTIVE, tenant_id=project-id-073d4bc35f7e4780bc2d8c20f46a2672>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-3b8805f92bfa460dbe32d9155c4b1283, keys=<MagicMock id='176639376'>, name=router-name-efeb71474a9940e68484f4e3b38d461a, routes=[], status=ACTIVE, tenant_id=project-id-3d70d0e42f014e57bbd095bed45208a2>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-d0156d3a89d647588e88fa5a2a055055, keys=<MagicMock id='176644560'>, name=router-name-9598dc2df05d4163aca70e71b9bf8abd, routes=[], status=ACTIVE, tenant_id=project-id-69fa4e6a1f0f44d397eee9dcdcfe682c>]
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-6bbd5a43816d42a0bffc749aac090688', 'router-name-31000f527a7a4cffba6240b990e7f802', 'project-id-f4273843b1b14d7d8073b9a148a5397d')
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-ed87f38e3c944af5888b191263e6f75c', 'security-group-name-b7b9e6b49b08460a84ac6ecf05078125', 'security-group-description-3330497ed1aa42d9ba8689a84c30155a'),)
expected_data_all_projects = (('security-group-id-ed87f38e3c944af5888b191263e6f75c', 'security-group-name-b7b9e6b49b08460a84ac6ecf05078125', 'security-group-description-3330497ed1aa42d9ba8689a84c30155a', 'project-id-6eece868e67a4be39b3edf95dbd4b424'),)
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-0b2cdbdfc1834e58be4bf87db60b9f0d', 'security-group-name-d7f7054275924efe8364a7bd3a5897f4', 'security-group-description-3b25f814c5c7409c951d16bf321952e4', 'project-id-8db0940fdc094957ac44a3692f44c722'),)
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-116b25f9ed644c8d98edea8693bf15c6', 'icmp', '0.0.0.0/0', 'security-group-id-431a2f4bbcf0407c84c3776f5e3fcd90', '', '')
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-e9dd431eeb8041e4af857b24fabd8c8d', None, None, 'project-id-663fca40c0094000a372546c1500e309', None, 'remote-security-group-id-595faa0f02744740bdbbdfaa8ff51f44', None, 'security-group-id-76223f4e67e7439a82bfb32207a4e6bf')
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-8ac23808e79b4f5da26ff84f84d3d113', 'subnet-name-8af6a0ef72b54d5fbf1d02b02ed5df80', 'network-id-a3cef6042fe0458885bd36ef9f559044', '10.10.10.0/24'), ('subnet-id-e4d85a36ef814c0e8c365939e6c508c7', 'subnet-name-24ccd33184124ba6bf0126c83494243d', 'network-id-d65d355f712b4b2f8cca78e3123ee738', '10.10.10.0/24'), ('subnet-id-dea3cddc49c74353924669a4c21194b6', 'subnet-name-c5b99c6a4480426a9aef6fc66cc6b54d', 'network-id-f1d0847b90a34de28492b6c1af9c1536', '10.10.10.0/24')]
data_long = [('subnet-id-8ac23808e79b4f5da26ff84f84d3d113', 'subnet-name-8af6a0ef72b54d5fbf1d02b02ed5df80', 'network-id-a3cef6042fe0458885bd36ef9f559044', '10.10.10.0/24', 'project-id-a8835f30f6434002b11f54d856771dc1', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-e4d85a36ef814c0e8c365939e6c508c7', 'subnet-name-24ccd33184124ba6bf0126c83494243d', 'network-id-d65d355f712b4b2f8cca78e3123ee738', '10.10.10.0/24', 'project-id-347e3e2a8f1f41578dbdb578a7673fa8', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-dea3cddc49c74353924669a4c21194b6', 'subnet-name-c5b99c6a4480426a9aef6fc66cc6b54d', 'network-id-f1d0847b90a34de28492b6c1af9c1536', '10.10.10.0/24', 'project-id-ea7b8cf3040a4e1190f0999eec3ddc12', 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-dea3cddc49c74353924669a4c21194b6, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='169488784'>, name=subnet-name-c5b99c6a4480426a9aef6fc66cc6b54d, network_id=network-id-f1d0847b90a34de28492b6c1af9c1536, project_id=project-id-ea7b8cf3040a4e1190f0999eec3ddc12, subnetpool_id=None, tenant_id=project-id-ea7b8cf3040a4e1190f0999eec3ddc12>
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-825eed4cb6ed40129bbbb8c1c293d4a1', '4', 'None', 'None', 'subnet-name-b00ce3c6bbbe4c8499c8cf74c028067b', 'network-id-0dce2a985ea842d7ab0387d5077f3f38', 'project-id-ad2e67e138a649afb3d19d01071a378c', '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-9cf9944f79d4467a9f680be2b4265563', 'subnet-pool-name-bce8244590a24df08310e8c4edb17441', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-65a732628d2846eeb3158f278fe7b032', 'subnet-pool-name-1f8f9fd6d8544309898d0e98f69be996', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-f5b11c87d04745438779864f82312e8e', 'subnet-pool-name-2f56d0a875614077a6fa86c98d52a7cb', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-9cf9944f79d4467a9f680be2b4265563', 'subnet-pool-name-bce8244590a24df08310e8c4edb17441', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-70394fcdf74d43e9b4d2f8f84e5b3c24'), ('subnet-pool-id-65a732628d2846eeb3158f278fe7b032', 'subnet-pool-name-1f8f9fd6d8544309898d0e98f69be996', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-1506b85ebd014c8395de849635a1a5c3'), ('subnet-pool-id-f5b11c87d04745438779864f82312e8e', 'subnet-pool-name-2f56d0a875614077a6fa86c98d52a7cb', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-315aa6674001416988c3a5ee707942f6')]
pool = <FakeResource address_scope_id=address-scope-id-315aa6674001416988c3a5ee707942f6, default_prefixlen=8, default_quota=None, id=subnet-pool-id-f5b11c87d04745438779864f82312e8e, ip_version=4, is_default=False, keys=<MagicMock id='167365136'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-2f56d0a875614077a6fa86c98d52a7cb, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-d8c25a6ffde740e2badc3c9bead2b8a0, shared=False, tenant_id=project-id-d8c25a6ffde740e2badc3c9bead2b8a0>
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-ff23f8b084474df389e7398fdffe669b', 8, None, 'subnet-pool-id-b7adb7b67b334afea14c827af3eb4c68', 4, False, 32, 8, 'subnet-pool-name-a1dc6c63125149a599879ad5f808cf86', '10.0.0.0/24, 10.1.0.0/24', 'project-id-54794aca0a6147faba1f3429af5a61a2', 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