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-714b7a01c14741c2aeb926c51679ea5f, instance_id=server-id-4fccf670dd3a4fc8b86a1ae83bd4784d, 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-56ed69eb134b40ebabe3822d49ba9336, id=floating-ip-id-6658e28d8dc74d75aba405eba5b5b146, keys=<MagicMock id='47162669465872'>, port_id=port-id-8b667aa325fa4b608f47adc0270d81b1, project_id=project-id-16174f69fea648be938c09153cf11e56, router_id=router-id-b8e66bd12e98458b9fc4e1cb993a5f8d, status=DOWN, tenant_id=project-id-16174f69fea648be938c09153cf11e56>
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-4a8fb38da50847b6997fa0a9c7804dcb', '1.0.9.0', '2.0.9.0', 'server-id-bc95aeafde4843589e9fbb903b9384cc', 'public'), ('floating-ip-id-3693be6be06a4d9d895753d1792bc4c1', '1.0.9.0', '2.0.9.0', 'server-id-ee301ae0a5484bb8bdc32d3aea4b0aca', 'public'), ('floating-ip-id-02deb814e4c148feac89db93058627f7', '1.0.9.0', '2.0.9.0', 'server-id-a97592c00eff4604a3fb01a1964aa402', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-4a8fb38da50847b6997fa0a9c7804dcb, instance_id=server-id-bc95aeafde4843589e9fbb903b9384cc, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-3693be6be06a4d9d895753d1792bc4c1, instance_id=server-id-ee301ae0a5484bb8bdc32d3aea4b0aca, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-02deb814e4c148feac89db93058627f7, instance_id=server-id-a97592c00eff4604a3fb01a1964aa402, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-02deb814e4c148feac89db93058627f7, instance_id=server-id-a97592c00eff4604a3fb01a1964aa402, 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-f499f41e9cb04134927d0bcad8730b12', '1.0.9.0', '2.0.9.0', 'port-id-6459a1170f4f4db0a1771a8c415579d0'), ('floating-ip-id-9758ca5d2caf434b9892831404e98d48', '1.0.9.0', '2.0.9.0', 'port-id-358fdab1d19e4caf99a7a828d8bb03e9'), ('floating-ip-id-30911d8b8dab43d98e4c2d7e3d246582', '1.0.9.0', '2.0.9.0', 'port-id-99d1a755ed754fb786841dc13b17c766')]
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-7291e17abb4b48dfa3941a1054c0697f, id=floating-ip-id-f499f41e9cb04134927d0bcad8730b12, keys=<MagicMock id='47162602338512'>, port_id=port-id-6459a1170f4f4db0a1771a8c415579d0, project_id=project-id-62d236581773455680955a0a39daed36, router_id=router-id-6af019447dec4985adafa256c472bc3c, status=DOWN, tenant_id=project-id-62d236581773455680955a0a39daed36>, <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-820e4542e0c344938a1da097e5fb933c, id=floating-ip-id-9758ca5d2caf434b9892831404e98d48, keys=<MagicMock id='47162656317264'>, port_id=port-id-358fdab1d19e4caf99a7a828d8bb03e9, project_id=project-id-b503ac612fd14758a4c4005994a1f0cc, router_id=router-id-1bc17a1d4be54a11ac5d7dccd483b189, status=DOWN, tenant_id=project-id-b503ac612fd14758a4c4005994a1f0cc>, <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-c1501f439d374f189dd9f0333b640451, id=floating-ip-id-30911d8b8dab43d98e4c2d7e3d246582, keys=<MagicMock id='47162656363792'>, port_id=port-id-99d1a755ed754fb786841dc13b17c766, project_id=project-id-2614972cd2b34d229a6f736833114622, router_id=router-id-7048983ddae44f909068032a2b4a6bd7, status=DOWN, tenant_id=project-id-2614972cd2b34d229a6f736833114622>]
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-c1501f439d374f189dd9f0333b640451, id=floating-ip-id-30911d8b8dab43d98e4c2d7e3d246582, keys=<MagicMock id='47162656363792'>, port_id=port-id-99d1a755ed754fb786841dc13b17c766, project_id=project-id-2614972cd2b34d229a6f736833114622, router_id=router-id-7048983ddae44f909068032a2b4a6bd7, status=DOWN, tenant_id=project-id-2614972cd2b34d229a6f736833114622>
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-141236d902004929b99cc7a52e8a6ae8', 'server-id-a84c0e6385a64a42a331cd4c17f802fc', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-141236d902004929b99cc7a52e8a6ae8, instance_id=server-id-a84c0e6385a64a42a331cd4c17f802fc, 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-9d196eb661aa4656b81252667ec36c97', 'floating-ip-id-58db7b50399c42788ebcfa3f124e7cad', 'port-id-2c8fd07bb25f40fc86cda3cd98f97b8b', 'project-id-3bffdc61b56a4021bcf8093308305118', 'router-id-02eaf0779d2f42e69bad987268680583', '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-9d196eb661aa4656b81252667ec36c97, id=floating-ip-id-58db7b50399c42788ebcfa3f124e7cad, keys=<MagicMock id='47162564558224'>, port_id=port-id-2c8fd07bb25f40fc86cda3cd98f97b8b, project_id=project-id-3bffdc61b56a4021bcf8093308305118, router_id=router-id-02eaf0779d2f42e69bad987268680583, status=DOWN, tenant_id=project-id-3bffdc61b56a4021bcf8093308305118>
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-e856e8b3960142b5979cb745e86580e0', False, 'network-label-37568ca7dbb746709bf4309fc20e6246', None, False, '255.255.255.0', None, None, 'project-id-046ba312994945eea2cccc23b6c42377', 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-6ea633e5adfb4c03a0fab5ec3c3b73f4', 'network-name-d6ba1a0b455b4fe9ad444ca3abbb05c9', '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-28daee1d5aad457bb952815d317ac3a9', 'network-name-26bffe4a80774a61ae158c31921be983', '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-890122c648be47a385ed48aa4da3ccfb', 'network-name-37a86d408d064a2482e184b455cf4222', 'a, b'), ('network-id-38073488563e4ddbb1d9f16622aee937', 'network-name-24040b1cb36340e1a89908e01ea81239', 'a, b'), ('network-id-82aece6b478646dc883a379b92d3dc7b', 'network-name-32efc5a63c6a439fab7ce2d990bf565d', 'a, b')]
data_long = [('network-id-890122c648be47a385ed48aa4da3ccfb', 'network-name-37a86d408d064a2482e184b455cf4222', 'ACTIVE', 'project-id-898f5345820f492288e149650d598c36', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-38073488563e4ddbb1d9f16622aee937', 'network-name-24040b1cb36340e1a89908e01ea81239', 'ACTIVE', 'project-id-f2cb8ec99f3a468591938cc70e8f9ab3', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-82aece6b478646dc883a379b92d3dc7b', 'network-name-32efc5a63c6a439fab7ce2d990bf565d', 'ACTIVE', 'project-id-be08f922baf141ad98dc58a59f5bbe2a', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-82aece6b478646dc883a379b92d3dc7b, keys=<MagicMock id='47162587919952'>, name=network-name-32efc5a63c6a439fab7ce2d990bf565d, project_id=project-id-be08f922baf141ad98dc58a59f5bbe2a, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-be08f922baf141ad98dc58a59f5bbe2a>
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-a66a9d7ecd944b329bd917bde8530fc9', 'network-label-0254f6f5a03f48718bc6e855bc4d6c39', '10.0.0.0/24'), ('network-id-a0be6100886d49778750bd236e0475c6', 'network-label-ad8edf190e194bd58fa2516c8b89fd66', '10.0.0.0/24'), ('network-id-6f0ad928b1fc4fd7b6a8edabc1dfa9b4', 'network-label-3d34e062c34d4b85a35788f62256fd4f', '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-6f0ad928b1fc4fd7b6a8edabc1dfa9b4, injected=False, keys=<MagicMock id='47162651942608'>, label=network-label-3d34e062c34d4b85a35788f62256fd4f, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-a1ed0b70e2e44c3aaa8501a71fcff46a, 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-ebe163fb268243958de3bb204d8b43c5', 'network-name-302e79f2a73544bbb94c5b654f72a4a4', 'project-id-692b0e5da45241259a14117b1ba84509', '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-41ad730037624702a65311ff3bddb2b5', False, 'network-label-baab8520f3034c7386cdfc9078337dda', None, False, '255.255.255.0', None, None, 'project-id-e8656926966d441fb45ff518c25e3557', 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-1bb5d192aad1407da15405b0c58cecd5', '', '', 'ovs', 'normal', 'device-id-2b54dbc43aae44758e30ad0ebcc4b3e8', 'compute:nova', '', 'dns-name-01c4e2373d274aac8265f2275c930a4b', '', '', 'port-id-3fc1cc7d2baf45f89e44313bae68f14c', 'fa:16:3e:a9:4e:72', 'port-name-da2dc710086c4c819fa18fb28f667782', 'network-id-9e38beebad0944dea84e809dfde060c3', True, 'project-id-0148e6b2608a494cbd37b67aac76d0f4', '', '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-d688ad1c617e4724be4fe7fe1970609c', 'router-name-a8226244dc45464d9d9f631814ad2f8c', 'project-id-e294db41e11a419692e406493ecd5741')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-d688ad1c617e4724be4fe7fe1970609c, keys=<MagicMock id='47162664049296'>, name=router-name-a8226244dc45464d9d9f631814ad2f8c, routes=[], status=ACTIVE, tenant_id=project-id-e294db41e11a419692e406493ecd5741>
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-679ab052c2be4ea29834e509c6aa7a1e', 'router-name-cbeb53bae912482ba631f81a88d094df', 'ACTIVE', 'UP', False, False, 'project-id-e8c818a95e694e00bea21eef18c9a70b'), ('router-id-fcf7b7a9b844473285f577bf7e6d7cda', 'router-name-6389588729604786925ec9009a1f7982', 'ACTIVE', 'UP', False, False, 'project-id-21cfa8e8141643c2ae9e0e2e8c5da857'), ('router-id-636f6ff400e043f3aeb817017b7170a0', 'router-name-19a90345b3ad466fa975805c079176ba', 'ACTIVE', 'UP', False, False, 'project-id-a0f8e85568f24c199a8a9b6952fac109')]
data_long = [('router-id-679ab052c2be4ea29834e509c6aa7a1e', 'router-name-cbeb53bae912482ba631f81a88d094df', 'ACTIVE', 'UP', False, False, 'project-id-e8c818a95e694e00bea21eef18c9a70b', [], '{}', ''), ('router-id-fcf7b7a9b844473285f577bf7e6d7cda', 'router-name-6389588729604786925ec9009a1f7982', 'ACTIVE', 'UP', False, False, 'project-id-21cfa8e8141643c2ae9e0e2e8c5da857', [], '{}', ''), ('router-id-636f6ff400e043f3aeb817017b7170a0', 'router-name-19a90345b3ad466fa975805c079176ba', 'ACTIVE', 'UP', False, False, 'project-id-a0f8e85568f24c199a8a9b6952fac109', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-636f6ff400e043f3aeb817017b7170a0, keys=<MagicMock id='47162657830224'>, name=router-name-19a90345b3ad466fa975805c079176ba, routes=[], status=ACTIVE, tenant_id=project-id-a0f8e85568f24c199a8a9b6952fac109>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-679ab052c2be4ea29834e509c6aa7a1e, keys=<MagicMock id='47162661359056'>, name=router-name-cbeb53bae912482ba631f81a88d094df, routes=[], status=ACTIVE, tenant_id=project-id-e8c818a95e694e00bea21eef18c9a70b>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-fcf7b7a9b844473285f577bf7e6d7cda, keys=<MagicMock id='47162561441360'>, name=router-name-6389588729604786925ec9009a1f7982, routes=[], status=ACTIVE, tenant_id=project-id-21cfa8e8141643c2ae9e0e2e8c5da857>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-636f6ff400e043f3aeb817017b7170a0, keys=<MagicMock id='47162657830224'>, name=router-name-19a90345b3ad466fa975805c079176ba, routes=[], status=ACTIVE, tenant_id=project-id-a0f8e85568f24c199a8a9b6952fac109>]
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-50b9c67a2c8e4768ac384b54f1b3be01', 'router-name-799d5bdb2a344f60b6824555ca2aece0', 'project-id-c6bfe50bfa2944dab8c5a7d70848e31e')
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-3bdb7f0eecef49729ffdc6fed57eede3', 'security-group-name-94dee7b800414010a3894ae094824a92', 'security-group-description-e6891d7b802a479bb5c87c711fb4a84d'),)
expected_data_all_projects = (('security-group-id-3bdb7f0eecef49729ffdc6fed57eede3', 'security-group-name-94dee7b800414010a3894ae094824a92', 'security-group-description-e6891d7b802a479bb5c87c711fb4a84d', 'project-id-50857d1d8f414119ab51f6c8993c1bcb'),)
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-5e870205129f4920bce0e74c59c7b95b', 'security-group-name-9b511c8f553740d09cf6e1b81ac05934', 'security-group-description-ad7ab45d88c14f47ac5399ae29ec8bc8', 'project-id-4f876fc4892f4f6b913ac30ee6ed574e'),)
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-dedebd294d6443b9ac0a40e4c093536c', 'icmp', '0.0.0.0/0', 'security-group-id-3753c9e6cdb0432f8c5d9fa5c339e5d7', '', '')
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-061080caca414fe280a8e1d7c83f67cb', None, None, 'project-id-692f244c9ef743b6a15123c3263ff25e', None, 'remote-security-group-id-33d6e4b771c04c7e83dd7f96cf806f33', None, 'security-group-id-f44e03d43d9b41d1bf21ec486912ed63')
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-b20668a22fc54f759fece695678a49e5', 'subnet-name-4506c720919d441383b29b7d179c8371', 'network-id-7fe8a2b523ff4f5daf9bf8022393d73d', '10.10.10.0/24'), ('subnet-id-c7f4b24b46b542bea836ee7d2d85f6cf', 'subnet-name-18d4964c89d34313b3fd0ef084fd63ec', 'network-id-084923d7a4ac4bb4a7419bb111015f9f', '10.10.10.0/24'), ('subnet-id-8f1be5328d0f47fa8b669685bde26ab3', 'subnet-name-7705b6249a7a4742a79f7e3fcc369291', 'network-id-909f250d7e4a4c8c81a9bb5690327e93', '10.10.10.0/24')]
data_long = [('subnet-id-b20668a22fc54f759fece695678a49e5', 'subnet-name-4506c720919d441383b29b7d179c8371', 'network-id-7fe8a2b523ff4f5daf9bf8022393d73d', '10.10.10.0/24', 'project-id-26cb240cc1e044a0adff0b632d64caa1', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-c7f4b24b46b542bea836ee7d2d85f6cf', 'subnet-name-18d4964c89d34313b3fd0ef084fd63ec', 'network-id-084923d7a4ac4bb4a7419bb111015f9f', '10.10.10.0/24', 'project-id-956430b3503f4d72a4da19f6775517bc', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-8f1be5328d0f47fa8b669685bde26ab3', 'subnet-name-7705b6249a7a4742a79f7e3fcc369291', 'network-id-909f250d7e4a4c8c81a9bb5690327e93', '10.10.10.0/24', 'project-id-5773edcf40594680bdf63dd2607f6f78', 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-8f1be5328d0f47fa8b669685bde26ab3, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='47162675955024'>, name=subnet-name-7705b6249a7a4742a79f7e3fcc369291, network_id=network-id-909f250d7e4a4c8c81a9bb5690327e93, project_id=project-id-5773edcf40594680bdf63dd2607f6f78, subnetpool_id=None, tenant_id=project-id-5773edcf40594680bdf63dd2607f6f78>
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-4351420c8a484fb4a4815c117cea3fcd', '4', 'None', 'None', 'subnet-name-a1443bff96b346b0969e727f1ab32bb2', 'network-id-76cc70b97aa5472b9e99a7a6539596ed', 'project-id-137d7221afe548a1a29e75dc42f1f457', '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-8d92a1b372b44c70bb2649978ea03510', 'subnet-pool-name-3a2f517b2db94488853561c54df726b5', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-3447f3cfe9e94384b68e0a9b91d10bbd', 'subnet-pool-name-af4d8ddd5eeb4033ac9e86b65f1f7167', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-c3e0ef4c93fa4312bce4e9e37b78c060', 'subnet-pool-name-e557f545388c47f6a7b347966397f461', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-8d92a1b372b44c70bb2649978ea03510', 'subnet-pool-name-3a2f517b2db94488853561c54df726b5', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-97fe2ea1c2a3439f8e749c5fadbc6688'), ('subnet-pool-id-3447f3cfe9e94384b68e0a9b91d10bbd', 'subnet-pool-name-af4d8ddd5eeb4033ac9e86b65f1f7167', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-aca41ba3a1db4175a200e25c7ea3ddfb'), ('subnet-pool-id-c3e0ef4c93fa4312bce4e9e37b78c060', 'subnet-pool-name-e557f545388c47f6a7b347966397f461', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-69dac7ab2ae74d41b8342115dba0d07f')]
pool = <FakeResource address_scope_id=address-scope-id-69dac7ab2ae74d41b8342115dba0d07f, default_prefixlen=8, default_quota=None, id=subnet-pool-id-c3e0ef4c93fa4312bce4e9e37b78c060, ip_version=4, is_default=False, keys=<MagicMock id='47162677833808'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-e557f545388c47f6a7b347966397f461, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-c64642752da64b8ebaf2261ca1c26647, shared=False, tenant_id=project-id-c64642752da64b8ebaf2261ca1c26647>
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-04197af0c5c745d29b987001417f4e81', 8, None, 'subnet-pool-id-b49251aadc194c2db3d7a10dce7fe70f', 4, False, 32, 8, 'subnet-pool-name-1a283d879afd436e8c0f2ce498ea9d8c', '10.0.0.0/24, 10.1.0.0/24', 'project-id-4e2aca4c24bc474a8131be8ee3d7a840', 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