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-eaea949ab1f54a379a6efd4b9e380097, instance_id=server-id-d375f45666cf456983e9339d222dd62d, 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-30ba5a2f07714d9fa930e97a50aac6aa, id=floating-ip-id-f3e4e04610044eb0995cc173f2501836, keys=<MagicMock id='125268304'>, port_id=port-id-1ad1d5b037b84c9fb735badd0b1ab057, project_id=project-id-2eb6d6a7ce934b4dac4e2aed3e8aa822, router_id=router-id-ce1e7eb5017943bd8920dbe612eb14b4, status=DOWN, tenant_id=project-id-2eb6d6a7ce934b4dac4e2aed3e8aa822>
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-9c31e0fd33f9438db5e47f8781f4d000', '1.0.9.0', '2.0.9.0', 'server-id-4bc6bf6023904005b1c561380aeb79a4', 'public'), ('floating-ip-id-8eb52c3e9bf74f0486ce31ab109b712d', '1.0.9.0', '2.0.9.0', 'server-id-f31eb8a8907b4a8b8c9c1fc85698efc5', 'public'), ('floating-ip-id-5ea2622588584ceebe236766d9e752a3', '1.0.9.0', '2.0.9.0', 'server-id-0f7fc4f979c04e7793e9469839e7f458', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-9c31e0fd33f9438db5e47f8781f4d000, instance_id=server-id-4bc6bf6023904005b1c561380aeb79a4, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-8eb52c3e9bf74f0486ce31ab109b712d, instance_id=server-id-f31eb8a8907b4a8b8c9c1fc85698efc5, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-5ea2622588584ceebe236766d9e752a3, instance_id=server-id-0f7fc4f979c04e7793e9469839e7f458, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-5ea2622588584ceebe236766d9e752a3, instance_id=server-id-0f7fc4f979c04e7793e9469839e7f458, 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-b9f77b6f2b2142d5900028ff5252867c', '1.0.9.0', '2.0.9.0', 'port-id-7aa438bc387649b3b625b5df01748197'), ('floating-ip-id-db1ff3ad6edb4d7b8b548b4d473ea88f', '1.0.9.0', '2.0.9.0', 'port-id-f2633853cb484644b1449fb449881ace'), ('floating-ip-id-1428ec569dbe4dce9e83e6a0eda0ca86', '1.0.9.0', '2.0.9.0', 'port-id-e630abb1fdf44cfeabf384ea3e2a2b32')]
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-673df823ecea4cabacf92e15be7c8e19, id=floating-ip-id-b9f77b6f2b2142d5900028ff5252867c, keys=<MagicMock id='175132048'>, port_id=port-id-7aa438bc387649b3b625b5df01748197, project_id=project-id-0fd0c6d7aea4479e817d773185080968, router_id=router-id-f6181e85aea54fe8bdabdfb8054bcd4b, status=DOWN, tenant_id=project-id-0fd0c6d7aea4479e817d773185080968>, <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-8c1ae4e2edeb41bca245642be6a4e665, id=floating-ip-id-db1ff3ad6edb4d7b8b548b4d473ea88f, keys=<MagicMock id='134783760'>, port_id=port-id-f2633853cb484644b1449fb449881ace, project_id=project-id-9fd548da320c463b81b3f33bba85fae4, router_id=router-id-65154d3251f2452ca746faa7f7deb73f, status=DOWN, tenant_id=project-id-9fd548da320c463b81b3f33bba85fae4>, <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-732de9d833c2495fb07f28c346de64eb, id=floating-ip-id-1428ec569dbe4dce9e83e6a0eda0ca86, keys=<MagicMock id='106656016'>, port_id=port-id-e630abb1fdf44cfeabf384ea3e2a2b32, project_id=project-id-35c7defd934e4acca0c5f4dd2b0c432a, router_id=router-id-30db1eaa86794a1482f37b2ddbdaa086, status=DOWN, tenant_id=project-id-35c7defd934e4acca0c5f4dd2b0c432a>]
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-732de9d833c2495fb07f28c346de64eb, id=floating-ip-id-1428ec569dbe4dce9e83e6a0eda0ca86, keys=<MagicMock id='106656016'>, port_id=port-id-e630abb1fdf44cfeabf384ea3e2a2b32, project_id=project-id-35c7defd934e4acca0c5f4dd2b0c432a, router_id=router-id-30db1eaa86794a1482f37b2ddbdaa086, status=DOWN, tenant_id=project-id-35c7defd934e4acca0c5f4dd2b0c432a>
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-4739c2e4a96241a1acf91cba05d99bc5', 'server-id-f5d1d5722f294f1ab3ed8214ab635be8', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-4739c2e4a96241a1acf91cba05d99bc5, instance_id=server-id-f5d1d5722f294f1ab3ed8214ab635be8, 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-13f65afcf035423b8ba95cbe8f208ea6', 'floating-ip-id-5f7fed15d74a4d039d56fc2678d33b34', 'port-id-639ecd05881842419618e7afa40f510f', 'project-id-82c17e78d8bc46e68f71a885ee5a5758', 'router-id-cbb6fa4ba88b4a72a50495849f7985f2', '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-13f65afcf035423b8ba95cbe8f208ea6, id=floating-ip-id-5f7fed15d74a4d039d56fc2678d33b34, keys=<MagicMock id='124055760'>, port_id=port-id-639ecd05881842419618e7afa40f510f, project_id=project-id-82c17e78d8bc46e68f71a885ee5a5758, router_id=router-id-cbb6fa4ba88b4a72a50495849f7985f2, status=DOWN, tenant_id=project-id-82c17e78d8bc46e68f71a885ee5a5758>
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-7af7cec7d55f4c0ba775f3884b510664', False, 'network-label-e24a749f318b402594fa857b163d5bcf', None, False, '255.255.255.0', None, None, 'project-id-400276e554c8479080b7f5952826945c', 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-ef675a6a243f4ef0b56172d301fec2e2', 'network-name-db63495fe9894f308fafb5c8755b2590', '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-411b97e660a849f1a5efcb54f5d3e994', 'network-name-6704f81b88d54573942fb547e5e24ccc', '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-a06b9c57bed148a3a1679d14f9714e6f', 'network-name-7f0e2fdb6aa34e41b0b4dfed98b95fdb', 'a, b'), ('network-id-ce3442d97f46447f9c7e624ea5f0a83d', 'network-name-5e1bcff1c95942b89e734f09e0aee039', 'a, b'), ('network-id-4ca2716f5d034692b171bd00a90538b9', 'network-name-b99b1952ce7e4a26b504b0e362492382', 'a, b')]
data_long = [('network-id-a06b9c57bed148a3a1679d14f9714e6f', 'network-name-7f0e2fdb6aa34e41b0b4dfed98b95fdb', 'ACTIVE', 'project-id-b79a1e0c33c841c0ab2e359eacf15597', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-ce3442d97f46447f9c7e624ea5f0a83d', 'network-name-5e1bcff1c95942b89e734f09e0aee039', 'ACTIVE', 'project-id-c8c3751b3d4d4bfc87190ed6aee37590', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-4ca2716f5d034692b171bd00a90538b9', 'network-name-b99b1952ce7e4a26b504b0e362492382', 'ACTIVE', 'project-id-d89342d22e9c4be5be0ec79ce1f1c9b7', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-4ca2716f5d034692b171bd00a90538b9, keys=<MagicMock id='124017424'>, name=network-name-b99b1952ce7e4a26b504b0e362492382, project_id=project-id-d89342d22e9c4be5be0ec79ce1f1c9b7, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-d89342d22e9c4be5be0ec79ce1f1c9b7>
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-dd3036979cec476e98c292632d12564e', 'network-label-9b41e64d5f2049fba6ac2c88508252a5', '10.0.0.0/24'), ('network-id-a5f740c52caf4150b727f8a5661efff6', 'network-label-a85c99591604460fa5d0fcd2fd1dc85b', '10.0.0.0/24'), ('network-id-01884ca3f8d24ba481fb2903624aaf8d', 'network-label-82a003ca5c6d48d3a027fdfa7ebfd0a7', '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-01884ca3f8d24ba481fb2903624aaf8d, injected=False, keys=<MagicMock id='79048464'>, label=network-label-82a003ca5c6d48d3a027fdfa7ebfd0a7, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-d175e8a3b94a47d5b8adc7b65a7f4691, 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-e0972a1e047f4de6a20137fdc1afa39f', 'network-name-9a4489a3d34a46e5b07753ff37845be2', 'project-id-ae462ecda55c4ea58d80ed707c0ade42', '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-e186debdfd0e49c5bc597443613da1eb', False, 'network-label-2baca0a611624bcd8048302b42c67233', None, False, '255.255.255.0', None, None, 'project-id-d2496a22a13e4ee0bfc04d0cb83d0155', 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-3252959083ef4cee9000d9edd3c5b734', '', '', 'ovs', 'normal', 'device-id-74348539ea7f4f2aaedee1a386b9dce1', 'compute:nova', '', 'dns-name-afe008351d574a058af84f3464fe2a40', '', '', 'port-id-3f01757b47e14c90a1648d48824722db', 'fa:16:3e:a9:4e:72', 'port-name-e1abf51504b74c7584a2fd76699a0c2f', 'network-id-a62f89efdb4c40dc9913243525fd2a14', True, 'project-id-050a2775e00f4c5a8a8ff72dc81014de', '', '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-d7cf90d80e0949fabab851be13a8bc50', 'router-name-7d0f84e45f56450aa4f898703f5152b7', 'project-id-ab947e240510457a84440d39363331f1')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-d7cf90d80e0949fabab851be13a8bc50, keys=<MagicMock id='148667984'>, name=router-name-7d0f84e45f56450aa4f898703f5152b7, routes=[], status=ACTIVE, tenant_id=project-id-ab947e240510457a84440d39363331f1>
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-afde505b33cf413e86e34e615b039ef7', 'router-name-1446462eee3a4070994770c03253297c', 'ACTIVE', 'UP', False, False, 'project-id-d4e00f54365e4002b31c41e4e1965033'), ('router-id-8e1d6dcfcb964ed4a1ccfab15802bbe1', 'router-name-6a947959bf754571918384a4652fb230', 'ACTIVE', 'UP', False, False, 'project-id-5ede907253a14c10a08f5239ae2a5dab'), ('router-id-5c87118de9b34834894d5995e82f8266', 'router-name-6e14c835432041b6931a9ea1c739927d', 'ACTIVE', 'UP', False, False, 'project-id-80386827aea84679b2f8a76408e3496e')]
data_long = [('router-id-afde505b33cf413e86e34e615b039ef7', 'router-name-1446462eee3a4070994770c03253297c', 'ACTIVE', 'UP', False, False, 'project-id-d4e00f54365e4002b31c41e4e1965033', [], '{}', ''), ('router-id-8e1d6dcfcb964ed4a1ccfab15802bbe1', 'router-name-6a947959bf754571918384a4652fb230', 'ACTIVE', 'UP', False, False, 'project-id-5ede907253a14c10a08f5239ae2a5dab', [], '{}', ''), ('router-id-5c87118de9b34834894d5995e82f8266', 'router-name-6e14c835432041b6931a9ea1c739927d', 'ACTIVE', 'UP', False, False, 'project-id-80386827aea84679b2f8a76408e3496e', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-5c87118de9b34834894d5995e82f8266, keys=<MagicMock id='72594064'>, name=router-name-6e14c835432041b6931a9ea1c739927d, routes=[], status=ACTIVE, tenant_id=project-id-80386827aea84679b2f8a76408e3496e>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-afde505b33cf413e86e34e615b039ef7, keys=<MagicMock id='81695888'>, name=router-name-1446462eee3a4070994770c03253297c, routes=[], status=ACTIVE, tenant_id=project-id-d4e00f54365e4002b31c41e4e1965033>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-8e1d6dcfcb964ed4a1ccfab15802bbe1, keys=<MagicMock id='65672144'>, name=router-name-6a947959bf754571918384a4652fb230, routes=[], status=ACTIVE, tenant_id=project-id-5ede907253a14c10a08f5239ae2a5dab>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-5c87118de9b34834894d5995e82f8266, keys=<MagicMock id='72594064'>, name=router-name-6e14c835432041b6931a9ea1c739927d, routes=[], status=ACTIVE, tenant_id=project-id-80386827aea84679b2f8a76408e3496e>]
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-6edc98b796664a299a379110e3e4c02f', 'router-name-ea97967be4754995818aa7977d8ef5de', 'project-id-4910c8ab22c8490cb4989285251d64d9')
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-53094edc4e0d4cab890356369c28cac5', 'security-group-name-97e0fe6502e84b8791b1e7f8ddad2a70', 'security-group-description-1603018141384126826cdecdc3e2affd'),)
expected_data_all_projects = (('security-group-id-53094edc4e0d4cab890356369c28cac5', 'security-group-name-97e0fe6502e84b8791b1e7f8ddad2a70', 'security-group-description-1603018141384126826cdecdc3e2affd', 'project-id-0f4f1e9c79794b5683936abfdbd2127d'),)
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-7f1843783d3140cc8c11be19dcf10a50', 'security-group-name-281f0028685c47d89ffaaddcb16c705a', 'security-group-description-dbf12ed64a17461b8e7f6a4909f67bfd', 'project-id-dd1d897eeaab4afea4693681fd5994e5'),)
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-8e3e0a3c7e6e4a12ad1294a79d49e9ef', 'icmp', '0.0.0.0/0', 'security-group-id-a9393365c4da49d69d9f5e9d75280d46', '', '')
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-be3d0bf3e77b4798a064c05639538830', None, None, 'project-id-773cc122957242f7a1b06235bc70a198', None, 'remote-security-group-id-5b8ea05cdae944038ac1ed46c826eefd', None, 'security-group-id-8a0bac69fe9348a6aff470e167ae856f')
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-07db844e0bc34ce68f2b6cdcc3356f3c', 'subnet-name-ed7074d0a2594077975e13ccf5c0384e', 'network-id-e625941995a347d685104ab5f7539a66', '10.10.10.0/24'), ('subnet-id-07cff62266d34fee9f6795c7aba28585', 'subnet-name-953338ecd0f84e1f8210ce43d79cebd8', 'network-id-785f60859f494dc294df73d594fd32db', '10.10.10.0/24'), ('subnet-id-8c7c717777794d909b820b7ecdab0237', 'subnet-name-16b9dd60389a4e55b419cbe519b1514b', 'network-id-ee858331d0b2406f9aecea26470c385f', '10.10.10.0/24')]
data_long = [('subnet-id-07db844e0bc34ce68f2b6cdcc3356f3c', 'subnet-name-ed7074d0a2594077975e13ccf5c0384e', 'network-id-e625941995a347d685104ab5f7539a66', '10.10.10.0/24', 'project-id-4f80a8d895f64086989371b6fef1bf8e', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-07cff62266d34fee9f6795c7aba28585', 'subnet-name-953338ecd0f84e1f8210ce43d79cebd8', 'network-id-785f60859f494dc294df73d594fd32db', '10.10.10.0/24', 'project-id-64e26c65a5e3406ea977e915f52a4979', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-8c7c717777794d909b820b7ecdab0237', 'subnet-name-16b9dd60389a4e55b419cbe519b1514b', 'network-id-ee858331d0b2406f9aecea26470c385f', '10.10.10.0/24', 'project-id-6ba337ecfce34ab996fa457dee667133', 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-8c7c717777794d909b820b7ecdab0237, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='164539024'>, name=subnet-name-16b9dd60389a4e55b419cbe519b1514b, network_id=network-id-ee858331d0b2406f9aecea26470c385f, project_id=project-id-6ba337ecfce34ab996fa457dee667133, subnetpool_id=None, tenant_id=project-id-6ba337ecfce34ab996fa457dee667133>
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-7865f078606f4e0aaf62847d13eca264', '4', 'None', 'None', 'subnet-name-e5e902693c0b4e0cab37ca6297cc64e6', 'network-id-7c8ecdfab5444c948d56550d119e8dcd', 'project-id-97e7be66311b4ba689fce37146d4f3f5', '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-58929936ae7c48baaf608a5c997ed318', 'subnet-pool-name-f1edd16301ee4a19a917b1be0e363950', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-b842c2dae0564cf8ad45d92d7672c9be', 'subnet-pool-name-f102a1b7aabe43bf91bd18575b495e79', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-9ea2e15eb0cc4ce187cd9dd3e8d39815', 'subnet-pool-name-08157863a6ee4caea4d8100c7393e0fd', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-58929936ae7c48baaf608a5c997ed318', 'subnet-pool-name-f1edd16301ee4a19a917b1be0e363950', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-6e70f4498bce492d95b261d14fb08f06'), ('subnet-pool-id-b842c2dae0564cf8ad45d92d7672c9be', 'subnet-pool-name-f102a1b7aabe43bf91bd18575b495e79', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-dc05d771bd444518a6c1c6c5561225e9'), ('subnet-pool-id-9ea2e15eb0cc4ce187cd9dd3e8d39815', 'subnet-pool-name-08157863a6ee4caea4d8100c7393e0fd', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-25d569f8159447d5b041cb7574df5b4d')]
pool = <FakeResource address_scope_id=address-scope-id-25d569f8159447d5b041cb7574df5b4d, default_prefixlen=8, default_quota=None, id=subnet-pool-id-9ea2e15eb0cc4ce187cd9dd3e8d39815, ip_version=4, is_default=False, keys=<MagicMock id='182337040'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-08157863a6ee4caea4d8100c7393e0fd, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-f6ae10663e0047958c750c34af5d381c, shared=False, tenant_id=project-id-f6ae10663e0047958c750c34af5d381c>
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-b54aae2e090e422e91961b761059194c', 8, None, 'subnet-pool-id-203a991792fb4fac8937d118ec4a2b88', 4, False, 32, 8, 'subnet-pool-name-345eeeed92964884893a507e69cb9ebc', '10.0.0.0/24, 10.1.0.0/24', 'project-id-c9c1e6129bfc4c17bdeed70bbd1fa6e8', 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