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-e237167410ff4457803c7e7c5e22af87, instance_id=server-id-76963acebe384e94bcec47eab00aa005, 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-b03142bfa7b94038997a9e35b50c33a9, id=floating-ip-id-0fc1f0b76d214f57b27d4c9a00845293, keys=<MagicMock id='4099165580'>, port_id=port-id-4f2bc9d76bdd42afba75ccb244ec332d, project_id=project-id-b91e1e3d7bcc4636ad90dacfb96631b1, router_id=router-id-a55f573f6402486e9c1bcef11ff65bb5, status=DOWN, tenant_id=project-id-b91e1e3d7bcc4636ad90dacfb96631b1>
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-8408415338e24411b4c7f5f145b51c90', '1.0.9.0', '2.0.9.0', 'server-id-650ebdce09d548489faaef158d1f0ff5', 'public'), ('floating-ip-id-828eaea8ad4a453f8b3b0ed887d28962', '1.0.9.0', '2.0.9.0', 'server-id-76c309c6128f49aaa939fd208574d9dc', 'public'), ('floating-ip-id-6e1f68e9627d470b8e1bcd93cc122f3c', '1.0.9.0', '2.0.9.0', 'server-id-56250bf401064f859b0f2c2b2a0d64a1', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-8408415338e24411b4c7f5f145b51c90, instance_id=server-id-650ebdce09d548489faaef158d1f0ff5, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-828eaea8ad4a453f8b3b0ed887d28962, instance_id=server-id-76c309c6128f49aaa939fd208574d9dc, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-6e1f68e9627d470b8e1bcd93cc122f3c, instance_id=server-id-56250bf401064f859b0f2c2b2a0d64a1, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-6e1f68e9627d470b8e1bcd93cc122f3c, instance_id=server-id-56250bf401064f859b0f2c2b2a0d64a1, 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-441af8f5453d410b8cf1879835d6195b', '1.0.9.0', '2.0.9.0', 'port-id-4d7363d2e1da499db071dd0802bcf97a'), ('floating-ip-id-212756ec37824aba85087911f93011ec', '1.0.9.0', '2.0.9.0', 'port-id-67e048e6927f45b08ad417ff06219d30'), ('floating-ip-id-20849cd0a71a400a8bb5bed8c29e72dd', '1.0.9.0', '2.0.9.0', 'port-id-1c5b83d2d4b548c2b59a5c2855e2931f')]
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-5c8bc5ce3d044059b4c4aa758375dca1, id=floating-ip-id-441af8f5453d410b8cf1879835d6195b, keys=<MagicMock id='4086475564'>, port_id=port-id-4d7363d2e1da499db071dd0802bcf97a, project_id=project-id-793a640a63ea4c379fd95f80699716ea, router_id=router-id-9066e0d4ec1f4940a32c091921406595, status=DOWN, tenant_id=project-id-793a640a63ea4c379fd95f80699716ea>, <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-8f9b9bf0a5e64699b846b4ca7204a6b4, id=floating-ip-id-212756ec37824aba85087911f93011ec, keys=<MagicMock id='4082488908'>, port_id=port-id-67e048e6927f45b08ad417ff06219d30, project_id=project-id-6c381ce8983d48a48b989b2fab2b7b1c, router_id=router-id-d2607e21290443038a72104528d1d794, status=DOWN, tenant_id=project-id-6c381ce8983d48a48b989b2fab2b7b1c>, <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-0b4c797698264c329c1ebea222d981f3, id=floating-ip-id-20849cd0a71a400a8bb5bed8c29e72dd, keys=<MagicMock id='4082562828'>, port_id=port-id-1c5b83d2d4b548c2b59a5c2855e2931f, project_id=project-id-6bea3f0ca4ab40cb8ff24bed1403ac3a, router_id=router-id-da8b779d7fb94a0aad52f0889e942871, status=DOWN, tenant_id=project-id-6bea3f0ca4ab40cb8ff24bed1403ac3a>]
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-0b4c797698264c329c1ebea222d981f3, id=floating-ip-id-20849cd0a71a400a8bb5bed8c29e72dd, keys=<MagicMock id='4082562828'>, port_id=port-id-1c5b83d2d4b548c2b59a5c2855e2931f, project_id=project-id-6bea3f0ca4ab40cb8ff24bed1403ac3a, router_id=router-id-da8b779d7fb94a0aad52f0889e942871, status=DOWN, tenant_id=project-id-6bea3f0ca4ab40cb8ff24bed1403ac3a>
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-f9cc5ad1f8584fb3a2095f7763bfc511', 'server-id-f9c43047ed9d4051936b9b6486626951', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-f9cc5ad1f8584fb3a2095f7763bfc511, instance_id=server-id-f9c43047ed9d4051936b9b6486626951, 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-84999f4235b34b6f99fd0b1dc96926b6', 'floating-ip-id-04dfab0639b4449eb3e81dcdcba429d8', 'port-id-05539ed896f6401cb997a34866a9d1c5', 'project-id-d92977d242b84ab484e9b8050e030869', 'router-id-4a22d256dd0447f4b695b62fde048913', '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-84999f4235b34b6f99fd0b1dc96926b6, id=floating-ip-id-04dfab0639b4449eb3e81dcdcba429d8, keys=<MagicMock id='4091680076'>, port_id=port-id-05539ed896f6401cb997a34866a9d1c5, project_id=project-id-d92977d242b84ab484e9b8050e030869, router_id=router-id-4a22d256dd0447f4b695b62fde048913, status=DOWN, tenant_id=project-id-d92977d242b84ab484e9b8050e030869>
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-0d18d75667b144c6bff5fdbcce72cb02', False, 'network-label-967528f65b5e4469bde09690a24cc5fd', None, False, '255.255.255.0', None, None, 'project-id-35b761a87b8245a6a7ac4371aaf27ea7', 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-0acbdd193b0c49b0876a64b4897b7aab', 'network-name-c4d258234e7d4edc8be7e5be7caac79a', '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-74e008f43f11459baa888e946769681c', 'network-name-371c7575249a413d86ec670c6d1215a2', '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-48527d7021c54fbd832461baaad5e1d6', 'network-name-7f8abb51b0f24674bbe105bbc45c4de1', 'a, b'), ('network-id-693bb766dc7245a2b66608a3a3e16b84', 'network-name-94070b9af4b840f4bde9dbfb26308470', 'a, b'), ('network-id-3fcd8adff23b4d3ebea7944270827fb2', 'network-name-7ba4f2edb7a74e64a4bfeacf9651d074', 'a, b')]
data_long = [('network-id-48527d7021c54fbd832461baaad5e1d6', 'network-name-7f8abb51b0f24674bbe105bbc45c4de1', 'ACTIVE', 'project-id-c3da2bb8884c4fafb37d9c231543f1ec', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-693bb766dc7245a2b66608a3a3e16b84', 'network-name-94070b9af4b840f4bde9dbfb26308470', 'ACTIVE', 'project-id-49ce9acd4895493fb594b3db88f6e067', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-3fcd8adff23b4d3ebea7944270827fb2', 'network-name-7ba4f2edb7a74e64a4bfeacf9651d074', 'ACTIVE', 'project-id-452c68b9e6fc451eb04a81511fa276b1', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-3fcd8adff23b4d3ebea7944270827fb2, keys=<MagicMock id='4073132332'>, name=network-name-7ba4f2edb7a74e64a4bfeacf9651d074, project_id=project-id-452c68b9e6fc451eb04a81511fa276b1, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-452c68b9e6fc451eb04a81511fa276b1>
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-3458cc977446465b80f9529580fb457d', 'network-label-be67119020d34c72a453524996d80d85', '10.0.0.0/24'), ('network-id-3df97027ef1d411ea559affab8359380', 'network-label-ca7a36334dc24f58ba79f8bf95bf5f1b', '10.0.0.0/24'), ('network-id-8fe12fe7e90249d8bf122e6cbf121fb1', 'network-label-1e75487d4f3848378468303d0f2e46fa', '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-8fe12fe7e90249d8bf122e6cbf121fb1, injected=False, keys=<MagicMock id='4075838348'>, label=network-label-1e75487d4f3848378468303d0f2e46fa, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-d32a485d8868497eb44d893ddb62c8b8, 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-44f9d21fa89f4adfb6a87112c53853ea', 'network-name-2180739c0c2547df972668e93a5b83b1', 'project-id-0639834b01a74f33a8671f3a95965d71', '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-96b6570d1ba548a7934fb3c7c6396cb7', False, 'network-label-c68c850696a742999934ca9c20cdb229', None, False, '255.255.255.0', None, None, 'project-id-288a7728e7f64218a947549f6217c2b5', 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-256a63d4cd794916a591e60076878172', '', '', 'ovs', 'normal', 'device-id-f6726d130fab4d01801472fc7e056840', 'compute:nova', '', 'dns-name-c993d6c981da4a20bdb8d3ed82725ba1', '', '', 'port-id-4727c0adeb9d4d36a8d734640aa3682b', 'fa:16:3e:a9:4e:72', 'port-name-69f50b6c4e5b4c21beab199458e8473b', 'network-id-f8435b2f1c0f46f1b563806c28674898', True, 'project-id-f3fd223ea44c48edb75d87a0853ec690', '', '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-c82b6f2bc4ed4a8389179b01093d07bd', 'router-name-49d2f212cbc3418fa09ad7232845ed53', 'project-id-2b84a8e837834ff3873708686c65ee68')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-c82b6f2bc4ed4a8389179b01093d07bd, keys=<MagicMock id='4070756332'>, name=router-name-49d2f212cbc3418fa09ad7232845ed53, routes=[], status=ACTIVE, tenant_id=project-id-2b84a8e837834ff3873708686c65ee68>
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-3203786928bf4e9b9cc558a0023afab3', 'router-name-2805bb75ff594bc099ca3a358fb42849', 'ACTIVE', 'UP', False, False, 'project-id-07ce27239b1b4ebcbfb0119936401f1d'), ('router-id-3e6684d52fe8495982e11b05a6bcaa70', 'router-name-f1224f9b8712491e8c496aea06151cd5', 'ACTIVE', 'UP', False, False, 'project-id-5f0f593c7cc247049e0654e4530b2270'), ('router-id-d6c201b23afe4eed9395396e07a1d533', 'router-name-b50239272d5d4aafaf53ffd9c27fd289', 'ACTIVE', 'UP', False, False, 'project-id-5542b538f0084d4fbfdb8d3a1bdfa0b5')]
data_long = [('router-id-3203786928bf4e9b9cc558a0023afab3', 'router-name-2805bb75ff594bc099ca3a358fb42849', 'ACTIVE', 'UP', False, False, 'project-id-07ce27239b1b4ebcbfb0119936401f1d', [], '{}', ''), ('router-id-3e6684d52fe8495982e11b05a6bcaa70', 'router-name-f1224f9b8712491e8c496aea06151cd5', 'ACTIVE', 'UP', False, False, 'project-id-5f0f593c7cc247049e0654e4530b2270', [], '{}', ''), ('router-id-d6c201b23afe4eed9395396e07a1d533', 'router-name-b50239272d5d4aafaf53ffd9c27fd289', 'ACTIVE', 'UP', False, False, 'project-id-5542b538f0084d4fbfdb8d3a1bdfa0b5', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-d6c201b23afe4eed9395396e07a1d533, keys=<MagicMock id='4071457132'>, name=router-name-b50239272d5d4aafaf53ffd9c27fd289, routes=[], status=ACTIVE, tenant_id=project-id-5542b538f0084d4fbfdb8d3a1bdfa0b5>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-3203786928bf4e9b9cc558a0023afab3, keys=<MagicMock id='4071439628'>, name=router-name-2805bb75ff594bc099ca3a358fb42849, routes=[], status=ACTIVE, tenant_id=project-id-07ce27239b1b4ebcbfb0119936401f1d>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-3e6684d52fe8495982e11b05a6bcaa70, keys=<MagicMock id='4071331692'>, name=router-name-f1224f9b8712491e8c496aea06151cd5, routes=[], status=ACTIVE, tenant_id=project-id-5f0f593c7cc247049e0654e4530b2270>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-d6c201b23afe4eed9395396e07a1d533, keys=<MagicMock id='4071457132'>, name=router-name-b50239272d5d4aafaf53ffd9c27fd289, routes=[], status=ACTIVE, tenant_id=project-id-5542b538f0084d4fbfdb8d3a1bdfa0b5>]
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-260ccece00ae4b028e6e600e88633160', 'router-name-e91e1265978941118c27bf06357334d9', 'project-id-211c269e1b5d46718ac83dd0e4cc8291')
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-9416ba0d148c4e0aac8a0dfa1d9eb2f1', 'security-group-name-ae66ccd3799543fdafbe95fb571f01f1', 'security-group-description-28df22288f874e87beb50af1cecc2689'),)
expected_data_all_projects = (('security-group-id-9416ba0d148c4e0aac8a0dfa1d9eb2f1', 'security-group-name-ae66ccd3799543fdafbe95fb571f01f1', 'security-group-description-28df22288f874e87beb50af1cecc2689', 'project-id-60a74d73580e44fa8a1b800f660edacd'),)
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-b6e6f9fb0a254f089df16d9bcb51ae11', 'security-group-name-1a2186b59ff44090982e717312d362d1', 'security-group-description-6880ea66eb57492e84ca1a79513b387a', 'project-id-57210d252d1b484dba2319a046ea54ae'),)
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-d373d96074bc40c082b8358777b8a6a5', 'icmp', '0.0.0.0/0', 'security-group-id-193eff7f7a9b45c48e9492d00ab76d7e', '', '')
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-f2ec276eaf34450f954a1a4b1a224128', None, None, 'project-id-e0a42080687f4ec484de3c7224f4363d', None, 'remote-security-group-id-010642fba602457884168845e66eedaa', None, 'security-group-id-bd44dcb33905481e80e1e150dc84f2ee')
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-c251dfd16258497ba1541fe493ddfcf9', 'subnet-name-044e48c6786a4a75b800bf13c65326fc', 'network-id-ac91d2c1fb9a4608b147e5ede9732f67', '10.10.10.0/24'), ('subnet-id-dfd23b833f5c4d548c5cd93cb6000800', 'subnet-name-094cc204913c4322a3260e6b433b4a5e', 'network-id-df9c1e2843d74294a2334893e0e8a157', '10.10.10.0/24'), ('subnet-id-5080f828a833427fa787ed46f88d6809', 'subnet-name-a99c74b1195a47ff9da3806a06d385b3', 'network-id-38ffa85d72df42938a763aa2d95850f0', '10.10.10.0/24')]
data_long = [('subnet-id-c251dfd16258497ba1541fe493ddfcf9', 'subnet-name-044e48c6786a4a75b800bf13c65326fc', 'network-id-ac91d2c1fb9a4608b147e5ede9732f67', '10.10.10.0/24', 'project-id-69d928b632fd4f46a77fc6b5ceff967d', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-dfd23b833f5c4d548c5cd93cb6000800', 'subnet-name-094cc204913c4322a3260e6b433b4a5e', 'network-id-df9c1e2843d74294a2334893e0e8a157', '10.10.10.0/24', 'project-id-4c0e36b210d74bbdb9c73ef4e34d5619', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-5080f828a833427fa787ed46f88d6809', 'subnet-name-a99c74b1195a47ff9da3806a06d385b3', 'network-id-38ffa85d72df42938a763aa2d95850f0', '10.10.10.0/24', 'project-id-501050f7ccee4db08ba3677ebc579c50', 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-5080f828a833427fa787ed46f88d6809, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='4070391212'>, name=subnet-name-a99c74b1195a47ff9da3806a06d385b3, network_id=network-id-38ffa85d72df42938a763aa2d95850f0, project_id=project-id-501050f7ccee4db08ba3677ebc579c50, subnetpool_id=None, tenant_id=project-id-501050f7ccee4db08ba3677ebc579c50>
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-3026f7ec25a84673ac21fa299efad0eb', '4', 'None', 'None', 'subnet-name-2ce9045f404245278fbd00c0c517f313', 'network-id-454f6efb4c71439582149398c06b4254', 'project-id-6abb4a3e1f114e90b8f283a7776d029d', '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-c39c5b683685490cb060d73c2f4815ff', 'subnet-pool-name-6d37b91601aa41c29c1b94de40b5ca0f', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-5a07660170894eb2bc4a1ccc727fc007', 'subnet-pool-name-864b8ee63cd94db0bd6b6462812ad546', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-2e4932a08b084e65a9fd30d94919cee6', 'subnet-pool-name-2fb2908a887647128937b9fd5898c464', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-c39c5b683685490cb060d73c2f4815ff', 'subnet-pool-name-6d37b91601aa41c29c1b94de40b5ca0f', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-7f93f0cea89c4f778ce1b1260450ea71'), ('subnet-pool-id-5a07660170894eb2bc4a1ccc727fc007', 'subnet-pool-name-864b8ee63cd94db0bd6b6462812ad546', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-5df8d126f61d447f812f50ab7648562a'), ('subnet-pool-id-2e4932a08b084e65a9fd30d94919cee6', 'subnet-pool-name-2fb2908a887647128937b9fd5898c464', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-6755dc4ecf6e4c3bba5c98c5bf5eacb9')]
pool = <FakeResource address_scope_id=address-scope-id-6755dc4ecf6e4c3bba5c98c5bf5eacb9, default_prefixlen=8, default_quota=None, id=subnet-pool-id-2e4932a08b084e65a9fd30d94919cee6, ip_version=4, is_default=False, keys=<MagicMock id='4069747436'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-2fb2908a887647128937b9fd5898c464, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-c019689ccf85430091b90eeacccd9dc4, shared=False, tenant_id=project-id-c019689ccf85430091b90eeacccd9dc4>
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-088bb39afaf245c590b24ef545b7b019', 8, None, 'subnet-pool-id-46f1d0319d0343eab869b0a4e07a2b10', 4, False, 32, 8, 'subnet-pool-name-af193f0d234e4a3389b956d134f45978', '10.0.0.0/24, 10.1.0.0/24', 'project-id-357917493e64480a84ebc576fa1bddb8', 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