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-53939dac592c425aba2011fc2af6bb51, instance_id=server-id-26de1661b7224c1ab5d42e2c73f97f02, 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-e5c77e74de704e22bbe264ee651242a6, id=floating-ip-id-3fd594e2a49e427f946a2fd55eaf1576, keys=<MagicMock id='140279017505872'>, port_id=port-id-621dc96afa3441218ed3c1ef18dc66bf, project_id=project-id-be2e0a6eff28452d839b053b0c2b06b7, router_id=router-id-062649a54f9b456ab12ff7596467b7cf, status=DOWN, tenant_id=project-id-be2e0a6eff28452d839b053b0c2b06b7>
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-145f5f27d28d48bdad5c9ece8b04d899', '1.0.9.0', '2.0.9.0', 'server-id-ac683c5e6562421dacb4889bf47797cf', 'public'), ('floating-ip-id-64feab64a1134c5a988bacaa7f1c394c', '1.0.9.0', '2.0.9.0', 'server-id-5ccf2b13e5484d229c02b0bb8cec2a91', 'public'), ('floating-ip-id-4aa0fbd7cf8a4fcea92cebb36231bc32', '1.0.9.0', '2.0.9.0', 'server-id-40e0db9851fc4b36af63694e8a859666', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-145f5f27d28d48bdad5c9ece8b04d899, instance_id=server-id-ac683c5e6562421dacb4889bf47797cf, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-64feab64a1134c5a988bacaa7f1c394c, instance_id=server-id-5ccf2b13e5484d229c02b0bb8cec2a91, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-4aa0fbd7cf8a4fcea92cebb36231bc32, instance_id=server-id-40e0db9851fc4b36af63694e8a859666, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-4aa0fbd7cf8a4fcea92cebb36231bc32, instance_id=server-id-40e0db9851fc4b36af63694e8a859666, 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-c0e6c5659ebe4e37903ea3971e295f4c', '1.0.9.0', '2.0.9.0', 'port-id-b955baf40e644470a6d677b216f55609'), ('floating-ip-id-97cb845371424f88a19e16fe7429d547', '1.0.9.0', '2.0.9.0', 'port-id-46e2217a2c74498396b90edab46afcc7'), ('floating-ip-id-77d938dc7d8343a9959d783a98fdc488', '1.0.9.0', '2.0.9.0', 'port-id-6c4e83b1fa924cf7adac331bbdf4252a')]
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-56db82231ec04f788ed6382541c98c85, id=floating-ip-id-c0e6c5659ebe4e37903ea3971e295f4c, keys=<MagicMock id='140279008608656'>, port_id=port-id-b955baf40e644470a6d677b216f55609, project_id=project-id-9a7cdbba262045e8ba317435f70cbd3d, router_id=router-id-a71470fedfb94ac593ad566575d7fa1d, status=DOWN, tenant_id=project-id-9a7cdbba262045e8ba317435f70cbd3d>, <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-c6a5f51155824496a40e0c82a8a7b564, id=floating-ip-id-97cb845371424f88a19e16fe7429d547, keys=<MagicMock id='140279026257680'>, port_id=port-id-46e2217a2c74498396b90edab46afcc7, project_id=project-id-7e55f7386ad647d09ced0f6c73a2907d, router_id=router-id-7aa218e49e1d498d92f220fb3e384bad, status=DOWN, tenant_id=project-id-7e55f7386ad647d09ced0f6c73a2907d>, <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-fbcfd8eabdad440db4a40b595add7d38, id=floating-ip-id-77d938dc7d8343a9959d783a98fdc488, keys=<MagicMock id='140279024896912'>, port_id=port-id-6c4e83b1fa924cf7adac331bbdf4252a, project_id=project-id-55c960285ddc480b9d2874b1c0fd0da1, router_id=router-id-cd869e560e4540c88ca01ee93d3d6871, status=DOWN, tenant_id=project-id-55c960285ddc480b9d2874b1c0fd0da1>]
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-fbcfd8eabdad440db4a40b595add7d38, id=floating-ip-id-77d938dc7d8343a9959d783a98fdc488, keys=<MagicMock id='140279024896912'>, port_id=port-id-6c4e83b1fa924cf7adac331bbdf4252a, project_id=project-id-55c960285ddc480b9d2874b1c0fd0da1, router_id=router-id-cd869e560e4540c88ca01ee93d3d6871, status=DOWN, tenant_id=project-id-55c960285ddc480b9d2874b1c0fd0da1>
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-c8d4f5f6588242be9bf7545d6bd52623', 'server-id-af8009f2b8874d2e80f74b2527f4a56c', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-c8d4f5f6588242be9bf7545d6bd52623, instance_id=server-id-af8009f2b8874d2e80f74b2527f4a56c, 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-547601b4e524497e8ef5861c9c65e624', 'floating-ip-id-bd9fc8905a13410086f3172c477163b4', 'port-id-0de43f7cd0dc4c2bbd0e247cc7110c5d', 'project-id-b8c3fe7ccea548afae2d456566f16893', 'router-id-eca2c1fbfb754d2fba1155a1ede973e6', '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-547601b4e524497e8ef5861c9c65e624, id=floating-ip-id-bd9fc8905a13410086f3172c477163b4, keys=<MagicMock id='140279004961040'>, port_id=port-id-0de43f7cd0dc4c2bbd0e247cc7110c5d, project_id=project-id-b8c3fe7ccea548afae2d456566f16893, router_id=router-id-eca2c1fbfb754d2fba1155a1ede973e6, status=DOWN, tenant_id=project-id-b8c3fe7ccea548afae2d456566f16893>
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-52ca465b746b424fa3d8a45e065373fb', False, 'network-label-5cb3c3cee9c64e7fb6809b5514a6ded8', None, False, '255.255.255.0', None, None, 'project-id-e3e7e28cc687454e9887df521047df14', 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-333321ef141a45d1aed1623db6dba240', 'network-name-087a4a0cf6684a02852e09a251ee7d1b', '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-9b43e70bf12c42f8aef8f02d0006c00d', 'network-name-72c36afc860f4b8d92c72d809d2e83d0', '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-cb62fb0c48a1443a983fbeb55d8b28f0', 'network-name-afb367355a454e91b7c482b0229aea88', 'a, b'), ('network-id-acea9064d4244858a53be51bba7bb013', 'network-name-47d2061698d24a93866feb7a95e4b892', 'a, b'), ('network-id-970ddda235744fea8e6973ab315ea8d2', 'network-name-b1c705a056fd4a27947d1a1b67d52e15', 'a, b')]
data_long = [('network-id-cb62fb0c48a1443a983fbeb55d8b28f0', 'network-name-afb367355a454e91b7c482b0229aea88', 'ACTIVE', 'project-id-41e7af35606d44f6b8db21b92ea38a64', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-acea9064d4244858a53be51bba7bb013', 'network-name-47d2061698d24a93866feb7a95e4b892', 'ACTIVE', 'project-id-b37bc7861ecb419b93d2e93691cf0e5c', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-970ddda235744fea8e6973ab315ea8d2', 'network-name-b1c705a056fd4a27947d1a1b67d52e15', 'ACTIVE', 'project-id-23c02786fa8849df92c85a7706fb6f81', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-970ddda235744fea8e6973ab315ea8d2, keys=<MagicMock id='140279006818576'>, name=network-name-b1c705a056fd4a27947d1a1b67d52e15, project_id=project-id-23c02786fa8849df92c85a7706fb6f81, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-23c02786fa8849df92c85a7706fb6f81>
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-cc1c94fe373648bd987258ca30416c72', 'network-label-7f63cc77aaa04bf58f5b5b8f53e60a1b', '10.0.0.0/24'), ('network-id-6d8ec27b4c4b47fcbca488341b36d3e8', 'network-label-d5cb5f59250847cf9509b4c0b35c1365', '10.0.0.0/24'), ('network-id-ac91d5a941444194b42e74bd7dc149ac', 'network-label-db046dbc2dfd42c6b2c625796ac30ff7', '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-ac91d5a941444194b42e74bd7dc149ac, injected=False, keys=<MagicMock id='140279029618640'>, label=network-label-db046dbc2dfd42c6b2c625796ac30ff7, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-0041b18ff6db4c82935862922b29fbe7, 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-cab2f27a8c8d4f93b6d149903952e4a7', 'network-name-bea87b50f93e4eb0a616347a466df4f9', 'project-id-ee87b3bc969347e4b5030a3d94cafabb', '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-1dcba15e26974ae2ab48e256ba61379c', False, 'network-label-7b9f1cf6fa0e4afebbc5d9326c5061e8', None, False, '255.255.255.0', None, None, 'project-id-708f0a3b15174e09a7bfb08b253758cb', 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-6b33d54dafc9455abc835515afa72c54', '', '', 'ovs', 'normal', 'device-id-480315f465d04f848d34a58a16915df4', 'compute:nova', '', 'dns-name-1f863039db09435788b584096c716d6d', '', '', 'port-id-e14d95f8ad8c43b98de4d1aa66967c73', 'fa:16:3e:a9:4e:72', 'port-name-55f40eee61d54996b805dcab8e598cec', 'network-id-581f247da7584a7f8aa2a34194a49007', True, 'project-id-46ea36cd297042908052a07262d0cf4c', '', '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-8383600d78914e9da6c42ce6762dd8cf', 'router-name-47195d71975e4dcb80f01797c2842593', 'project-id-8b03d25f47024d1cb039c259bc77cc7a')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-8383600d78914e9da6c42ce6762dd8cf, keys=<MagicMock id='140279135743312'>, name=router-name-47195d71975e4dcb80f01797c2842593, routes=[], status=ACTIVE, tenant_id=project-id-8b03d25f47024d1cb039c259bc77cc7a>
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-5cf157ed5e5e4848996f0d86363015a8', 'router-name-c8643cfdf86240578b98bb2341034eae', 'ACTIVE', 'UP', False, False, 'project-id-5d6d2875ec7341b6a25a1712a34319bf'), ('router-id-9a536df45c724fdd87a6a284f8b79586', 'router-name-7fb6853c1b3748118d7dbb19e8beb6c9', 'ACTIVE', 'UP', False, False, 'project-id-6a074e8efc4d4f79a269f5d17008ed66'), ('router-id-2a76b98ea32a40739fc9918ec51591fd', 'router-name-0f291aebb3d546399b5ec9bd3c4a6bdb', 'ACTIVE', 'UP', False, False, 'project-id-392df3d0694b4f958be36f92b2c67a4a')]
data_long = [('router-id-5cf157ed5e5e4848996f0d86363015a8', 'router-name-c8643cfdf86240578b98bb2341034eae', 'ACTIVE', 'UP', False, False, 'project-id-5d6d2875ec7341b6a25a1712a34319bf', [], '{}', ''), ('router-id-9a536df45c724fdd87a6a284f8b79586', 'router-name-7fb6853c1b3748118d7dbb19e8beb6c9', 'ACTIVE', 'UP', False, False, 'project-id-6a074e8efc4d4f79a269f5d17008ed66', [], '{}', ''), ('router-id-2a76b98ea32a40739fc9918ec51591fd', 'router-name-0f291aebb3d546399b5ec9bd3c4a6bdb', 'ACTIVE', 'UP', False, False, 'project-id-392df3d0694b4f958be36f92b2c67a4a', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-2a76b98ea32a40739fc9918ec51591fd, keys=<MagicMock id='140279001704400'>, name=router-name-0f291aebb3d546399b5ec9bd3c4a6bdb, routes=[], status=ACTIVE, tenant_id=project-id-392df3d0694b4f958be36f92b2c67a4a>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-5cf157ed5e5e4848996f0d86363015a8, keys=<MagicMock id='140279116405712'>, name=router-name-c8643cfdf86240578b98bb2341034eae, routes=[], status=ACTIVE, tenant_id=project-id-5d6d2875ec7341b6a25a1712a34319bf>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-9a536df45c724fdd87a6a284f8b79586, keys=<MagicMock id='140279021392144'>, name=router-name-7fb6853c1b3748118d7dbb19e8beb6c9, routes=[], status=ACTIVE, tenant_id=project-id-6a074e8efc4d4f79a269f5d17008ed66>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-2a76b98ea32a40739fc9918ec51591fd, keys=<MagicMock id='140279001704400'>, name=router-name-0f291aebb3d546399b5ec9bd3c4a6bdb, routes=[], status=ACTIVE, tenant_id=project-id-392df3d0694b4f958be36f92b2c67a4a>]
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-31a42861a63f44329d9880b87daa9efa', 'router-name-155a885c817447f8842cabae64cd908e', 'project-id-1bc4e777723a43728ed3b8a4a2cff8ae')
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-965279c14b264277a34fa02811e8130e', 'security-group-name-12f69ae9856f47cbb8d5364d5ef060d6', 'security-group-description-3c7c6421d34b45dcae7164804cfc4f39'),)
expected_data_all_projects = (('security-group-id-965279c14b264277a34fa02811e8130e', 'security-group-name-12f69ae9856f47cbb8d5364d5ef060d6', 'security-group-description-3c7c6421d34b45dcae7164804cfc4f39', 'project-id-0349cf7edf244fd9a67dfe30e562ad15'),)
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-1b83886c88c340909ce667c4fe5b2705', 'security-group-name-7c064aa6eed04cc5894843c9a526195e', 'security-group-description-32c0fa31ce35433dbd696a16cfb85a95', 'project-id-1cc358ee40fb4c8392a138267b5382e1'),)
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-eb990db2177c4ff29580fd5f898ed04b', 'icmp', '0.0.0.0/0', 'security-group-id-89b25db263264b6ba98a45a812be06a5', '', '')
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-3748ad4207914b4d99cde36674015168', None, None, 'project-id-316fc2202e5e4651a6723dfaa432fb75', None, 'remote-security-group-id-4bc10f7d2eca4c93bf78d55b170e6b7d', None, 'security-group-id-d807132f629148a0b17f997e92e5dc22')
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-119114c947e843b1bd6ed7b0eed50ade', 'subnet-name-ed5833478b25426c968955b89a606649', 'network-id-b9d15cce276745e7ad26a235eb94539e', '10.10.10.0/24'), ('subnet-id-6399280f2ecd4d83a9f9bc027857377c', 'subnet-name-6b6d8f46dad841e6ae08519d18a604b9', 'network-id-cea21819148147b59864e49201a28d3d', '10.10.10.0/24'), ('subnet-id-29506b2d3aa24e49a2820f4190834089', 'subnet-name-ab8a0afa8e9b47ecab800ff50ae2eafb', 'network-id-099a374e37954ecaa110ed57d683a8dc', '10.10.10.0/24')]
data_long = [('subnet-id-119114c947e843b1bd6ed7b0eed50ade', 'subnet-name-ed5833478b25426c968955b89a606649', 'network-id-b9d15cce276745e7ad26a235eb94539e', '10.10.10.0/24', 'project-id-9c3433c033b444b4953793d915bbccfe', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-6399280f2ecd4d83a9f9bc027857377c', 'subnet-name-6b6d8f46dad841e6ae08519d18a604b9', 'network-id-cea21819148147b59864e49201a28d3d', '10.10.10.0/24', 'project-id-04cc3ddb930349ff9b11c1190bbb8aad', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-29506b2d3aa24e49a2820f4190834089', 'subnet-name-ab8a0afa8e9b47ecab800ff50ae2eafb', 'network-id-099a374e37954ecaa110ed57d683a8dc', '10.10.10.0/24', 'project-id-6232a59853fe42658537cee54abd779c', 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-29506b2d3aa24e49a2820f4190834089, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='140279027199632'>, name=subnet-name-ab8a0afa8e9b47ecab800ff50ae2eafb, network_id=network-id-099a374e37954ecaa110ed57d683a8dc, project_id=project-id-6232a59853fe42658537cee54abd779c, subnetpool_id=None, tenant_id=project-id-6232a59853fe42658537cee54abd779c>
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-36e4403ebac14e5cb12ff69dfd1fc091', '4', 'None', 'None', 'subnet-name-4ee7a7173f0549ce9198cc2254f3ed69', 'network-id-214320e75ace4491ade25346fcc3e3bf', 'project-id-ef3de971d8dc4fc484b9cfa327025a24', '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-4f10a521c3d7420b9e34d3c4a40ab03c', 'subnet-pool-name-2bba53e4b026479eb25ed2dd5e3dc42e', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-080b13d2856c4a35addc2bed2ab230e8', 'subnet-pool-name-94829824f5f24b1cb91aed80782b98bf', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-a432b35fb25e4c1a9d20a75ba4215f4d', 'subnet-pool-name-d267864b6d0947d494db95b270975225', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-4f10a521c3d7420b9e34d3c4a40ab03c', 'subnet-pool-name-2bba53e4b026479eb25ed2dd5e3dc42e', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-1cf134fbe8824bba96877734054bb1a0'), ('subnet-pool-id-080b13d2856c4a35addc2bed2ab230e8', 'subnet-pool-name-94829824f5f24b1cb91aed80782b98bf', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-5ac92668e34b4fa8abba50ba1487db58'), ('subnet-pool-id-a432b35fb25e4c1a9d20a75ba4215f4d', 'subnet-pool-name-d267864b6d0947d494db95b270975225', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-2de14d14377c4124bb0d1fb11cd0fc8b')]
pool = <FakeResource address_scope_id=address-scope-id-2de14d14377c4124bb0d1fb11cd0fc8b, default_prefixlen=8, default_quota=None, id=subnet-pool-id-a432b35fb25e4c1a9d20a75ba4215f4d, ip_version=4, is_default=False, keys=<MagicMock id='140279016864464'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-d267864b6d0947d494db95b270975225, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-f74eb811a1a140f4808c46ba257efefd, shared=False, tenant_id=project-id-f74eb811a1a140f4808c46ba257efefd>
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-79a1e1499f3b49e184c52a11b6053146', 8, None, 'subnet-pool-id-c59b8aa3f0a14d818d282327ffa6c6aa', 4, False, 32, 8, 'subnet-pool-name-31c1f8452ac24e51b0acfd4e00127a20', '10.0.0.0/24, 10.1.0.0/24', 'project-id-4078b4de4c0646d18f9de3236b6d0437', 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