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-35bc6e6fcc104b059c1bc772034080e1, instance_id=server-id-8e13b91926bb46f2920fd76316573def, 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-d84a6a6aee9146bb974c118c5b684380, id=floating-ip-id-e51c20a9a318440f967c79800732f82b, keys=<MagicMock id='169250960'>, port_id=port-id-8bb43605827d4201999e47c05b53ee95, project_id=project-id-4a4147b313454e818d4ecc47b4b4dff8, router_id=router-id-44f9e59e721344e7b06681a0a7b92c35, status=DOWN, tenant_id=project-id-4a4147b313454e818d4ecc47b4b4dff8>
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-8a2922db3ab545d5a4443bd752ad731f', '1.0.9.0', '2.0.9.0', 'server-id-d1989b26c10544408872c1201b2ff9a8', 'public'), ('floating-ip-id-1dfbf447208246ce968ad0a4bfcba961', '1.0.9.0', '2.0.9.0', 'server-id-a55bf99371234c5d84a74e23a99d4a93', 'public'), ('floating-ip-id-9ee8bdf990c04abe811f4f1abf87320c', '1.0.9.0', '2.0.9.0', 'server-id-97a4eaf83eb84aab9d32ca96849b00eb', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-8a2922db3ab545d5a4443bd752ad731f, instance_id=server-id-d1989b26c10544408872c1201b2ff9a8, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-1dfbf447208246ce968ad0a4bfcba961, instance_id=server-id-a55bf99371234c5d84a74e23a99d4a93, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-9ee8bdf990c04abe811f4f1abf87320c, instance_id=server-id-97a4eaf83eb84aab9d32ca96849b00eb, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-9ee8bdf990c04abe811f4f1abf87320c, instance_id=server-id-97a4eaf83eb84aab9d32ca96849b00eb, 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-99b95d5eddc143689216f414be9a51ca', '1.0.9.0', '2.0.9.0', 'port-id-42d18059ff76426b9cf3edc6f0543fd6'), ('floating-ip-id-7617139f47c545eb987d557d13fffcf8', '1.0.9.0', '2.0.9.0', 'port-id-bb6e4d9bd8b947f4ba96df80f6b36158'), ('floating-ip-id-ffa3cdbaa4514b00982de53f4340db98', '1.0.9.0', '2.0.9.0', 'port-id-c6567fe254b340818744ce836e152f78')]
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-922416d1b3b1464da0bd820cb3bcc237, id=floating-ip-id-99b95d5eddc143689216f414be9a51ca, keys=<MagicMock id='77921232'>, port_id=port-id-42d18059ff76426b9cf3edc6f0543fd6, project_id=project-id-2fb3dc1968ac470fb701fbb098464ae1, router_id=router-id-078246dd02c444208d505a31d3141d5c, status=DOWN, tenant_id=project-id-2fb3dc1968ac470fb701fbb098464ae1>, <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-1af7a0260e90433a8fe76dcd001e9c8e, id=floating-ip-id-7617139f47c545eb987d557d13fffcf8, keys=<MagicMock id='162943120'>, port_id=port-id-bb6e4d9bd8b947f4ba96df80f6b36158, project_id=project-id-f929f6d09bf149499e2669553d93a026, router_id=router-id-07596d6b2ef040e2b489221a87177c37, status=DOWN, tenant_id=project-id-f929f6d09bf149499e2669553d93a026>, <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-3668d496190d4a9cb0ee67f540d71115, id=floating-ip-id-ffa3cdbaa4514b00982de53f4340db98, keys=<MagicMock id='117474128'>, port_id=port-id-c6567fe254b340818744ce836e152f78, project_id=project-id-b13d8133e9da464ab25afea57077ddf6, router_id=router-id-eefc316b519c4285b6ef27fe9932293d, status=DOWN, tenant_id=project-id-b13d8133e9da464ab25afea57077ddf6>]
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-3668d496190d4a9cb0ee67f540d71115, id=floating-ip-id-ffa3cdbaa4514b00982de53f4340db98, keys=<MagicMock id='117474128'>, port_id=port-id-c6567fe254b340818744ce836e152f78, project_id=project-id-b13d8133e9da464ab25afea57077ddf6, router_id=router-id-eefc316b519c4285b6ef27fe9932293d, status=DOWN, tenant_id=project-id-b13d8133e9da464ab25afea57077ddf6>
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-f9df7cf3dc094c788bba1d08ffa02331', 'server-id-cbe07911e12847cc97ec8a9991916219', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-f9df7cf3dc094c788bba1d08ffa02331, instance_id=server-id-cbe07911e12847cc97ec8a9991916219, 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-f6a038bd631648359290e1d6c73a3d1f', 'floating-ip-id-d47d3b7f8f664ac2994bb5b44b0ad821', 'port-id-86fa0b3820a348a5ae9806f58d048a88', 'project-id-4f5e3cb3e99e4dd9a77bed81761b0e86', 'router-id-8e27b46f3dd04d12be4b0b86ccaa542f', '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-f6a038bd631648359290e1d6c73a3d1f, id=floating-ip-id-d47d3b7f8f664ac2994bb5b44b0ad821, keys=<MagicMock id='149595408'>, port_id=port-id-86fa0b3820a348a5ae9806f58d048a88, project_id=project-id-4f5e3cb3e99e4dd9a77bed81761b0e86, router_id=router-id-8e27b46f3dd04d12be4b0b86ccaa542f, status=DOWN, tenant_id=project-id-4f5e3cb3e99e4dd9a77bed81761b0e86>
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-44f5599af85b4748a4ab9cd38fcfd7af', False, 'network-label-3c0e0710b4d64ea785bd963db00503ed', None, False, '255.255.255.0', None, None, 'project-id-9b88b9460b964e74adaad4dc8a6bb288', 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-e5c39467cc344295af63870050e885dc', 'network-name-54c90387367547af8175a9c81837c43e', '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-4690b8dc66714fe4866d66b27fdadbba', 'network-name-07c131e8819243f18ceb68f2c33dd23e', '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-3e3897739f24450ba03c9e4d555373fe', 'network-name-e6def0d35d574f46a6c8fba0b8157c08', 'a, b'), ('network-id-7e8a8a1f50fa4a329a6f45c6879b4dd4', 'network-name-49e31d111d7a403982129999a2000cc5', 'a, b'), ('network-id-3f8812ae019d4bf384651a73d77c0d7c', 'network-name-9917febef2dd42e98f5072905c4eb48e', 'a, b')]
data_long = [('network-id-3e3897739f24450ba03c9e4d555373fe', 'network-name-e6def0d35d574f46a6c8fba0b8157c08', 'ACTIVE', 'project-id-195acf7f1ef142329766fa0c9dddbdb0', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-7e8a8a1f50fa4a329a6f45c6879b4dd4', 'network-name-49e31d111d7a403982129999a2000cc5', 'ACTIVE', 'project-id-ab0f7f15378f4feb9d2010b120af9bd6', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-3f8812ae019d4bf384651a73d77c0d7c', 'network-name-9917febef2dd42e98f5072905c4eb48e', 'ACTIVE', 'project-id-1e4954c8d6214b308e01a3ad296d4a9d', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-3f8812ae019d4bf384651a73d77c0d7c, keys=<MagicMock id='131190352'>, name=network-name-9917febef2dd42e98f5072905c4eb48e, project_id=project-id-1e4954c8d6214b308e01a3ad296d4a9d, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-1e4954c8d6214b308e01a3ad296d4a9d>
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-99219bbeef934d2e911600a9f3375bb9', 'network-label-d78fc9f524f94877996965d0c802a52b', '10.0.0.0/24'), ('network-id-66cee2a9e9ab4201aecf0635358c7822', 'network-label-64430b0cddd14e549084a66c050c6a72', '10.0.0.0/24'), ('network-id-02fbd746adde44f1afa0acf27be29453', 'network-label-9d6882315e1742d2bbfddd2ae14c3c17', '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-02fbd746adde44f1afa0acf27be29453, injected=False, keys=<MagicMock id='134339024'>, label=network-label-9d6882315e1742d2bbfddd2ae14c3c17, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-4f104786ce3a42ef9a5d8fba941ceca1, 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-c4493d0356db433fb116adb89cb7bd3f', 'network-name-f2bc6517496b4fe49f386a938ed3d182', 'project-id-cbfe67d25005401b9ed69bc3e468521d', '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-0f7d5fc7215347278e7dbfbb55a0f37b', False, 'network-label-71a7f6b91af84e90b408b7df538f5f0e', None, False, '255.255.255.0', None, None, 'project-id-1fc8bb526bc64c2983de5f49347338c0', 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-5303c1cd4b0042f599ebfae9cab4e1fa', '', '', 'ovs', 'normal', 'device-id-294ba00ec6884a4dbccf76bb1cadf7f5', 'compute:nova', '', 'dns-name-1c25c74c4c724565ad1e2e4af72b9a61', '', '', 'port-id-640df62f90ed4208a60d1824d24f3f3f', 'fa:16:3e:a9:4e:72', 'port-name-994f0c0e5cc846a5b4319591cb884876', 'network-id-7412d3b09bde4d55ab466a77c829eb2a', True, 'project-id-9e84521bde1748a190c98f06c65697c7', '', '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-2805ef5c31c64764a8ac20e5fd5776f4', 'router-name-580fbd28b78e4da3ae0ec5231a43ff52', 'project-id-7c4c6ece6ffc43238579512f2f951239')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-2805ef5c31c64764a8ac20e5fd5776f4, keys=<MagicMock id='185576016'>, name=router-name-580fbd28b78e4da3ae0ec5231a43ff52, routes=[], status=ACTIVE, tenant_id=project-id-7c4c6ece6ffc43238579512f2f951239>
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-c317575c861948b1a7cab1aa730ffaf7', 'router-name-8f2c96ddf34a44a3b6d5e95f0bbd7009', 'ACTIVE', 'UP', False, False, 'project-id-088a4b56aa9b48c990ef17952c218715'), ('router-id-6b979c4727484e94930b7d6bfed3209c', 'router-name-6a3ace0c3a7b440287c20d3d411eb838', 'ACTIVE', 'UP', False, False, 'project-id-b91e22c5ecdf4830aace6b13fd304896'), ('router-id-d97ca4f5c1754f7b9951439b01dd90cb', 'router-name-96e779caa6254c4e93fc2d4b2cd1eb41', 'ACTIVE', 'UP', False, False, 'project-id-ae220ee78c5646bdb8a3d4ec1071a655')]
data_long = [('router-id-c317575c861948b1a7cab1aa730ffaf7', 'router-name-8f2c96ddf34a44a3b6d5e95f0bbd7009', 'ACTIVE', 'UP', False, False, 'project-id-088a4b56aa9b48c990ef17952c218715', [], '{}', ''), ('router-id-6b979c4727484e94930b7d6bfed3209c', 'router-name-6a3ace0c3a7b440287c20d3d411eb838', 'ACTIVE', 'UP', False, False, 'project-id-b91e22c5ecdf4830aace6b13fd304896', [], '{}', ''), ('router-id-d97ca4f5c1754f7b9951439b01dd90cb', 'router-name-96e779caa6254c4e93fc2d4b2cd1eb41', 'ACTIVE', 'UP', False, False, 'project-id-ae220ee78c5646bdb8a3d4ec1071a655', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-d97ca4f5c1754f7b9951439b01dd90cb, keys=<MagicMock id='185521104'>, name=router-name-96e779caa6254c4e93fc2d4b2cd1eb41, routes=[], status=ACTIVE, tenant_id=project-id-ae220ee78c5646bdb8a3d4ec1071a655>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-c317575c861948b1a7cab1aa730ffaf7, keys=<MagicMock id='185560016'>, name=router-name-8f2c96ddf34a44a3b6d5e95f0bbd7009, routes=[], status=ACTIVE, tenant_id=project-id-088a4b56aa9b48c990ef17952c218715>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-6b979c4727484e94930b7d6bfed3209c, keys=<MagicMock id='185573328'>, name=router-name-6a3ace0c3a7b440287c20d3d411eb838, routes=[], status=ACTIVE, tenant_id=project-id-b91e22c5ecdf4830aace6b13fd304896>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-d97ca4f5c1754f7b9951439b01dd90cb, keys=<MagicMock id='185521104'>, name=router-name-96e779caa6254c4e93fc2d4b2cd1eb41, routes=[], status=ACTIVE, tenant_id=project-id-ae220ee78c5646bdb8a3d4ec1071a655>]
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-e69d3a72c796490a87ce9aeaa00a9e34', 'router-name-d34e702461ec443c933795ad079580ae', 'project-id-c128cdc79e524a98b9ccae595c343c15')
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-76a9cd990fe04ca09501defec34b902a', 'security-group-name-e8f73c38f7ac42d98813da603fe6f372', 'security-group-description-b24826cb44b647a499f0115a7144c13c'),)
expected_data_all_projects = (('security-group-id-76a9cd990fe04ca09501defec34b902a', 'security-group-name-e8f73c38f7ac42d98813da603fe6f372', 'security-group-description-b24826cb44b647a499f0115a7144c13c', 'project-id-16ff8cee89b349acaf4d1ec773d70ade'),)
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-b224376c6c024f0498125d45e6278934', 'security-group-name-f05ad93998b3493ca47bcf7028e68a90', 'security-group-description-193e8a559f37447b8095677b3260bef6', 'project-id-d8d4474a82ae4e4b9654268877e173b7'),)
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-bcd79f9ed17a4f9fac5584fdbe959faf', 'icmp', '0.0.0.0/0', 'security-group-id-2584e056172f408a83923e0066fc1886', '', '')
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-d48beea145ba4feab8017d6685345b39', None, None, 'project-id-3fe23a5461ef42f8aa072cb315263188', None, 'remote-security-group-id-93873e93e7e04aaead1eb7c234f948f2', None, 'security-group-id-38c8fa06bd9c41a596690b24db0f9c27')
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-43f7347741a340abbe8fa3ac1067fe74', 'subnet-name-4c18e387ba6a451c9226a0e551575ace', 'network-id-062d62581c6544b19b0877b90bf4f1cf', '10.10.10.0/24'), ('subnet-id-fc82ccfc26054c6ab39fb7bc2245f84e', 'subnet-name-54ce0438931548c8a48949ada4f172ca', 'network-id-4b2134455661428c89160c6b2e775173', '10.10.10.0/24'), ('subnet-id-2817a1c8b556455e80d47d14b0205afe', 'subnet-name-9b215afcaf66482cac381c30a696a1ad', 'network-id-d708ceb02b314c959e3d0b874b7729e8', '10.10.10.0/24')]
data_long = [('subnet-id-43f7347741a340abbe8fa3ac1067fe74', 'subnet-name-4c18e387ba6a451c9226a0e551575ace', 'network-id-062d62581c6544b19b0877b90bf4f1cf', '10.10.10.0/24', 'project-id-2be0640182464dfb83c568874aa7a1e7', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-fc82ccfc26054c6ab39fb7bc2245f84e', 'subnet-name-54ce0438931548c8a48949ada4f172ca', 'network-id-4b2134455661428c89160c6b2e775173', '10.10.10.0/24', 'project-id-90b327b23d49424698476e7df0bbdc71', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-2817a1c8b556455e80d47d14b0205afe', 'subnet-name-9b215afcaf66482cac381c30a696a1ad', 'network-id-d708ceb02b314c959e3d0b874b7729e8', '10.10.10.0/24', 'project-id-7cf9d898a0154148af6368db0e38e142', 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-2817a1c8b556455e80d47d14b0205afe, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='90474320'>, name=subnet-name-9b215afcaf66482cac381c30a696a1ad, network_id=network-id-d708ceb02b314c959e3d0b874b7729e8, project_id=project-id-7cf9d898a0154148af6368db0e38e142, subnetpool_id=None, tenant_id=project-id-7cf9d898a0154148af6368db0e38e142>
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-2987a8a5c59248169b49dfef5f5ec9bc', '4', 'None', 'None', 'subnet-name-1eb3f90563bd46b7a125faa797f1f2bf', 'network-id-95aa20a605c348c2b8c4158c664f8a71', 'project-id-78be489111d748128472e5542a8f73de', '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-7ef76e6bfa3a4b07ab7dc00694e03262', 'subnet-pool-name-e8340f2f09b94fbaad134155389c036e', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-8a4062f40274403ca963e92f5df39093', 'subnet-pool-name-4eaec8a325a349e18fc6f08f079e8fd5', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-c6575a6a185d436a8b55a5b2a998c7c7', 'subnet-pool-name-d07fee372fac4a0e8994c2c3c2e4c793', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-7ef76e6bfa3a4b07ab7dc00694e03262', 'subnet-pool-name-e8340f2f09b94fbaad134155389c036e', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-388771f7f6724564bdf94c05f54e10d8'), ('subnet-pool-id-8a4062f40274403ca963e92f5df39093', 'subnet-pool-name-4eaec8a325a349e18fc6f08f079e8fd5', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-6ad5e14d55374515ad45a09ead430e60'), ('subnet-pool-id-c6575a6a185d436a8b55a5b2a998c7c7', 'subnet-pool-name-d07fee372fac4a0e8994c2c3c2e4c793', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-a5ba2eff78b64fe5ac78b4360f14bd66')]
pool = <FakeResource address_scope_id=address-scope-id-a5ba2eff78b64fe5ac78b4360f14bd66, default_prefixlen=8, default_quota=None, id=subnet-pool-id-c6575a6a185d436a8b55a5b2a998c7c7, ip_version=4, is_default=False, keys=<MagicMock id='172926608'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-d07fee372fac4a0e8994c2c3c2e4c793, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-a53ede4cc75a478282d9a278f9a78a4d, shared=False, tenant_id=project-id-a53ede4cc75a478282d9a278f9a78a4d>
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-1fd3f19559fc4cfb8b516fa976bacaad', 8, None, 'subnet-pool-id-2892e7984e6d4a5088a6475da6ba2eed', 4, False, 32, 8, 'subnet-pool-name-fb8317a3033b4d3bb6c322e338d1658c', '10.0.0.0/24, 10.1.0.0/24', 'project-id-c9b310b0833c4b0b8161130e017ccddc', 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