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-61fb8d8f06524d57b3f60338197f0cbd, instance_id=server-id-066e6e0a77414944bfeceda18294f7d7, 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-1683d7ac7bbc47d09e72d5bbe4f0bcd3, id=floating-ip-id-927c8789311a4d78841e5ba632da28d8, keys=<MagicMock id='208773996'>, port_id=port-id-f5e46d55fe784ad19a683d17fd9ca6bf, project_id=project-id-50fce8852a324f4294d052fea461ffab, router_id=router-id-a6447690f6f342d9992ffaaadaaeb767, status=DOWN, tenant_id=project-id-50fce8852a324f4294d052fea461ffab>
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-5f549c333d4c493ca78dab7e7a365d7a', '1.0.9.0', '2.0.9.0', 'server-id-65ce543d66b24399ba8b4040d4bfe4f8', 'public'), ('floating-ip-id-1c1d3e3ed5a143d5be87011279be89d6', '1.0.9.0', '2.0.9.0', 'server-id-30fc27466a8b4f29b3c37b25b8f7c5e2', 'public'), ('floating-ip-id-a3978adcc31b498288b0f6fba1498cb3', '1.0.9.0', '2.0.9.0', 'server-id-43370746c44e495b8efd1f0df6b71e8d', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-5f549c333d4c493ca78dab7e7a365d7a, instance_id=server-id-65ce543d66b24399ba8b4040d4bfe4f8, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-1c1d3e3ed5a143d5be87011279be89d6, instance_id=server-id-30fc27466a8b4f29b3c37b25b8f7c5e2, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-a3978adcc31b498288b0f6fba1498cb3, instance_id=server-id-43370746c44e495b8efd1f0df6b71e8d, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-a3978adcc31b498288b0f6fba1498cb3, instance_id=server-id-43370746c44e495b8efd1f0df6b71e8d, 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-80e149f16bbe480fbc2d7010db13a839', '1.0.9.0', '2.0.9.0', 'port-id-0eb30e59c2034aee940144bdb8b692f8'), ('floating-ip-id-07f8a736b7c94c80b394086abefa3ad8', '1.0.9.0', '2.0.9.0', 'port-id-1a1d034d419e4e079fa0a40d45289a67'), ('floating-ip-id-2194f7fd2b2b4114aba8cea1f26ad2c6', '1.0.9.0', '2.0.9.0', 'port-id-19d3be9ea43144fe8a130f81b34e3ce4')]
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-7391644c7c374100bbdb81d90d421eb9, id=floating-ip-id-80e149f16bbe480fbc2d7010db13a839, keys=<MagicMock id='206167020'>, port_id=port-id-0eb30e59c2034aee940144bdb8b692f8, project_id=project-id-99038758af3841ceba65408838395950, router_id=router-id-b5ac9f3a8f5d4f77ae87acb17c1b60a1, status=DOWN, tenant_id=project-id-99038758af3841ceba65408838395950>, <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-43da1be20fb6415fa51ce4254c6473ed, id=floating-ip-id-07f8a736b7c94c80b394086abefa3ad8, keys=<MagicMock id='205620044'>, port_id=port-id-1a1d034d419e4e079fa0a40d45289a67, project_id=project-id-2c716da01c7f4e7ea616e40eb5db6b24, router_id=router-id-6ca7c6ad414f47a1a75fa5ffbf41014a, status=DOWN, tenant_id=project-id-2c716da01c7f4e7ea616e40eb5db6b24>, <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-d8df3a5ead82435bb631e5c1a316be12, id=floating-ip-id-2194f7fd2b2b4114aba8cea1f26ad2c6, keys=<MagicMock id='205635564'>, port_id=port-id-19d3be9ea43144fe8a130f81b34e3ce4, project_id=project-id-18040949b0ae4702b6fe6d5ad361c53a, router_id=router-id-7bfe9b21d2ad4d8d99ec4638e9504353, status=DOWN, tenant_id=project-id-18040949b0ae4702b6fe6d5ad361c53a>]
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-d8df3a5ead82435bb631e5c1a316be12, id=floating-ip-id-2194f7fd2b2b4114aba8cea1f26ad2c6, keys=<MagicMock id='205635564'>, port_id=port-id-19d3be9ea43144fe8a130f81b34e3ce4, project_id=project-id-18040949b0ae4702b6fe6d5ad361c53a, router_id=router-id-7bfe9b21d2ad4d8d99ec4638e9504353, status=DOWN, tenant_id=project-id-18040949b0ae4702b6fe6d5ad361c53a>
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-f283b88140c149ddbdc7da64b59697aa', 'server-id-1cf6f10203fb47da9be5ed06d3872fcc', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-f283b88140c149ddbdc7da64b59697aa, instance_id=server-id-1cf6f10203fb47da9be5ed06d3872fcc, 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-f0099a9bbeb142bda06b910e0fa7850c', 'floating-ip-id-e6f1e3a88b504da980b5f8494755a4c6', 'port-id-eb9eec8d685740d7b51f0bd3d280b957', 'project-id-7412294c227c4cae9e5a96e2607a12af', 'router-id-8a14fab1b547437881aa989b4b6d19a6', '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-f0099a9bbeb142bda06b910e0fa7850c, id=floating-ip-id-e6f1e3a88b504da980b5f8494755a4c6, keys=<MagicMock id='205373676'>, port_id=port-id-eb9eec8d685740d7b51f0bd3d280b957, project_id=project-id-7412294c227c4cae9e5a96e2607a12af, router_id=router-id-8a14fab1b547437881aa989b4b6d19a6, status=DOWN, tenant_id=project-id-7412294c227c4cae9e5a96e2607a12af>
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-4abf6b0823f049358d4ba58770937356', False, 'network-label-666e704cb9f44d34a924971c2696c70a', None, False, '255.255.255.0', None, None, 'project-id-bb6caf3c9a7046b8a7642182234f999f', 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-804c75f6db7e4a30bdcc821bd39cdf7f', 'network-name-1a6561217bf34a2180787028b4fc8b23', '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-41b5a769efd74cbc87a454f31d70c44c', 'network-name-b8ea2b2277044c3f8f6b6be9fb512587', '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-aa1305131029437a8bec29f5e930ad72', 'network-name-922d89bc612c4f15b7785a48a57a51da', 'a, b'), ('network-id-54a4457fb2724d61aca720bf1eb228c6', 'network-name-08e7ba4a016d401ca763587d7d58a9b6', 'a, b'), ('network-id-ed61e96f09e442e594a6e656f8af3dc3', 'network-name-80e93c5d6b6846e79e55580b4bf4884b', 'a, b')]
data_long = [('network-id-aa1305131029437a8bec29f5e930ad72', 'network-name-922d89bc612c4f15b7785a48a57a51da', 'ACTIVE', 'project-id-c11c0616c88d4d1ca89a203bfee0b06a', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-54a4457fb2724d61aca720bf1eb228c6', 'network-name-08e7ba4a016d401ca763587d7d58a9b6', 'ACTIVE', 'project-id-59c99e1440004530bf334f2cd550b019', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-ed61e96f09e442e594a6e656f8af3dc3', 'network-name-80e93c5d6b6846e79e55580b4bf4884b', 'ACTIVE', 'project-id-6e30c41533b44d8faa5048182a01e889', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-ed61e96f09e442e594a6e656f8af3dc3, keys=<MagicMock id='183663532'>, name=network-name-80e93c5d6b6846e79e55580b4bf4884b, project_id=project-id-6e30c41533b44d8faa5048182a01e889, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-6e30c41533b44d8faa5048182a01e889>
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-ea86627779d54e109fd988e52f719db0', 'network-label-09ff3c41d35a479eb39ab596f2797d08', '10.0.0.0/24'), ('network-id-a9e4138067034ef2ad409e5aa7e64fd1', 'network-label-fcae484dd26f490a8376f6f366e7239d', '10.0.0.0/24'), ('network-id-1972594d48d3470fb13e7f5110af431d', 'network-label-6019ba296cde442780831ed29dd31f12', '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-1972594d48d3470fb13e7f5110af431d, injected=False, keys=<MagicMock id='192277356'>, label=network-label-6019ba296cde442780831ed29dd31f12, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-49b4c976db0a47398c476ac8e7f7c885, 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-89b0b9370ae944d38adae5b834a6510e', 'network-name-76635b94e02f4f20a5a761f41907f92e', 'project-id-9c163168ea82426aa708b7ca2d5649a2', '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-627787c4bb214fe6afc6c8d621a23d9f', False, 'network-label-599609bc23964f75900da7d5524ec1b4', None, False, '255.255.255.0', None, None, 'project-id-7794930556bd4ee59dad4458f2cfb1d2', 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-63c5a87b5b6e47bb86ec496a8fd1d7f6', '', '', 'ovs', 'normal', 'device-id-d025730625e3432c9d87eff9613b3917', 'compute:nova', '', 'dns-name-d25cd7f0372f4dfcb6dcf0a988369059', '', '', 'port-id-bb91712912da4566af37518b4f9f16f0', 'fa:16:3e:a9:4e:72', 'port-name-6f3dda4f4f7d418982490b36674ac921', 'network-id-97a0681026be4902b269689e7f554f60', True, 'project-id-73eee3d85539402c81f016d2fdf301c3', '', '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-9b38dfe768f54e47b1b62a9dda48b4ce', 'router-name-f2bec1b2890c44cfacbd00ad9b18cf5a', 'project-id-d3cf20d2f3344f9a969f422365465315')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-9b38dfe768f54e47b1b62a9dda48b4ce, keys=<MagicMock id='201911500'>, name=router-name-f2bec1b2890c44cfacbd00ad9b18cf5a, routes=[], status=ACTIVE, tenant_id=project-id-d3cf20d2f3344f9a969f422365465315>
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-729a8c832776478f80eae426b2c0e23f', 'router-name-ca592d32665b464297233a99606700f0', 'ACTIVE', 'UP', False, False, 'project-id-220b7a3cf2ac45368a7bafdb8fb58b51'), ('router-id-f5a50ec9671c4d36ab03dde1e898d7bd', 'router-name-65ba90756525494a895a86e50fdf8c55', 'ACTIVE', 'UP', False, False, 'project-id-f886ad78ed4949e3a3e1a5449cc0f781'), ('router-id-e8dd524984264dddb97056324fb08868', 'router-name-a9b852e8960840ec97ecb91f0f8b79c9', 'ACTIVE', 'UP', False, False, 'project-id-b4bb266d36d6422fa6b6889b401d2712')]
data_long = [('router-id-729a8c832776478f80eae426b2c0e23f', 'router-name-ca592d32665b464297233a99606700f0', 'ACTIVE', 'UP', False, False, 'project-id-220b7a3cf2ac45368a7bafdb8fb58b51', [], '{}', ''), ('router-id-f5a50ec9671c4d36ab03dde1e898d7bd', 'router-name-65ba90756525494a895a86e50fdf8c55', 'ACTIVE', 'UP', False, False, 'project-id-f886ad78ed4949e3a3e1a5449cc0f781', [], '{}', ''), ('router-id-e8dd524984264dddb97056324fb08868', 'router-name-a9b852e8960840ec97ecb91f0f8b79c9', 'ACTIVE', 'UP', False, False, 'project-id-b4bb266d36d6422fa6b6889b401d2712', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-e8dd524984264dddb97056324fb08868, keys=<MagicMock id='161436332'>, name=router-name-a9b852e8960840ec97ecb91f0f8b79c9, routes=[], status=ACTIVE, tenant_id=project-id-b4bb266d36d6422fa6b6889b401d2712>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-729a8c832776478f80eae426b2c0e23f, keys=<MagicMock id='201129324'>, name=router-name-ca592d32665b464297233a99606700f0, routes=[], status=ACTIVE, tenant_id=project-id-220b7a3cf2ac45368a7bafdb8fb58b51>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-f5a50ec9671c4d36ab03dde1e898d7bd, keys=<MagicMock id='204811212'>, name=router-name-65ba90756525494a895a86e50fdf8c55, routes=[], status=ACTIVE, tenant_id=project-id-f886ad78ed4949e3a3e1a5449cc0f781>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-e8dd524984264dddb97056324fb08868, keys=<MagicMock id='161436332'>, name=router-name-a9b852e8960840ec97ecb91f0f8b79c9, routes=[], status=ACTIVE, tenant_id=project-id-b4bb266d36d6422fa6b6889b401d2712>]
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-e92b1dc377814cf1999e03c37e675390', 'router-name-2ecdce0e53cd4dfa88d2784b8d2bc426', 'project-id-aa1ba59d0193445fa3d41f3bcb014532')
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-3202cf06de7849a8a7d4a23af58ccb5b', 'security-group-name-a74dd3d9046240a3a55f0bb27d0239a1', 'security-group-description-d20f2ab244754f2b9ce1015e0e6ba3dc'),)
expected_data_all_projects = (('security-group-id-3202cf06de7849a8a7d4a23af58ccb5b', 'security-group-name-a74dd3d9046240a3a55f0bb27d0239a1', 'security-group-description-d20f2ab244754f2b9ce1015e0e6ba3dc', 'project-id-94c6302748c54989ae057e2837211150'),)
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-bcebdb4743ac45599fdc015fef3696c9', 'security-group-name-af922c2db126488288221f289d97db82', 'security-group-description-e71794c42d26411fba9bf004cee534be', 'project-id-a89996560b9b4dd9b361d4346874aec3'),)
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-9c179a55722344798e18c4d62e59ba90', 'icmp', '0.0.0.0/0', 'security-group-id-e7469126eaa74746996a839f4997ded2', '', '')
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-2efce0cb640e43d896691aa7d236e217', None, None, 'project-id-3878228bd5794579a7a4073e5580adef', None, 'remote-security-group-id-022f55098ea845a5b170c9bb2df1290f', None, 'security-group-id-4e4d990d14b24483abaf7be135899199')
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-13a98b69711d439c81966d6aa504d1a1', 'subnet-name-5f90582e6a3149d68e9ccce8479c8341', 'network-id-89bff1dd17944d5c997c97b950a1942f', '10.10.10.0/24'), ('subnet-id-fff8c06d387f4a4392c2a8109f5ab721', 'subnet-name-2c24ab7a562b42528fc5bdd9d00d327d', 'network-id-317f8a9a58cd4edb83f658de007fdec1', '10.10.10.0/24'), ('subnet-id-11012cf71a684f52b04ac3c76f8e1814', 'subnet-name-f5d2243713ec4ed583adb775e5e73808', 'network-id-1ef9bbc82b6342e4beccf4d6dde77b96', '10.10.10.0/24')]
data_long = [('subnet-id-13a98b69711d439c81966d6aa504d1a1', 'subnet-name-5f90582e6a3149d68e9ccce8479c8341', 'network-id-89bff1dd17944d5c997c97b950a1942f', '10.10.10.0/24', 'project-id-eff513fd19804408972b61b6274f3f1a', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-fff8c06d387f4a4392c2a8109f5ab721', 'subnet-name-2c24ab7a562b42528fc5bdd9d00d327d', 'network-id-317f8a9a58cd4edb83f658de007fdec1', '10.10.10.0/24', 'project-id-80ac425d64e04e1a8b78993c26ac834c', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-11012cf71a684f52b04ac3c76f8e1814', 'subnet-name-f5d2243713ec4ed583adb775e5e73808', 'network-id-1ef9bbc82b6342e4beccf4d6dde77b96', '10.10.10.0/24', 'project-id-84a0087fbdeb4bd7835ebf1ca69aac59', 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-11012cf71a684f52b04ac3c76f8e1814, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='213678828'>, name=subnet-name-f5d2243713ec4ed583adb775e5e73808, network_id=network-id-1ef9bbc82b6342e4beccf4d6dde77b96, project_id=project-id-84a0087fbdeb4bd7835ebf1ca69aac59, subnetpool_id=None, tenant_id=project-id-84a0087fbdeb4bd7835ebf1ca69aac59>
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-93b2c831638a4a70968263e06623cbe0', '4', 'None', 'None', 'subnet-name-ea5f8531f31948ee81b043e2b4736dd0', 'network-id-7fb7e0ba9a134f85ba279cf7f738f400', 'project-id-6c5a655ed2d84b3e8dab940cf3bf1b5b', '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-a17144436ec040e6961d9f1f89e81cf9', 'subnet-pool-name-e5de4140692347b693ff93597b35d67e', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-087e74fb8beb4ac18f60ab7080e59076', 'subnet-pool-name-544b4275893a465c9b50952f9c4da38f', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-976900f2cb3241608f58f132101d80e6', 'subnet-pool-name-bcf2cbd18cfa40d4bba45ca5cfd6d138', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-a17144436ec040e6961d9f1f89e81cf9', 'subnet-pool-name-e5de4140692347b693ff93597b35d67e', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-12ffdcfd86e04c47bb810904257e22cb'), ('subnet-pool-id-087e74fb8beb4ac18f60ab7080e59076', 'subnet-pool-name-544b4275893a465c9b50952f9c4da38f', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-528291adb39d407d97eb8973883362c0'), ('subnet-pool-id-976900f2cb3241608f58f132101d80e6', 'subnet-pool-name-bcf2cbd18cfa40d4bba45ca5cfd6d138', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-66db77e027544cddac057b5698249d1a')]
pool = <FakeResource address_scope_id=address-scope-id-66db77e027544cddac057b5698249d1a, default_prefixlen=8, default_quota=None, id=subnet-pool-id-976900f2cb3241608f58f132101d80e6, ip_version=4, is_default=False, keys=<MagicMock id='213659724'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-bcf2cbd18cfa40d4bba45ca5cfd6d138, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-525e127726ac47faa2bbf81c6554eabf, shared=False, tenant_id=project-id-525e127726ac47faa2bbf81c6554eabf>
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-59649a77a3d6457fb1e5595b38cbe641', 8, None, 'subnet-pool-id-b671d18e00f845f7b154f4fd3d04d110', 4, False, 32, 8, 'subnet-pool-name-bb54057156bf4432b0f797718b3e07ed', '10.0.0.0/24, 10.1.0.0/24', 'project-id-0849c2c8ff00440db3a7649c8e6f4869', 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