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-8784349ba5d046b49b1b4d0ccbec2d5b, instance_id=server-id-302cf539f8a4444fa1e84509d2903f2d, 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-f01a80a0cd4e4e4592a0caa319a3446d, id=floating-ip-id-8e54ccaf9969442d864991c8b9f1f740, keys=<MagicMock id='139845270629584'>, port_id=port-id-a196052570e146a98c3eb528d8b12c29, project_id=project-id-cf0fc0cd15914da88bdb937181a392f5, router_id=router-id-accc4b3700ee44ae83eb0951318ba694, status=DOWN, tenant_id=project-id-cf0fc0cd15914da88bdb937181a392f5>
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-d7123738e41e4b6ba22de0dfc790004e', '1.0.9.0', '2.0.9.0', 'server-id-3a0dd9ebfc56441d97674fe1d998fc45', 'public'), ('floating-ip-id-7623bee7d9624a6d909019e578b1ca08', '1.0.9.0', '2.0.9.0', 'server-id-31e3b67ec7f7480f9e4e5cbcbd7fad8c', 'public'), ('floating-ip-id-332f16ca52414a1e8ad6ce85d7aeb6f1', '1.0.9.0', '2.0.9.0', 'server-id-f5e35a42810848439eab893bea399706', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-d7123738e41e4b6ba22de0dfc790004e, instance_id=server-id-3a0dd9ebfc56441d97674fe1d998fc45, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-7623bee7d9624a6d909019e578b1ca08, instance_id=server-id-31e3b67ec7f7480f9e4e5cbcbd7fad8c, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-332f16ca52414a1e8ad6ce85d7aeb6f1, instance_id=server-id-f5e35a42810848439eab893bea399706, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-332f16ca52414a1e8ad6ce85d7aeb6f1, instance_id=server-id-f5e35a42810848439eab893bea399706, 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-5a3103ca2f2c40769f468cb65fde9567', '1.0.9.0', '2.0.9.0', 'port-id-df8499df8cba4b40add5fd2b33a95a70'), ('floating-ip-id-2c15f7fab85b463bb2a8ed7e3c9a48de', '1.0.9.0', '2.0.9.0', 'port-id-f06725113e7641e2a13e6ddecb26a46b'), ('floating-ip-id-52a7223f2bf245c2818204a12149b709', '1.0.9.0', '2.0.9.0', 'port-id-d96321e61b214fdba58be7a2ccac326a')]
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-2c1fbe48862a4c429a213b3a5702d80e, id=floating-ip-id-5a3103ca2f2c40769f468cb65fde9567, keys=<MagicMock id='139845273749968'>, port_id=port-id-df8499df8cba4b40add5fd2b33a95a70, project_id=project-id-86a97390ed994679b7c942bdc4364931, router_id=router-id-b2da4e918e184666835e09b61ae5d9d9, status=DOWN, tenant_id=project-id-86a97390ed994679b7c942bdc4364931>, <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-b43bb7237dcf4917b3819f5c3241e25c, id=floating-ip-id-2c15f7fab85b463bb2a8ed7e3c9a48de, keys=<MagicMock id='139845270629136'>, port_id=port-id-f06725113e7641e2a13e6ddecb26a46b, project_id=project-id-8128efea7b0f46fcad6f06bcad101001, router_id=router-id-1d5f7439bb6f463bada4ad05c9c70006, status=DOWN, tenant_id=project-id-8128efea7b0f46fcad6f06bcad101001>, <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-2c029da0735248c29b97fc68fdefc645, id=floating-ip-id-52a7223f2bf245c2818204a12149b709, keys=<MagicMock id='139845304245776'>, port_id=port-id-d96321e61b214fdba58be7a2ccac326a, project_id=project-id-20a801abf17d4599b1943e17d06a6acc, router_id=router-id-e7f3f9cbcd3b44988607201992356469, status=DOWN, tenant_id=project-id-20a801abf17d4599b1943e17d06a6acc>]
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-2c029da0735248c29b97fc68fdefc645, id=floating-ip-id-52a7223f2bf245c2818204a12149b709, keys=<MagicMock id='139845304245776'>, port_id=port-id-d96321e61b214fdba58be7a2ccac326a, project_id=project-id-20a801abf17d4599b1943e17d06a6acc, router_id=router-id-e7f3f9cbcd3b44988607201992356469, status=DOWN, tenant_id=project-id-20a801abf17d4599b1943e17d06a6acc>
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-685b53e6967d49db9a806e54f175f42a', 'server-id-a0c1c9a4e24346c9b2e5d47088e0ad66', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-685b53e6967d49db9a806e54f175f42a, instance_id=server-id-a0c1c9a4e24346c9b2e5d47088e0ad66, 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-08e921eb4605474fb6ce3081a8e88a50', 'floating-ip-id-4c09dc8990cb4c90b8742e8e9648520f', 'port-id-9c0d3c2be6d74b9682df3fa5bf97d166', 'project-id-f0ad56d60479442792ab7d71bd200292', 'router-id-67d7b3d94fab44fc954939cd3127e78c', '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-08e921eb4605474fb6ce3081a8e88a50, id=floating-ip-id-4c09dc8990cb4c90b8742e8e9648520f, keys=<MagicMock id='139845328071184'>, port_id=port-id-9c0d3c2be6d74b9682df3fa5bf97d166, project_id=project-id-f0ad56d60479442792ab7d71bd200292, router_id=router-id-67d7b3d94fab44fc954939cd3127e78c, status=DOWN, tenant_id=project-id-f0ad56d60479442792ab7d71bd200292>
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-2f163afd71e54bccb0a4593ef0aca337', False, 'network-label-e9d7966343764cd197fa84667a0b73f9', None, False, '255.255.255.0', None, None, 'project-id-e8c77d605c0d4ccd8433acaff89472ef', 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-ced58cb68f2f4a1182bddd912111b664', 'network-name-169aba2d822a4272af8e9762bcc61c75', '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-d2224c99ccfd45de84eaf3e328b8983e', 'network-name-f14b7bc61569445584f4e858cb731f0b', '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-1ec6d696423f49de91346a686f80835f', 'network-name-cff14c5c47b149ec8e77e7fbe0430529', 'a, b'), ('network-id-2bdb7c2922344689a45b6d0912baff04', 'network-name-51943bf2634b48e6a657b4edc69818d2', 'a, b'), ('network-id-294865112df246ef85570232cee1c31a', 'network-name-eff9f4da6ab94c44823df34ed7370b5c', 'a, b')]
data_long = [('network-id-1ec6d696423f49de91346a686f80835f', 'network-name-cff14c5c47b149ec8e77e7fbe0430529', 'ACTIVE', 'project-id-2d2b329570ac427e84bfdf5cca8bc1da', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-2bdb7c2922344689a45b6d0912baff04', 'network-name-51943bf2634b48e6a657b4edc69818d2', 'ACTIVE', 'project-id-a20f95c9747f45ffb4985f5399e81803', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-294865112df246ef85570232cee1c31a', 'network-name-eff9f4da6ab94c44823df34ed7370b5c', 'ACTIVE', 'project-id-6ae89b523ae54c1c8581213e5d7302da', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-294865112df246ef85570232cee1c31a, keys=<MagicMock id='139845282626320'>, name=network-name-eff9f4da6ab94c44823df34ed7370b5c, project_id=project-id-6ae89b523ae54c1c8581213e5d7302da, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-6ae89b523ae54c1c8581213e5d7302da>
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-26f12374fb5843f19fa61b471db2c3a8', 'network-label-414285dd99924bad9280d4d838e609f2', '10.0.0.0/24'), ('network-id-fb7784d9edd64c5ea20c7a16543460c5', 'network-label-73458d9115b34cc99904e6dfdb5e208e', '10.0.0.0/24'), ('network-id-95de01c380dc4354a70126b61708d714', 'network-label-27c2cb6f559c4cbd8c850d96080e252a', '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-95de01c380dc4354a70126b61708d714, injected=False, keys=<MagicMock id='139845270556176'>, label=network-label-27c2cb6f559c4cbd8c850d96080e252a, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-75c6521457a54409a1e7229f47b1bf07, 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-f76c27071ba649c3b41323e022ecf329', 'network-name-6a9d11d5490942fc9c8531ada24b4c2a', 'project-id-d3644f6bbeaa4ceeb29a64981b9e18d6', '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-1ec5ffe9f84645f9b5a2d0e4edd91210', False, 'network-label-fc5dbb881c7c42a29cce74d79aa4fadd', None, False, '255.255.255.0', None, None, 'project-id-a6b09602f725471890ff4e23de677bd7', 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-64e389d79e524261a0473a6b2634f6e1', '', '', 'ovs', 'normal', 'device-id-ff282a35420840058f1b2f7c66a7f85f', 'compute:nova', '', 'dns-name-4da9c674f1954d22b6ad27995171d5e9', '', '', 'port-id-81a08b82cb6b4cd8ad2efcdb23c3254c', 'fa:16:3e:a9:4e:72', 'port-name-3212d77e399c477bbab89629436c1a1e', 'network-id-84dc248745ef4e99add62ad4cdc1d255', True, 'project-id-d213934e493349d5b4994d9a5526fa77', '', '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-94b26ad4afb8416fba6f7b51b3a9b05f', 'router-name-08cd12f4f391407faf95d945b6db6214', 'project-id-02ccb70dab454028af008e21693f0561')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-94b26ad4afb8416fba6f7b51b3a9b05f, keys=<MagicMock id='139845272324112'>, name=router-name-08cd12f4f391407faf95d945b6db6214, routes=[], status=ACTIVE, tenant_id=project-id-02ccb70dab454028af008e21693f0561>
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-14e18ca992ab416399db11bf9a17c542', 'router-name-ff0aa43d8e5b458ba2c917bd98b80557', 'ACTIVE', 'UP', False, False, 'project-id-09c907f28b1e485baa2071e8dc0c7f27'), ('router-id-959ffa15babd4923a085d1751a609a37', 'router-name-e1e5190445be4fc9be8b88e3ff76ee3f', 'ACTIVE', 'UP', False, False, 'project-id-091538e29eaf4e48bcd82de82133fbda'), ('router-id-6eedf40c36a3480fa19b9fdda5a0d146', 'router-name-c37dc21223a94e809851275ce46cb73c', 'ACTIVE', 'UP', False, False, 'project-id-94a0aa4389e24c078e4927890c62f82d')]
data_long = [('router-id-14e18ca992ab416399db11bf9a17c542', 'router-name-ff0aa43d8e5b458ba2c917bd98b80557', 'ACTIVE', 'UP', False, False, 'project-id-09c907f28b1e485baa2071e8dc0c7f27', [], '{}', ''), ('router-id-959ffa15babd4923a085d1751a609a37', 'router-name-e1e5190445be4fc9be8b88e3ff76ee3f', 'ACTIVE', 'UP', False, False, 'project-id-091538e29eaf4e48bcd82de82133fbda', [], '{}', ''), ('router-id-6eedf40c36a3480fa19b9fdda5a0d146', 'router-name-c37dc21223a94e809851275ce46cb73c', 'ACTIVE', 'UP', False, False, 'project-id-94a0aa4389e24c078e4927890c62f82d', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-6eedf40c36a3480fa19b9fdda5a0d146, keys=<MagicMock id='139845294567248'>, name=router-name-c37dc21223a94e809851275ce46cb73c, routes=[], status=ACTIVE, tenant_id=project-id-94a0aa4389e24c078e4927890c62f82d>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-14e18ca992ab416399db11bf9a17c542, keys=<MagicMock id='139845261057104'>, name=router-name-ff0aa43d8e5b458ba2c917bd98b80557, routes=[], status=ACTIVE, tenant_id=project-id-09c907f28b1e485baa2071e8dc0c7f27>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-959ffa15babd4923a085d1751a609a37, keys=<MagicMock id='139845263768464'>, name=router-name-e1e5190445be4fc9be8b88e3ff76ee3f, routes=[], status=ACTIVE, tenant_id=project-id-091538e29eaf4e48bcd82de82133fbda>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-6eedf40c36a3480fa19b9fdda5a0d146, keys=<MagicMock id='139845294567248'>, name=router-name-c37dc21223a94e809851275ce46cb73c, routes=[], status=ACTIVE, tenant_id=project-id-94a0aa4389e24c078e4927890c62f82d>]
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-6829eeb7acd24c7dbf87412190b9546b', 'router-name-eb4cfd0d9d2c4cddbbdb2090cd24ba42', 'project-id-ee9c2defd4184b74b45a0f8176897487')
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-4da630228954458cafece11c5c2ecbed', 'security-group-name-a91cd1b2651d48f59ce379c6e3656ad9', 'security-group-description-236d73cbc41e496896af2708944d79db'),)
expected_data_all_projects = (('security-group-id-4da630228954458cafece11c5c2ecbed', 'security-group-name-a91cd1b2651d48f59ce379c6e3656ad9', 'security-group-description-236d73cbc41e496896af2708944d79db', 'project-id-cbac88a5308c46a6a4a3c688c4dfca9b'),)
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-56d0379473d049e3ab5bd502a08b6d06', 'security-group-name-6cb4d6e0693a4da4851d3d44a00e8e04', 'security-group-description-2f04867c3bc34ad4945f07f53f29884d', 'project-id-1b464d6dfe2d43719af2878a3bb1eddd'),)
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-970119ed42944e3893e8706f08771152', 'icmp', '0.0.0.0/0', 'security-group-id-a9faf3112fad458390eb1a968fe1002e', '', '')
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-bb15ef2c2e484e9b8bc1326063472ff3', None, None, 'project-id-4c3a1cecffe64c7c96928242291502e9', None, 'remote-security-group-id-16671efeb1b549e0a5efa4e760ea6d2a', None, 'security-group-id-3927c9137d19468e96ef8afa739cd978')
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-d51fde7779c14cc2958688c7ba93c0c0', 'subnet-name-a711bb89b77f46ebab9e0b8ed38dffb5', 'network-id-1bd56280b84d4e8e8c3c9752c785371c', '10.10.10.0/24'), ('subnet-id-b2f79fb697e145e4b0afdcdb8ee4a7e7', 'subnet-name-eb14f0c45f7d45cab4ff72514a40381f', 'network-id-4ca7d845cb104b739f0f02dd21f7be59', '10.10.10.0/24'), ('subnet-id-72c882ba3b8c4cc38c63ec40d046e3ea', 'subnet-name-1a41020fe14243758541dc8eedc6f52a', 'network-id-fdb676923c0648449e5319f2f5050413', '10.10.10.0/24')]
data_long = [('subnet-id-d51fde7779c14cc2958688c7ba93c0c0', 'subnet-name-a711bb89b77f46ebab9e0b8ed38dffb5', 'network-id-1bd56280b84d4e8e8c3c9752c785371c', '10.10.10.0/24', 'project-id-ece0e46523fc414f9689bf91c3985e2a', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-b2f79fb697e145e4b0afdcdb8ee4a7e7', 'subnet-name-eb14f0c45f7d45cab4ff72514a40381f', 'network-id-4ca7d845cb104b739f0f02dd21f7be59', '10.10.10.0/24', 'project-id-d32cf7dea5484fa9a48a7427eb7bc412', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-72c882ba3b8c4cc38c63ec40d046e3ea', 'subnet-name-1a41020fe14243758541dc8eedc6f52a', 'network-id-fdb676923c0648449e5319f2f5050413', '10.10.10.0/24', 'project-id-042d91bf40c74733a8187f1e7e578868', 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-72c882ba3b8c4cc38c63ec40d046e3ea, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='139845243647952'>, name=subnet-name-1a41020fe14243758541dc8eedc6f52a, network_id=network-id-fdb676923c0648449e5319f2f5050413, project_id=project-id-042d91bf40c74733a8187f1e7e578868, subnetpool_id=None, tenant_id=project-id-042d91bf40c74733a8187f1e7e578868>
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-fbbc3b22a0bc40a79e87b439d2ec9a2c', '4', 'None', 'None', 'subnet-name-cb3d82e3958143d89146f4b931d25501', 'network-id-b256e764f9d6462eb54c03a0812be077', 'project-id-0f5f7e9390524b3da20f92df8fc59356', '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-760221f227854240bd6930d8143c4c37', 'subnet-pool-name-535970a6d49541cd896ba9c0e02dd8e9', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-72fce3506c444f089511af2eb8bf6599', 'subnet-pool-name-6ff4dbdc34564694884712effd130751', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-7df0dd296c7348fca9462c3783a7455a', 'subnet-pool-name-2f99847b8c8c42ccb8319f4744229c89', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-760221f227854240bd6930d8143c4c37', 'subnet-pool-name-535970a6d49541cd896ba9c0e02dd8e9', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-18de3190b9344e05b7f7f6e824afb0d9'), ('subnet-pool-id-72fce3506c444f089511af2eb8bf6599', 'subnet-pool-name-6ff4dbdc34564694884712effd130751', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-10c65a4cc8dc4094ae95d7dcbff1536e'), ('subnet-pool-id-7df0dd296c7348fca9462c3783a7455a', 'subnet-pool-name-2f99847b8c8c42ccb8319f4744229c89', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-a9bea090a7ef4e089a04d2a033af407a')]
pool = <FakeResource address_scope_id=address-scope-id-a9bea090a7ef4e089a04d2a033af407a, default_prefixlen=8, default_quota=None, id=subnet-pool-id-7df0dd296c7348fca9462c3783a7455a, ip_version=4, is_default=False, keys=<MagicMock id='139845243152592'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-2f99847b8c8c42ccb8319f4744229c89, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-b3af2002d3ed4f16bbf429a45f0c92b7, shared=False, tenant_id=project-id-b3af2002d3ed4f16bbf429a45f0c92b7>
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-4232a4978f9447e4abc9b2de211c00bd', 8, None, 'subnet-pool-id-098670ca4dd34b5da6ebd1f3f2885986', 4, False, 32, 8, 'subnet-pool-name-3d958b9dc164401d9158e9a161f6516c', '10.0.0.0/24, 10.1.0.0/24', 'project-id-eeda16106004400383de62f2df46404e', 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