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-dd5f8321043447f498fb02474b954e20, instance_id=server-id-bd718afc0e4440829c3628b5fa5beb4a, 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-138afc17004d4ecca54417c33763fbd2, id=floating-ip-id-871bfec3fb8445a9920a909459139a3b, keys=<MagicMock id='105313232'>, port_id=port-id-def4bcd4b1b2460aa09d5eddced528a2, project_id=project-id-dad62f6a1767482f8852f45393514e96, router_id=router-id-fc075bca8e4049209828851004542330, status=DOWN, tenant_id=project-id-dad62f6a1767482f8852f45393514e96>
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-9c88b2186acc4cc7a9e84cc8f0924154', '1.0.9.0', '2.0.9.0', 'server-id-87279a84756d4f81b2fb0d8f0355b95a', 'public'), ('floating-ip-id-61514a7e0a1446cbad65a965f249a2f4', '1.0.9.0', '2.0.9.0', 'server-id-c822077e39854f8a938afd77ef2257b4', 'public'), ('floating-ip-id-fbea7ad5d323425b8c8eb8096312b89f', '1.0.9.0', '2.0.9.0', 'server-id-adab3f456b634d1b9b94387e0b135e08', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-9c88b2186acc4cc7a9e84cc8f0924154, instance_id=server-id-87279a84756d4f81b2fb0d8f0355b95a, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-61514a7e0a1446cbad65a965f249a2f4, instance_id=server-id-c822077e39854f8a938afd77ef2257b4, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-fbea7ad5d323425b8c8eb8096312b89f, instance_id=server-id-adab3f456b634d1b9b94387e0b135e08, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-fbea7ad5d323425b8c8eb8096312b89f, instance_id=server-id-adab3f456b634d1b9b94387e0b135e08, 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-76dbc0b04d5d40b4871aa16f91e30430', '1.0.9.0', '2.0.9.0', 'port-id-76a42ca912734d93ab26d817c9255e35'), ('floating-ip-id-927583ac07a84698a5bc0a44f4eaa5f3', '1.0.9.0', '2.0.9.0', 'port-id-e26f2e59459d4d9ca6aa27730f98be00'), ('floating-ip-id-0a946a9b02094664b3e8baf44dd7878d', '1.0.9.0', '2.0.9.0', 'port-id-dcaf9bfb9b54443e8f4f24828a3297a9')]
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-7e5c1fb81b914864b5bbbd695cf697d2, id=floating-ip-id-76dbc0b04d5d40b4871aa16f91e30430, keys=<MagicMock id='133146448'>, port_id=port-id-76a42ca912734d93ab26d817c9255e35, project_id=project-id-09977d22f69d4a3aa8967b971d8048e4, router_id=router-id-b55cd9340eba45c7bb0d08f2612b4023, status=DOWN, tenant_id=project-id-09977d22f69d4a3aa8967b971d8048e4>, <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-33f79ca870ce432c996305267a381f39, id=floating-ip-id-927583ac07a84698a5bc0a44f4eaa5f3, keys=<MagicMock id='141142416'>, port_id=port-id-e26f2e59459d4d9ca6aa27730f98be00, project_id=project-id-eb27148c101d4435958582f50c76e008, router_id=router-id-68182fb016fc49e889672198959541c9, status=DOWN, tenant_id=project-id-eb27148c101d4435958582f50c76e008>, <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-5b355ddd32e9486eabbdff3c99728f20, id=floating-ip-id-0a946a9b02094664b3e8baf44dd7878d, keys=<MagicMock id='57549968'>, port_id=port-id-dcaf9bfb9b54443e8f4f24828a3297a9, project_id=project-id-ccc36dfc06a34818a5013e2c21a1e5c4, router_id=router-id-a4a93d4436c24d4bb5c24e1fb69b9cd2, status=DOWN, tenant_id=project-id-ccc36dfc06a34818a5013e2c21a1e5c4>]
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-5b355ddd32e9486eabbdff3c99728f20, id=floating-ip-id-0a946a9b02094664b3e8baf44dd7878d, keys=<MagicMock id='57549968'>, port_id=port-id-dcaf9bfb9b54443e8f4f24828a3297a9, project_id=project-id-ccc36dfc06a34818a5013e2c21a1e5c4, router_id=router-id-a4a93d4436c24d4bb5c24e1fb69b9cd2, status=DOWN, tenant_id=project-id-ccc36dfc06a34818a5013e2c21a1e5c4>
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-cbd13b6398e244299c301986454a13fa', 'server-id-c3f3188acab84232900211de2f0e3778', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-cbd13b6398e244299c301986454a13fa, instance_id=server-id-c3f3188acab84232900211de2f0e3778, 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-1621142bedaa448baece851bfabe76bf', 'floating-ip-id-e2611fff12af4434a50c2d8f034888bf', 'port-id-e4ba4a3864194ccc8eb1eb8e06421668', 'project-id-bc2cd1dfd2794bbe989307495b9505c4', 'router-id-a6815f3fdb244d2e86a2b67d7cd02a13', '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-1621142bedaa448baece851bfabe76bf, id=floating-ip-id-e2611fff12af4434a50c2d8f034888bf, keys=<MagicMock id='142755344'>, port_id=port-id-e4ba4a3864194ccc8eb1eb8e06421668, project_id=project-id-bc2cd1dfd2794bbe989307495b9505c4, router_id=router-id-a6815f3fdb244d2e86a2b67d7cd02a13, status=DOWN, tenant_id=project-id-bc2cd1dfd2794bbe989307495b9505c4>
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-d248ba4049874a8e8f435356a2701b3d', False, 'network-label-61b735b7647a477eb3383b87a58cfd32', None, False, '255.255.255.0', None, None, 'project-id-1068ed2f553847fb92444d4b2d0d0570', 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-4b597108773b4c1d86870951b6772e83', 'network-name-4cb4df93b53a46a18c671d1df769dda0', '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-17c5da37e90045fab6c0420ecdd2d4f5', 'network-name-158e119a56644a0fb1d75b255660a5b8', '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-e77c9f573289443ca2ea2601342fecd9', 'network-name-5c95dd64d1954f859a1216daeca0ecd4', 'a, b'), ('network-id-5b133aab25de4dd49b2a494197cb247d', 'network-name-7e28891c4e8e48c5b70b7c43d4cb07b1', 'a, b'), ('network-id-38290272bd71437480834d51f1e999df', 'network-name-add7ea8339434f4d96efdc65644add85', 'a, b')]
data_long = [('network-id-e77c9f573289443ca2ea2601342fecd9', 'network-name-5c95dd64d1954f859a1216daeca0ecd4', 'ACTIVE', 'project-id-3a70393946fb4a869b74aca26a08ec5d', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-5b133aab25de4dd49b2a494197cb247d', 'network-name-7e28891c4e8e48c5b70b7c43d4cb07b1', 'ACTIVE', 'project-id-7d70704463e9467b833fb8ab51233891', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-38290272bd71437480834d51f1e999df', 'network-name-add7ea8339434f4d96efdc65644add85', 'ACTIVE', 'project-id-e5206cb8f0d6469086e5c90929d75337', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-38290272bd71437480834d51f1e999df, keys=<MagicMock id='124423952'>, name=network-name-add7ea8339434f4d96efdc65644add85, project_id=project-id-e5206cb8f0d6469086e5c90929d75337, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-e5206cb8f0d6469086e5c90929d75337>
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-a8b15b9bbff64b86a283349236dfce8a', 'network-label-88f47e03396e4faba4cd220d0e8f9192', '10.0.0.0/24'), ('network-id-fadbfbe052884719ae8dace6f17e8621', 'network-label-609ac470232644499553afe618bc022e', '10.0.0.0/24'), ('network-id-83ad8abc88b5474cb4cfbdafda15c918', 'network-label-1e2924412ab9495faa5b7dc3c3065015', '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-83ad8abc88b5474cb4cfbdafda15c918, injected=False, keys=<MagicMock id='128881872'>, label=network-label-1e2924412ab9495faa5b7dc3c3065015, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-fcec93422937481f9453ddcc71669442, 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-2d4e05f72f7b44d4af583fe0888a9e62', 'network-name-5dcea382e51c448c837ce4fcd8818cda', 'project-id-bc503b68b1c74d9e8db98871902595c6', '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-882f401d9a8f426bba4a487fb841956e', False, 'network-label-368cfb4facd045d0a1277cb1c84a76a9', None, False, '255.255.255.0', None, None, 'project-id-84e840a50b5a4ffd887649c5a05d50c2', 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-2f9d79b5e4eb469eb9d209bd36095be4', '', '', 'ovs', 'normal', 'device-id-3ca42aeb978b489bbc0f25fbbfae5815', 'compute:nova', '', 'dns-name-24f6b00719e448199d9b057e3eb23cb4', '', '', 'port-id-dbe8a86b1f1742b59bd41a964cdd7382', 'fa:16:3e:a9:4e:72', 'port-name-b5a84a10f3784e1c8e5ae88eeacc2132', 'network-id-bbb82d9319194e299ec16677b58f485b', True, 'project-id-8e89377858f7406c956f616ecc9a88c1', '', '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-ba694681bd1147b79e5c583405a94fa5', 'router-name-2b53e8eb64484866b7ceefa5697a23c8', 'project-id-dcc7b3a6dad84e9b8f92aa519330ba77')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-ba694681bd1147b79e5c583405a94fa5, keys=<MagicMock id='164541840'>, name=router-name-2b53e8eb64484866b7ceefa5697a23c8, routes=[], status=ACTIVE, tenant_id=project-id-dcc7b3a6dad84e9b8f92aa519330ba77>
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-d376c75afe124cae8c6f262d725fef76', 'router-name-5fc0d981525645308b066bf9edcca1b7', 'ACTIVE', 'UP', False, False, 'project-id-0940b2853b8a4389afb5234ba93bb055'), ('router-id-08c26cccf6be4dbdbf1bc8ebede1b8eb', 'router-name-b266dd3aab4f4bbf85959565c27d1082', 'ACTIVE', 'UP', False, False, 'project-id-32f8628d49ba43189ad8a13270aebc43'), ('router-id-2da92493fbd84494b21cbca7e0d38fc8', 'router-name-4d475584e46f49279006fd6b84c72c5c', 'ACTIVE', 'UP', False, False, 'project-id-e1794a12dc93456bbcf2996ff3ea82e6')]
data_long = [('router-id-d376c75afe124cae8c6f262d725fef76', 'router-name-5fc0d981525645308b066bf9edcca1b7', 'ACTIVE', 'UP', False, False, 'project-id-0940b2853b8a4389afb5234ba93bb055', [], '{}', ''), ('router-id-08c26cccf6be4dbdbf1bc8ebede1b8eb', 'router-name-b266dd3aab4f4bbf85959565c27d1082', 'ACTIVE', 'UP', False, False, 'project-id-32f8628d49ba43189ad8a13270aebc43', [], '{}', ''), ('router-id-2da92493fbd84494b21cbca7e0d38fc8', 'router-name-4d475584e46f49279006fd6b84c72c5c', 'ACTIVE', 'UP', False, False, 'project-id-e1794a12dc93456bbcf2996ff3ea82e6', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-2da92493fbd84494b21cbca7e0d38fc8, keys=<MagicMock id='164601104'>, name=router-name-4d475584e46f49279006fd6b84c72c5c, routes=[], status=ACTIVE, tenant_id=project-id-e1794a12dc93456bbcf2996ff3ea82e6>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-d376c75afe124cae8c6f262d725fef76, keys=<MagicMock id='164607248'>, name=router-name-5fc0d981525645308b066bf9edcca1b7, routes=[], status=ACTIVE, tenant_id=project-id-0940b2853b8a4389afb5234ba93bb055>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-08c26cccf6be4dbdbf1bc8ebede1b8eb, keys=<MagicMock id='164612368'>, name=router-name-b266dd3aab4f4bbf85959565c27d1082, routes=[], status=ACTIVE, tenant_id=project-id-32f8628d49ba43189ad8a13270aebc43>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-2da92493fbd84494b21cbca7e0d38fc8, keys=<MagicMock id='164601104'>, name=router-name-4d475584e46f49279006fd6b84c72c5c, routes=[], status=ACTIVE, tenant_id=project-id-e1794a12dc93456bbcf2996ff3ea82e6>]
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-30f6ebb0f6744287a883b75b5667ac29', 'router-name-a4d95af9c1364373a864463ae74315b0', 'project-id-3327ee7a475143db8bd6bf46f1948a1e')
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-9b08cc4f82b94604ade6b5639d06777b', 'security-group-name-80291ec8959f4a8b81d9014c7120a1a3', 'security-group-description-049176e46bcb46f587ad4703c3be86c5'),)
expected_data_all_projects = (('security-group-id-9b08cc4f82b94604ade6b5639d06777b', 'security-group-name-80291ec8959f4a8b81d9014c7120a1a3', 'security-group-description-049176e46bcb46f587ad4703c3be86c5', 'project-id-8de481aa5e1849969efa5367247141f6'),)
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-2be04ec2ca8a47da8c9be7030c81302d', 'security-group-name-71221db6b6d44a39828999b3b253b9d3', 'security-group-description-9a56bf2d24244ca99b80c745e6677486', 'project-id-58f84ed8ca9d4f268f56d43008862ded'),)
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-bbe353c9fb514a80b23213f2755d1dbc', 'icmp', '0.0.0.0/0', 'security-group-id-a5e26d148aa040cea31954c3ce2bb668', '', '')
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-18b2c8c174c74bd0a9b74efe2690d3ae', None, None, 'project-id-ac4c4f4221fc41fda865cb7dc9def400', None, 'remote-security-group-id-86be000f2ee04e7ebb206b6320a6df09', None, 'security-group-id-9416508861b4486bb9d31a87d638c25f')
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-d7d2c88feefb445cb9fb6738450e4e0b', 'subnet-name-fceb75d86a634507be4fcc26bdf1f1b2', 'network-id-774286b7b78547eb97ab541f32aabfba', '10.10.10.0/24'), ('subnet-id-e68ff190860443a8805504aa1f82baba', 'subnet-name-3e6d2d33506c4ee086e8a6a76f162bef', 'network-id-22fb000577d3475ab667e89315ad85c9', '10.10.10.0/24'), ('subnet-id-2bf4a9d57d20453e95f8be753e3afa2f', 'subnet-name-1e78d1405c0941bcbf44e6ee6b3c0af2', 'network-id-36e1ca9385fd416085b98eea64502634', '10.10.10.0/24')]
data_long = [('subnet-id-d7d2c88feefb445cb9fb6738450e4e0b', 'subnet-name-fceb75d86a634507be4fcc26bdf1f1b2', 'network-id-774286b7b78547eb97ab541f32aabfba', '10.10.10.0/24', 'project-id-6a4a1baf3f9f43ceb81bf388d10b8531', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-e68ff190860443a8805504aa1f82baba', 'subnet-name-3e6d2d33506c4ee086e8a6a76f162bef', 'network-id-22fb000577d3475ab667e89315ad85c9', '10.10.10.0/24', 'project-id-228dec905d544d5caf31f962e3763b18', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-2bf4a9d57d20453e95f8be753e3afa2f', 'subnet-name-1e78d1405c0941bcbf44e6ee6b3c0af2', 'network-id-36e1ca9385fd416085b98eea64502634', '10.10.10.0/24', 'project-id-c31ecf6e648d49cd9068a5b21b57c2e1', 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-2bf4a9d57d20453e95f8be753e3afa2f, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='56457104'>, name=subnet-name-1e78d1405c0941bcbf44e6ee6b3c0af2, network_id=network-id-36e1ca9385fd416085b98eea64502634, project_id=project-id-c31ecf6e648d49cd9068a5b21b57c2e1, subnetpool_id=None, tenant_id=project-id-c31ecf6e648d49cd9068a5b21b57c2e1>
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-9f00a76339bb4e468b9ae947e6ad0e8d', '4', 'None', 'None', 'subnet-name-df7d389e818e4713929c85d67d3ff74d', 'network-id-3c9ca8bfd118452bb9151e35fd223683', 'project-id-b3b81e1a349049a780c3e17c4e1ffc20', '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-a2366d30e23944ef86cc75ad57889b76', 'subnet-pool-name-47f5696084534ade887dfa17b884f6b8', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-1d59aed5043f47bb9964d41aa0491775', 'subnet-pool-name-2686cd58fca34217983b75a9a8b94c27', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-3a61755f2a674864b11f9766c9d68409', 'subnet-pool-name-0387f257245741f69b4d4b0e50932099', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-a2366d30e23944ef86cc75ad57889b76', 'subnet-pool-name-47f5696084534ade887dfa17b884f6b8', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-ec8f4f561d7542c3bb507a8417bbadd3'), ('subnet-pool-id-1d59aed5043f47bb9964d41aa0491775', 'subnet-pool-name-2686cd58fca34217983b75a9a8b94c27', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-7dd5c95fbda54b659d162f98327f1fdf'), ('subnet-pool-id-3a61755f2a674864b11f9766c9d68409', 'subnet-pool-name-0387f257245741f69b4d4b0e50932099', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-e684351194904041b9423c1adfe1b9ee')]
pool = <FakeResource address_scope_id=address-scope-id-e684351194904041b9423c1adfe1b9ee, default_prefixlen=8, default_quota=None, id=subnet-pool-id-3a61755f2a674864b11f9766c9d68409, ip_version=4, is_default=False, keys=<MagicMock id='101677200'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-0387f257245741f69b4d4b0e50932099, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-72490b63a7b2457ba6b67070b99a3b04, shared=False, tenant_id=project-id-72490b63a7b2457ba6b67070b99a3b04>
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-82baa1f5938c46d496d17fa0403b517c', 8, None, 'subnet-pool-id-f897c4a9ded44201906154b767a27251', 4, False, 32, 8, 'subnet-pool-name-6fdc4103a4ea4869a874fde8af09407a', '10.0.0.0/24, 10.1.0.0/24', 'project-id-adb2dc32b94f481fa13c7f8d7c275a49', 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