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-fa98e5a862414dd49d7c4caa775b97b2, instance_id=server-id-4653dda8c9864b4c88c87699e7744459, 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-4b0c1d4149ee435183bad824af56c3ed, id=floating-ip-id-4e0fac54d478458aba5a0a26a4891da6, keys=<MagicMock id='79274704'>, port_id=port-id-cf13627054814ccf89fb4af6f89f1d5a, project_id=project-id-8c5dd5562ad24eb0a1425f4b4f43a2c6, router_id=router-id-232a1074aff043bc997b207c0833ef8e, status=DOWN, tenant_id=project-id-8c5dd5562ad24eb0a1425f4b4f43a2c6>
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-b4210614e0fd43b3addd15b9fc5efbca', '1.0.9.0', '2.0.9.0', 'server-id-fa1efef249194a8ba350feaceba3f683', 'public'), ('floating-ip-id-f66ffaaddabf462cb3dfee90f9916dc1', '1.0.9.0', '2.0.9.0', 'server-id-35978121a77741dc9ac25cc4fa856d9a', 'public'), ('floating-ip-id-ecf547234f5b43d3ae43b1f28a86a8df', '1.0.9.0', '2.0.9.0', 'server-id-9de1b39aecae4692a8df02fd4f56a2fb', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-b4210614e0fd43b3addd15b9fc5efbca, instance_id=server-id-fa1efef249194a8ba350feaceba3f683, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-f66ffaaddabf462cb3dfee90f9916dc1, instance_id=server-id-35978121a77741dc9ac25cc4fa856d9a, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-ecf547234f5b43d3ae43b1f28a86a8df, instance_id=server-id-9de1b39aecae4692a8df02fd4f56a2fb, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-ecf547234f5b43d3ae43b1f28a86a8df, instance_id=server-id-9de1b39aecae4692a8df02fd4f56a2fb, 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-cc7aa2ac28754e02b2e535722840c41a', '1.0.9.0', '2.0.9.0', 'port-id-7b43c3cc57ee4ec88308fe2c5c2ee035'), ('floating-ip-id-a9c3668c3d954ae5a8aa08ad0f917a9e', '1.0.9.0', '2.0.9.0', 'port-id-950115078f354a1fa96937566047dd94'), ('floating-ip-id-44ddbca270034e7fa423797210f3274f', '1.0.9.0', '2.0.9.0', 'port-id-471a25141f46473da3e2f8a8e050a268')]
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-8dcc6088752748379102e1dd385f91d7, id=floating-ip-id-cc7aa2ac28754e02b2e535722840c41a, keys=<MagicMock id='49984336'>, port_id=port-id-7b43c3cc57ee4ec88308fe2c5c2ee035, project_id=project-id-b3dcb112b2784c44ad258234ed1e2968, router_id=router-id-4ff0d74827b34d7290461262a5b66ebc, status=DOWN, tenant_id=project-id-b3dcb112b2784c44ad258234ed1e2968>, <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-bf076c51c76c4800b46c64fd73146cd4, id=floating-ip-id-a9c3668c3d954ae5a8aa08ad0f917a9e, keys=<MagicMock id='126064976'>, port_id=port-id-950115078f354a1fa96937566047dd94, project_id=project-id-e2be9f3713054f54b2b8eec4a796c898, router_id=router-id-c95b099fce4c49d19a4b1cb33673f70f, status=DOWN, tenant_id=project-id-e2be9f3713054f54b2b8eec4a796c898>, <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-ea6f5852088c42c68324e59717216466, id=floating-ip-id-44ddbca270034e7fa423797210f3274f, keys=<MagicMock id='91587856'>, port_id=port-id-471a25141f46473da3e2f8a8e050a268, project_id=project-id-1b5eaf763d5d4bbf8a40698d1382bbbe, router_id=router-id-3b0d6e7e022a442dbfc26ee6c6bc7760, status=DOWN, tenant_id=project-id-1b5eaf763d5d4bbf8a40698d1382bbbe>]
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-ea6f5852088c42c68324e59717216466, id=floating-ip-id-44ddbca270034e7fa423797210f3274f, keys=<MagicMock id='91587856'>, port_id=port-id-471a25141f46473da3e2f8a8e050a268, project_id=project-id-1b5eaf763d5d4bbf8a40698d1382bbbe, router_id=router-id-3b0d6e7e022a442dbfc26ee6c6bc7760, status=DOWN, tenant_id=project-id-1b5eaf763d5d4bbf8a40698d1382bbbe>
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-14dc7fad801a4783a2690119a267108a', 'server-id-8a600a60fed9427a986672793a96e4a0', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-14dc7fad801a4783a2690119a267108a, instance_id=server-id-8a600a60fed9427a986672793a96e4a0, 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-e8e5a4d667784fb9901d810652ac279c', 'floating-ip-id-43980baf23fa442faf78405f42b8be0a', 'port-id-5a2adef9675b45e2ab27ed338320e3d7', 'project-id-e8e442706e3a4f498567d19f153e5562', 'router-id-b3f9d33e28564f67bddb8cd6c2443780', '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-e8e5a4d667784fb9901d810652ac279c, id=floating-ip-id-43980baf23fa442faf78405f42b8be0a, keys=<MagicMock id='117535440'>, port_id=port-id-5a2adef9675b45e2ab27ed338320e3d7, project_id=project-id-e8e442706e3a4f498567d19f153e5562, router_id=router-id-b3f9d33e28564f67bddb8cd6c2443780, status=DOWN, tenant_id=project-id-e8e442706e3a4f498567d19f153e5562>
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-d19b932bbec84cda90d833dc5589b253', False, 'network-label-a53ca7d49a6847d885b0cdd897f8ecc6', None, False, '255.255.255.0', None, None, 'project-id-8d8dd53a3ffa440ba4277fa0963fba87', 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-a16331e082a3454d8e81d88465a0236a', 'network-name-7eab58ba25dc400ab6a5c98a2a6fc85b', '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-1c11f0743d24438492b9afa848d7d1bc', 'network-name-56023035109f4a04a7c2a3948fab3de6', '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-23c6f3f9683842909f99e62324e3a18e', 'network-name-6dacacead2034066a14a849a2cee2725', 'a, b'), ('network-id-56f02477af0745129099c55b690fda78', 'network-name-5a81bfdcba734243af0beef2d124282a', 'a, b'), ('network-id-eb1d1defca764bce8502287714472e8a', 'network-name-129b4812adf643bfbeb05f083d5d2b35', 'a, b')]
data_long = [('network-id-23c6f3f9683842909f99e62324e3a18e', 'network-name-6dacacead2034066a14a849a2cee2725', 'ACTIVE', 'project-id-65fb6e8832914c1686e8df11349cc863', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-56f02477af0745129099c55b690fda78', 'network-name-5a81bfdcba734243af0beef2d124282a', 'ACTIVE', 'project-id-d992ccc8177b4b6196d141c14187296b', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-eb1d1defca764bce8502287714472e8a', 'network-name-129b4812adf643bfbeb05f083d5d2b35', 'ACTIVE', 'project-id-b2eff4fe206b4937bf47a8f83c4d04ec', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-eb1d1defca764bce8502287714472e8a, keys=<MagicMock id='50043088'>, name=network-name-129b4812adf643bfbeb05f083d5d2b35, project_id=project-id-b2eff4fe206b4937bf47a8f83c4d04ec, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-b2eff4fe206b4937bf47a8f83c4d04ec>
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-5d3c4af115674855bf9c2776afdf81e7', 'network-label-b6c1a3e6db3f46e18e904f672641483c', '10.0.0.0/24'), ('network-id-b36da0a560a64e15badd91b9bc58c6cf', 'network-label-06823c89a2494a2288f309b37d93af13', '10.0.0.0/24'), ('network-id-0b37314f750c4827a714f345eedeac4e', 'network-label-f93ec88c67ca4dd68e27fc9996606ceb', '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-0b37314f750c4827a714f345eedeac4e, injected=False, keys=<MagicMock id='135093712'>, label=network-label-f93ec88c67ca4dd68e27fc9996606ceb, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-e0b9c86009f644cbb581abbf0f700da6, 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-f4bad7989c964df4a112e769c31cec3e', 'network-name-d18da452795f4a57aa5d2b93edb97213', 'project-id-6b986be4e6224cea8bf7f727994270cd', '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-64dbfc4dfaa347ffbceb7c635fd667d6', False, 'network-label-d2edec42fdf14134b5eaf09d7dae7e94', None, False, '255.255.255.0', None, None, 'project-id-4cd730d974a745aa9fcacdfd0bd7f3b3', 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-2142d8f39c4242f299b2625ace44c9ad', '', '', 'ovs', 'normal', 'device-id-0d9a52c512a34074a7c73f0a129a9abe', 'compute:nova', '', 'dns-name-eb2ae7814b19422cbca625fd633a5231', '', '', 'port-id-240e6a3deb944091959e4098c46eef08', 'fa:16:3e:a9:4e:72', 'port-name-1e57131623d64695919b5f2b470e6712', 'network-id-3128763620fe4a1fa4bce451773672da', True, 'project-id-829478c0b6ed440a8a0b7c3258602d59', '', '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-9e9797d4b90a46ae8dfc8437c496a126', 'router-name-9118f4cabb1e44c68814e0e61e5a25a1', 'project-id-e93a9c372d9e4e0ab464e5a63cbe6e47')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-9e9797d4b90a46ae8dfc8437c496a126, keys=<MagicMock id='158115728'>, name=router-name-9118f4cabb1e44c68814e0e61e5a25a1, routes=[], status=ACTIVE, tenant_id=project-id-e93a9c372d9e4e0ab464e5a63cbe6e47>
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-19a59a772c98409a9dcc1fffd8f869af', 'router-name-7b0037aeabda433880bded3bf83e0ad6', 'ACTIVE', 'UP', False, False, 'project-id-6058b44f5f384c3e993548f45f2eee0a'), ('router-id-7740a73d808649bd81322a20af49c67a', 'router-name-6da69b371ea440c991be317595c94648', 'ACTIVE', 'UP', False, False, 'project-id-6397e37fb1ba4a049b6180b55095ed1b'), ('router-id-885af7f694564cc289e1e97737afcf78', 'router-name-126546ab72e9417a9f264e2751629f14', 'ACTIVE', 'UP', False, False, 'project-id-43aea780ffd74af2bbe913ff9d5b3cc6')]
data_long = [('router-id-19a59a772c98409a9dcc1fffd8f869af', 'router-name-7b0037aeabda433880bded3bf83e0ad6', 'ACTIVE', 'UP', False, False, 'project-id-6058b44f5f384c3e993548f45f2eee0a', [], '{}', ''), ('router-id-7740a73d808649bd81322a20af49c67a', 'router-name-6da69b371ea440c991be317595c94648', 'ACTIVE', 'UP', False, False, 'project-id-6397e37fb1ba4a049b6180b55095ed1b', [], '{}', ''), ('router-id-885af7f694564cc289e1e97737afcf78', 'router-name-126546ab72e9417a9f264e2751629f14', 'ACTIVE', 'UP', False, False, 'project-id-43aea780ffd74af2bbe913ff9d5b3cc6', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-885af7f694564cc289e1e97737afcf78, keys=<MagicMock id='157153424'>, name=router-name-126546ab72e9417a9f264e2751629f14, routes=[], status=ACTIVE, tenant_id=project-id-43aea780ffd74af2bbe913ff9d5b3cc6>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-19a59a772c98409a9dcc1fffd8f869af, keys=<MagicMock id='157147280'>, name=router-name-7b0037aeabda433880bded3bf83e0ad6, routes=[], status=ACTIVE, tenant_id=project-id-6058b44f5f384c3e993548f45f2eee0a>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-7740a73d808649bd81322a20af49c67a, keys=<MagicMock id='157144208'>, name=router-name-6da69b371ea440c991be317595c94648, routes=[], status=ACTIVE, tenant_id=project-id-6397e37fb1ba4a049b6180b55095ed1b>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-885af7f694564cc289e1e97737afcf78, keys=<MagicMock id='157153424'>, name=router-name-126546ab72e9417a9f264e2751629f14, routes=[], status=ACTIVE, tenant_id=project-id-43aea780ffd74af2bbe913ff9d5b3cc6>]
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-b79e6904cf7e416e9f3d76b8dfce3ed5', 'router-name-9bf199d1959046e2951dfccc933f71e4', 'project-id-59442012cdd844c5bfb9a6705a4bd56a')
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-f9727a80d3d941c39f7b040dcc59061a', 'security-group-name-09a75afa1e714317a8c3e6e415621612', 'security-group-description-316bfc9aaf1c446594b71b42a248de09'),)
expected_data_all_projects = (('security-group-id-f9727a80d3d941c39f7b040dcc59061a', 'security-group-name-09a75afa1e714317a8c3e6e415621612', 'security-group-description-316bfc9aaf1c446594b71b42a248de09', 'project-id-08669616fac34e9b86effad0b1100768'),)
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-58a732d9c39241ed94bed7486a167515', 'security-group-name-df98abc64656430591dbd1048ea69126', 'security-group-description-cf9ce6a3b5d942c6a4cadc0ab3de1747', 'project-id-349f7417ee4842c594cfb2400acf040f'),)
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-d9fe3b4d61cc48f891d14a16c0cf41da', 'icmp', '0.0.0.0/0', 'security-group-id-7b0caebb6410430b8497120bffd3f670', '', '')
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-8b29e5b0f45e491a818142f112e5dc1f', None, None, 'project-id-828d09cfa34945d5a241a8fb3e566285', None, 'remote-security-group-id-f64df4f74599471193044bd1de69bfdc', None, 'security-group-id-d88ea6756fc4434a8e98f7ab1cd5dde5')
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-4c3bd756705c4af78eaf1d42237ab35e', 'subnet-name-7ccdca6c9fe0473f9b3491ad06b1664a', 'network-id-b04a4896b4f749bda99b3938d0bde8fc', '10.10.10.0/24'), ('subnet-id-a17b643be10d4f2ca153a45911ad551e', 'subnet-name-a400c953fd754e2192b82d2c119718d0', 'network-id-531c7102118f4e6cbe7b0368968dba02', '10.10.10.0/24'), ('subnet-id-13875f313e4c4da2839054b0fe933b38', 'subnet-name-b3844e773f894cf28666cadc753bb923', 'network-id-3371290c4a9849919348a163888cba9e', '10.10.10.0/24')]
data_long = [('subnet-id-4c3bd756705c4af78eaf1d42237ab35e', 'subnet-name-7ccdca6c9fe0473f9b3491ad06b1664a', 'network-id-b04a4896b4f749bda99b3938d0bde8fc', '10.10.10.0/24', 'project-id-cd0f94fb28414c3b9d95b919e616e050', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-a17b643be10d4f2ca153a45911ad551e', 'subnet-name-a400c953fd754e2192b82d2c119718d0', 'network-id-531c7102118f4e6cbe7b0368968dba02', '10.10.10.0/24', 'project-id-0226dc8fbc714f0db57959881612bf57', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-13875f313e4c4da2839054b0fe933b38', 'subnet-name-b3844e773f894cf28666cadc753bb923', 'network-id-3371290c4a9849919348a163888cba9e', '10.10.10.0/24', 'project-id-3f26a6e77abf4869b40b82fddc347151', 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-13875f313e4c4da2839054b0fe933b38, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='126812112'>, name=subnet-name-b3844e773f894cf28666cadc753bb923, network_id=network-id-3371290c4a9849919348a163888cba9e, project_id=project-id-3f26a6e77abf4869b40b82fddc347151, subnetpool_id=None, tenant_id=project-id-3f26a6e77abf4869b40b82fddc347151>
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-ab6f2f1b51f1438690609d9f4b3efa73', '4', 'None', 'None', 'subnet-name-61a220c586e4439c86bb33e3b56f014f', 'network-id-550ef65e07494157b92232e1181f91e4', 'project-id-bc184b22fbc84c4492a3466b97aff508', '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-b6df6eeed30c4b9098b44e043497b9cf', 'subnet-pool-name-00aa6aa9879849a08dee0e7daf6c6cb7', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-51196d20dc994f2d9e6dd3e6b4dd2f45', 'subnet-pool-name-377351a7905e42259788d49ab16e9461', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-331506ac045c4c74ab72c449127716c7', 'subnet-pool-name-cf8475697f524539a99adc324e077d19', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-b6df6eeed30c4b9098b44e043497b9cf', 'subnet-pool-name-00aa6aa9879849a08dee0e7daf6c6cb7', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-1c6d1388012240ca93c776a0883e489b'), ('subnet-pool-id-51196d20dc994f2d9e6dd3e6b4dd2f45', 'subnet-pool-name-377351a7905e42259788d49ab16e9461', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-afe4a388502a40d484c59e82f70d1ccf'), ('subnet-pool-id-331506ac045c4c74ab72c449127716c7', 'subnet-pool-name-cf8475697f524539a99adc324e077d19', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-05a2b6a8cd74481d8f58d33320f96cec')]
pool = <FakeResource address_scope_id=address-scope-id-05a2b6a8cd74481d8f58d33320f96cec, default_prefixlen=8, default_quota=None, id=subnet-pool-id-331506ac045c4c74ab72c449127716c7, ip_version=4, is_default=False, keys=<MagicMock id='40151888'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-cf8475697f524539a99adc324e077d19, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-2e49e8d5e7a8432885176f82d8bec648, shared=False, tenant_id=project-id-2e49e8d5e7a8432885176f82d8bec648>
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-1bcf2c04a3f84dcd9a44b0d8492ef6d8', 8, None, 'subnet-pool-id-ed40034eca16471297fdece797e31410', 4, False, 32, 8, 'subnet-pool-name-4bf28e75787f44ca840794b0f4f5fea3', '10.0.0.0/24, 10.1.0.0/24', 'project-id-4a6cf9c88440437bbd6f039d76c77b40', 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