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-2cb5346d657b4181b1f8285e90f34950, instance_id=server-id-71986b41d9934b278fb2bd53881a882d, 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-dafd137c6259484896ac357b3355d3e0, id=floating-ip-id-977e499d4c384840b455de05697b1aa2, keys=<MagicMock id='153775056'>, port_id=port-id-6fa77127ab3444c78a89542a87a26bbe, project_id=project-id-e6c82c032ee245aea04f6821d446289a, router_id=router-id-599863ce3b87464385f90c8925514ee3, status=DOWN, tenant_id=project-id-e6c82c032ee245aea04f6821d446289a>
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-c20e1ff0d09848148e923f8afbbe52cf', '1.0.9.0', '2.0.9.0', 'server-id-be2158118b4d40e2b4f8fe641e0eeec1', 'public'), ('floating-ip-id-3d324c892d324e54bc4b11f4454b429a', '1.0.9.0', '2.0.9.0', 'server-id-fe3303e995d94495b356bacb86c6cf28', 'public'), ('floating-ip-id-66b59c692d0649e7bb0040a8a9ba18df', '1.0.9.0', '2.0.9.0', 'server-id-4e5a7bf79da14e44973785dcdd2869cc', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-c20e1ff0d09848148e923f8afbbe52cf, instance_id=server-id-be2158118b4d40e2b4f8fe641e0eeec1, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-3d324c892d324e54bc4b11f4454b429a, instance_id=server-id-fe3303e995d94495b356bacb86c6cf28, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-66b59c692d0649e7bb0040a8a9ba18df, instance_id=server-id-4e5a7bf79da14e44973785dcdd2869cc, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-66b59c692d0649e7bb0040a8a9ba18df, instance_id=server-id-4e5a7bf79da14e44973785dcdd2869cc, 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-247a2b1f8f194b2b812caba1ba4a602b', '1.0.9.0', '2.0.9.0', 'port-id-9598685080da437486f4f0978af2ba9c'), ('floating-ip-id-954e169d5e3846648d47495dfbe4d0e2', '1.0.9.0', '2.0.9.0', 'port-id-014d7e5d72f14b73b638c85ef3850135'), ('floating-ip-id-7817b861927c4978b41c915600f25a66', '1.0.9.0', '2.0.9.0', 'port-id-e62c7656011d4654a849b880000a4098')]
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-b472300b3756426eb7c0521c2952bbe9, id=floating-ip-id-247a2b1f8f194b2b812caba1ba4a602b, keys=<MagicMock id='114569808'>, port_id=port-id-9598685080da437486f4f0978af2ba9c, project_id=project-id-bfd184ad9132468d8d02f80f2d73f818, router_id=router-id-451e0969c3b644febc9c35dd630a33ae, status=DOWN, tenant_id=project-id-bfd184ad9132468d8d02f80f2d73f818>, <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-ee4ae5a238ba4eeba378c4cca7c7caf1, id=floating-ip-id-954e169d5e3846648d47495dfbe4d0e2, keys=<MagicMock id='154209360'>, port_id=port-id-014d7e5d72f14b73b638c85ef3850135, project_id=project-id-e950e141c0aa4920a5ce0ee5113bcd8d, router_id=router-id-7e549cb381d34abe9a9082baf9ca7030, status=DOWN, tenant_id=project-id-e950e141c0aa4920a5ce0ee5113bcd8d>, <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-a434d51792c84775bb7889dc8530f61a, id=floating-ip-id-7817b861927c4978b41c915600f25a66, keys=<MagicMock id='53912336'>, port_id=port-id-e62c7656011d4654a849b880000a4098, project_id=project-id-b384ba9dfd9d43dca60dbca903a5b22a, router_id=router-id-1ea45f242e6944a580dab7cab916e30d, status=DOWN, tenant_id=project-id-b384ba9dfd9d43dca60dbca903a5b22a>]
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-a434d51792c84775bb7889dc8530f61a, id=floating-ip-id-7817b861927c4978b41c915600f25a66, keys=<MagicMock id='53912336'>, port_id=port-id-e62c7656011d4654a849b880000a4098, project_id=project-id-b384ba9dfd9d43dca60dbca903a5b22a, router_id=router-id-1ea45f242e6944a580dab7cab916e30d, status=DOWN, tenant_id=project-id-b384ba9dfd9d43dca60dbca903a5b22a>
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-c4403a6c570646abb78dc4e6bc69ff90', 'server-id-ea66cf736194490f9a8c63217ccf348a', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-c4403a6c570646abb78dc4e6bc69ff90, instance_id=server-id-ea66cf736194490f9a8c63217ccf348a, 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-224744ab366a4b04bf62e4a6aec9516f', 'floating-ip-id-e47e47e687394edea41e1b173b0d4e56', 'port-id-6dcb7327e1cd4fd4bb0d4a36faa0de5e', 'project-id-66b88e41bd30439587e5f91464f7b170', 'router-id-12a07b8b425249aa8228181ff49a339a', '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-224744ab366a4b04bf62e4a6aec9516f, id=floating-ip-id-e47e47e687394edea41e1b173b0d4e56, keys=<MagicMock id='54055312'>, port_id=port-id-6dcb7327e1cd4fd4bb0d4a36faa0de5e, project_id=project-id-66b88e41bd30439587e5f91464f7b170, router_id=router-id-12a07b8b425249aa8228181ff49a339a, status=DOWN, tenant_id=project-id-66b88e41bd30439587e5f91464f7b170>
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-7b8968c9fbce4010963836655db2a42f', False, 'network-label-b528fcce8b9744c292d130d962c70263', None, False, '255.255.255.0', None, None, 'project-id-31b097bd507b419c91542da89af2eb70', 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-b228a5fb5c1c4a83aa6d89e029340023', 'network-name-7346c9421e60451595ce661303915759', '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-4f46748879904db9b6fabcc0b4be14d3', 'network-name-050772dc4487475fb5ed03e9a9052fad', '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-c42f3df860fa4c7e9ffc2b69ea0606fc', 'network-name-4f637d36157149ee8e566a92eee81258', 'a, b'), ('network-id-527bc85a93574308a75092d82f365a16', 'network-name-1a6c637b25f64f53a6092509b5cd2d74', 'a, b'), ('network-id-8f608b6a30e54fc78e9e5d1d1dd8d44f', 'network-name-16484d89393c4b66b2a1d37dcd006392', 'a, b')]
data_long = [('network-id-c42f3df860fa4c7e9ffc2b69ea0606fc', 'network-name-4f637d36157149ee8e566a92eee81258', 'ACTIVE', 'project-id-cd76aa29accd4949a667b74d56183aab', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-527bc85a93574308a75092d82f365a16', 'network-name-1a6c637b25f64f53a6092509b5cd2d74', 'ACTIVE', 'project-id-8a42a42f93af43cfada020c5dcf7dc47', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-8f608b6a30e54fc78e9e5d1d1dd8d44f', 'network-name-16484d89393c4b66b2a1d37dcd006392', 'ACTIVE', 'project-id-95e0f812bb1f4a4cbf7ce68aaee48e39', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-8f608b6a30e54fc78e9e5d1d1dd8d44f, keys=<MagicMock id='121968784'>, name=network-name-16484d89393c4b66b2a1d37dcd006392, project_id=project-id-95e0f812bb1f4a4cbf7ce68aaee48e39, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-95e0f812bb1f4a4cbf7ce68aaee48e39>
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-351d9a3085314cb496aba00b651e4526', 'network-label-e873d6cf20e34b778a04a6ac59d77b80', '10.0.0.0/24'), ('network-id-44bc9f6cc8014161aa735eff308b18db', 'network-label-b951e7329d7c4923bad9b3c621ee0f8f', '10.0.0.0/24'), ('network-id-fdff0f40971c4c199a77b16ee9d5aac1', 'network-label-6e072130c62d40d9b68c21b779705b5c', '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-fdff0f40971c4c199a77b16ee9d5aac1, injected=False, keys=<MagicMock id='115239312'>, label=network-label-6e072130c62d40d9b68c21b779705b5c, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-0112890572b44d7f81fb1a55c3027cbc, 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-064a90c2304a40d0b6566bb988d710ed', 'network-name-04f8847cdaa040dc90344866ad8b4304', 'project-id-33d53426b4854243a67dd6428565a7c0', '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-a50563ce3d6a48bca222106217e0e06c', False, 'network-label-821f4710c6aa4696aa39593d46dea414', None, False, '255.255.255.0', None, None, 'project-id-621d6b9d68fe49a3982c8d6b20cffb8e', 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-2a1902417a274f5395ae6d6ff049534c', '', '', 'ovs', 'normal', 'device-id-b474d74f926e4b22961b93d365ded793', 'compute:nova', '', 'dns-name-6041ca8937b1486c8b816eb97bbf5601', '', '', 'port-id-ea7199ca99ea4345ac3dd03d2d8960ca', 'fa:16:3e:a9:4e:72', 'port-name-dc427196e0864059ab1230277d9ff238', 'network-id-6ec762cb2a724cc1b13236a7b8b6f920', True, 'project-id-ad24bc7de8eb4d62ae06a816ce52119e', '', '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-a7959dac161546958f9708c1444e07f7', 'router-name-fbb070658d8d4302b3909593a7ebe24f', 'project-id-0dfd612e7b4745ad93f6eca420e8f086')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-a7959dac161546958f9708c1444e07f7, keys=<MagicMock id='170072336'>, name=router-name-fbb070658d8d4302b3909593a7ebe24f, routes=[], status=ACTIVE, tenant_id=project-id-0dfd612e7b4745ad93f6eca420e8f086>
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-32dac0a84e774eaaa40adc378457eb0d', 'router-name-7ba178909bbf4f1a8fcc021d735649aa', 'ACTIVE', 'UP', False, False, 'project-id-e16afd75d9cd4e04afa93690f0cd744d'), ('router-id-14bb14d8d0104ab2bda38f51e3007f85', 'router-name-8c1410ed6e7c41b699dda99719e45ee6', 'ACTIVE', 'UP', False, False, 'project-id-0ac3f1a16f7c40a0ab98ba317d6e7a6d'), ('router-id-37f958727b444759bacba91e8739f935', 'router-name-9b9e8fe92c8c4170933970b6c5d114d4', 'ACTIVE', 'UP', False, False, 'project-id-811ddab341a843038c9e38c38ff0abc0')]
data_long = [('router-id-32dac0a84e774eaaa40adc378457eb0d', 'router-name-7ba178909bbf4f1a8fcc021d735649aa', 'ACTIVE', 'UP', False, False, 'project-id-e16afd75d9cd4e04afa93690f0cd744d', [], '{}', ''), ('router-id-14bb14d8d0104ab2bda38f51e3007f85', 'router-name-8c1410ed6e7c41b699dda99719e45ee6', 'ACTIVE', 'UP', False, False, 'project-id-0ac3f1a16f7c40a0ab98ba317d6e7a6d', [], '{}', ''), ('router-id-37f958727b444759bacba91e8739f935', 'router-name-9b9e8fe92c8c4170933970b6c5d114d4', 'ACTIVE', 'UP', False, False, 'project-id-811ddab341a843038c9e38c38ff0abc0', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-37f958727b444759bacba91e8739f935, keys=<MagicMock id='170046032'>, name=router-name-9b9e8fe92c8c4170933970b6c5d114d4, routes=[], status=ACTIVE, tenant_id=project-id-811ddab341a843038c9e38c38ff0abc0>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-32dac0a84e774eaaa40adc378457eb0d, keys=<MagicMock id='170023440'>, name=router-name-7ba178909bbf4f1a8fcc021d735649aa, routes=[], status=ACTIVE, tenant_id=project-id-e16afd75d9cd4e04afa93690f0cd744d>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-14bb14d8d0104ab2bda38f51e3007f85, keys=<MagicMock id='170044944'>, name=router-name-8c1410ed6e7c41b699dda99719e45ee6, routes=[], status=ACTIVE, tenant_id=project-id-0ac3f1a16f7c40a0ab98ba317d6e7a6d>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-37f958727b444759bacba91e8739f935, keys=<MagicMock id='170046032'>, name=router-name-9b9e8fe92c8c4170933970b6c5d114d4, routes=[], status=ACTIVE, tenant_id=project-id-811ddab341a843038c9e38c38ff0abc0>]
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-3b1ccafe46ea45578b5847d6509db336', 'router-name-76e7084b88154c20abc01e3ab4acbde2', 'project-id-22ca81f2ac7c4425bfbd5d88a5801e25')
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-2ef447c71d1d466094ecfc57bdab5df6', 'security-group-name-5e27acdf4a094b699f6acf113fdc0e7b', 'security-group-description-7ce02917fb76403fb4dae6c6c7017eeb'),)
expected_data_all_projects = (('security-group-id-2ef447c71d1d466094ecfc57bdab5df6', 'security-group-name-5e27acdf4a094b699f6acf113fdc0e7b', 'security-group-description-7ce02917fb76403fb4dae6c6c7017eeb', 'project-id-c89969675e304e559b9887415d6904fb'),)
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-963d0d8f6d6b41e899cb4d329fadf5c8', 'security-group-name-bcb798aafacb4edaab0393e07a644c09', 'security-group-description-07fb1682f6e54eae955550a64a7a1bf6', 'project-id-5dcb7b45f8814ec393341fbb35039e8f'),)
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-b3bf961d7988420fa84ba1edfb7c0ab9', 'icmp', '0.0.0.0/0', 'security-group-id-700ee794718642038de654142830d57d', '', '')
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-c672c324a4924273a473ea7383aa7dc6', None, None, 'project-id-71beda7f29f34fb8b5aa549036d4c3ab', None, 'remote-security-group-id-4afff438a4e0496295cb9a212b95cc62', None, 'security-group-id-8187dba7cc2a4ef0bdc8bbff0774d58e')
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-18eb64753f724f5cba659500c9b63793', 'subnet-name-9e79b9dd8ac7458589788c782c4cabb7', 'network-id-2daa6e365b8d4935a17556f149e1d457', '10.10.10.0/24'), ('subnet-id-07e1988060804bffa94ffc11cca38468', 'subnet-name-8541e26c49824c708c4bbba6bc6e5843', 'network-id-77125f4a93844458806c8cac835d7fa0', '10.10.10.0/24'), ('subnet-id-77282ee1a3964aca8b790493553474cf', 'subnet-name-b7745b913b6f47e4832f91492b52aa50', 'network-id-a0686cba07ba4c419489800ff4ec3b72', '10.10.10.0/24')]
data_long = [('subnet-id-18eb64753f724f5cba659500c9b63793', 'subnet-name-9e79b9dd8ac7458589788c782c4cabb7', 'network-id-2daa6e365b8d4935a17556f149e1d457', '10.10.10.0/24', 'project-id-71e3338754dd45eeb81dd9adab2e8f76', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-07e1988060804bffa94ffc11cca38468', 'subnet-name-8541e26c49824c708c4bbba6bc6e5843', 'network-id-77125f4a93844458806c8cac835d7fa0', '10.10.10.0/24', 'project-id-609e6d7301164a178d0490946c294625', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-77282ee1a3964aca8b790493553474cf', 'subnet-name-b7745b913b6f47e4832f91492b52aa50', 'network-id-a0686cba07ba4c419489800ff4ec3b72', '10.10.10.0/24', 'project-id-3f808887730c4f7097bad995180201aa', 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-77282ee1a3964aca8b790493553474cf, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='100054672'>, name=subnet-name-b7745b913b6f47e4832f91492b52aa50, network_id=network-id-a0686cba07ba4c419489800ff4ec3b72, project_id=project-id-3f808887730c4f7097bad995180201aa, subnetpool_id=None, tenant_id=project-id-3f808887730c4f7097bad995180201aa>
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-9d816170596444c4a21c1a3ec7611cda', '4', 'None', 'None', 'subnet-name-dc60d3961d96490aa81f1b1507e33cd1', 'network-id-cc5701b9f9de4c1ca49aabe71dd21806', 'project-id-c7c1d47e3feb49b3aaeb335707d39b57', '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-c5dc135c0f0b453581bfa5d6e270a26d', 'subnet-pool-name-16351ebfd70544b893443a472e3cbd28', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-e3443db931174a7a9e4f2c4f49088257', 'subnet-pool-name-0bf2268d1e6c41b7bce8a9b33973cf32', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-a441235021d845718580b1c0d672dd9c', 'subnet-pool-name-9305bd7ec1c44784ab6dfa466ff526b7', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-c5dc135c0f0b453581bfa5d6e270a26d', 'subnet-pool-name-16351ebfd70544b893443a472e3cbd28', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-27a2e6b91f664f81bc72e6824b2685f5'), ('subnet-pool-id-e3443db931174a7a9e4f2c4f49088257', 'subnet-pool-name-0bf2268d1e6c41b7bce8a9b33973cf32', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-4d8727d3b9f8412e9f9a7891028d2c59'), ('subnet-pool-id-a441235021d845718580b1c0d672dd9c', 'subnet-pool-name-9305bd7ec1c44784ab6dfa466ff526b7', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-214746ea9d7c40499b7026f7069524bd')]
pool = <FakeResource address_scope_id=address-scope-id-214746ea9d7c40499b7026f7069524bd, default_prefixlen=8, default_quota=None, id=subnet-pool-id-a441235021d845718580b1c0d672dd9c, ip_version=4, is_default=False, keys=<MagicMock id='163597712'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-9305bd7ec1c44784ab6dfa466ff526b7, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-4d6e03ea9e7643b09e68d4df4506e752, shared=False, tenant_id=project-id-4d6e03ea9e7643b09e68d4df4506e752>
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-24c6dd792f214ed1954b77b95fb87de2', 8, None, 'subnet-pool-id-9db2b7f9d3ad43c99175ee64852cfc10', 4, False, 32, 8, 'subnet-pool-name-49825b7244b64667a7f2724eca246aa6', '10.0.0.0/24, 10.1.0.0/24', 'project-id-d661995e79194ab0b5fecc591385287d', 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