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-e2e8874f1f3c4d69a833a079380ff4c3, instance_id=server-id-6b44c831ba5e46c4959f6585338c9e81, 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-e0d36235f67c4ac9bb1d6f755544d12d, id=floating-ip-id-9948a4221f044997a161ffffef8249bc, keys=<MagicMock id='47989117326992'>, port_id=port-id-439977c8ca9749a4ade107571010139b, project_id=project-id-6f4428a0006e410d849f7e937e8ef702, router_id=router-id-802b50e3446b405e9c205290b152657e, status=DOWN, tenant_id=project-id-6f4428a0006e410d849f7e937e8ef702>
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-e6becb4bf4464a358422a01f818f4188', '1.0.9.0', '2.0.9.0', 'server-id-cb3747c383c74ac3a92e7962e1756e91', 'public'), ('floating-ip-id-d9cb175ee6f54cc383e6bae81b1cbed6', '1.0.9.0', '2.0.9.0', 'server-id-ead42a1f9c20476eaa51cb9044f1ce61', 'public'), ('floating-ip-id-c92587a3157d4142a02e1884f3658350', '1.0.9.0', '2.0.9.0', 'server-id-6e0825f92ca3462d80e5666d585e818c', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-e6becb4bf4464a358422a01f818f4188, instance_id=server-id-cb3747c383c74ac3a92e7962e1756e91, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-d9cb175ee6f54cc383e6bae81b1cbed6, instance_id=server-id-ead42a1f9c20476eaa51cb9044f1ce61, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-c92587a3157d4142a02e1884f3658350, instance_id=server-id-6e0825f92ca3462d80e5666d585e818c, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-c92587a3157d4142a02e1884f3658350, instance_id=server-id-6e0825f92ca3462d80e5666d585e818c, 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-605050e24e024929ad285392f57a975c', '1.0.9.0', '2.0.9.0', 'port-id-ca9d3d82ea3e4b719e1ebac87627f104'), ('floating-ip-id-cb67bd561c8247369526f47a3f53df75', '1.0.9.0', '2.0.9.0', 'port-id-7e929c57703b44858a127e9500c36a3f'), ('floating-ip-id-b45714b643ba45fc9e08c7ba0c4b64c6', '1.0.9.0', '2.0.9.0', 'port-id-ce13a3ea7e8a4eb89adc44ecabeeaa60')]
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-21fb4edd010b4349b0624f5107509fb5, id=floating-ip-id-605050e24e024929ad285392f57a975c, keys=<MagicMock id='47989109200720'>, port_id=port-id-ca9d3d82ea3e4b719e1ebac87627f104, project_id=project-id-fc41a5c9f1bd47bd80ca63835ac01855, router_id=router-id-d7fd1e35c4594dac92bcc7d968be86c5, status=DOWN, tenant_id=project-id-fc41a5c9f1bd47bd80ca63835ac01855>, <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-f6e3aa0611744f0981cfb044253cf117, id=floating-ip-id-cb67bd561c8247369526f47a3f53df75, keys=<MagicMock id='47988974429456'>, port_id=port-id-7e929c57703b44858a127e9500c36a3f, project_id=project-id-410bbb2fac994759833b2b3f07751d92, router_id=router-id-3b5ebbd8ce0f48c49a71fa563ebe94bb, status=DOWN, tenant_id=project-id-410bbb2fac994759833b2b3f07751d92>, <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-134a053721664a99ae627f3670bebc01, id=floating-ip-id-b45714b643ba45fc9e08c7ba0c4b64c6, keys=<MagicMock id='47988973900688'>, port_id=port-id-ce13a3ea7e8a4eb89adc44ecabeeaa60, project_id=project-id-219c1fddb1544be09e4aa58d065b9d83, router_id=router-id-531880d61bed46dfa53ed5280744b7b4, status=DOWN, tenant_id=project-id-219c1fddb1544be09e4aa58d065b9d83>]
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-134a053721664a99ae627f3670bebc01, id=floating-ip-id-b45714b643ba45fc9e08c7ba0c4b64c6, keys=<MagicMock id='47988973900688'>, port_id=port-id-ce13a3ea7e8a4eb89adc44ecabeeaa60, project_id=project-id-219c1fddb1544be09e4aa58d065b9d83, router_id=router-id-531880d61bed46dfa53ed5280744b7b4, status=DOWN, tenant_id=project-id-219c1fddb1544be09e4aa58d065b9d83>
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-842e05a0b1b245e9b31c8d7d5a57dc7c', 'server-id-3e8bf900483048f285e0791af603eb73', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-842e05a0b1b245e9b31c8d7d5a57dc7c, instance_id=server-id-3e8bf900483048f285e0791af603eb73, 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-67dd737e25734dfa9883608a68f07075', 'floating-ip-id-c5347bb908da417fb7c78756b1e55117', 'port-id-060d443ce99e4a1faebae2c453ca2b8d', 'project-id-8ad7fd3912474d75bf5477edc2534a8c', 'router-id-05a5c2322cdf4216b16ba908761d1e1a', '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-67dd737e25734dfa9883608a68f07075, id=floating-ip-id-c5347bb908da417fb7c78756b1e55117, keys=<MagicMock id='47989088147792'>, port_id=port-id-060d443ce99e4a1faebae2c453ca2b8d, project_id=project-id-8ad7fd3912474d75bf5477edc2534a8c, router_id=router-id-05a5c2322cdf4216b16ba908761d1e1a, status=DOWN, tenant_id=project-id-8ad7fd3912474d75bf5477edc2534a8c>
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-aca6d66c2275474b8d5165912517a383', False, 'network-label-4e118b9062ef40259cfb0d68feed5fb6', None, False, '255.255.255.0', None, None, 'project-id-808a404da37948ab900b71bbb5dbd716', 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-f8e650ad0da94d2a8c4ea55c649ed99b', 'network-name-d2f344d08a134098b5c0c44fca08128f', '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-ac16790a646d479c898bdf595108b47e', 'network-name-85a401c4d2c44c2a90546e77ed4414e4', '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-80ed5cfe1818406280194de4640a1ced', 'network-name-fbe5ba6d2503437ca4ac8da43e26c373', 'a, b'), ('network-id-4c6d4d69f8cd4ecd97f23cd242f10e6b', 'network-name-038ee8ad332e4e369b40bd91780ddeeb', 'a, b'), ('network-id-91093ef7100b4e539e4833256c382bed', 'network-name-232bfbf510724e24b6f441dcbf8eaa09', 'a, b')]
data_long = [('network-id-80ed5cfe1818406280194de4640a1ced', 'network-name-fbe5ba6d2503437ca4ac8da43e26c373', 'ACTIVE', 'project-id-a8cdbfd9436644a1aaee942f655fd02a', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-4c6d4d69f8cd4ecd97f23cd242f10e6b', 'network-name-038ee8ad332e4e369b40bd91780ddeeb', 'ACTIVE', 'project-id-6b5876c029b64d9588119684edb10ddb', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-91093ef7100b4e539e4833256c382bed', 'network-name-232bfbf510724e24b6f441dcbf8eaa09', 'ACTIVE', 'project-id-e11b93bdde2740468fd74522c76dd98c', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-91093ef7100b4e539e4833256c382bed, keys=<MagicMock id='47988973827600'>, name=network-name-232bfbf510724e24b6f441dcbf8eaa09, project_id=project-id-e11b93bdde2740468fd74522c76dd98c, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-e11b93bdde2740468fd74522c76dd98c>
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-c31252378dea40fea4a10ece4a774100', 'network-label-3aebf5cdf1ab41349a73691e42eae9a9', '10.0.0.0/24'), ('network-id-e5c03966701846778128fd64ce6e4da5', 'network-label-a2730d21f9fc48fa9f8a543489d9425e', '10.0.0.0/24'), ('network-id-61ed3f847cb343c2b378bf95bcd0fd7b', 'network-label-2a3c702b74944ef69efecaf1bcc90ea0', '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-61ed3f847cb343c2b378bf95bcd0fd7b, injected=False, keys=<MagicMock id='47989119706448'>, label=network-label-2a3c702b74944ef69efecaf1bcc90ea0, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-f345d5be5c7f4bfb9825f70bc077c6ed, 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-a13b63a792894d849175a45cc87aaf9e', 'network-name-cc0a984f329f4df8a8c86a185ab008ea', 'project-id-a91529402a5442909bd4faba1e973467', '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-4a3c876b57184a9f837abf89e2dda813', False, 'network-label-275064d9c7e74c0c97e6c4f17b0d2f23', None, False, '255.255.255.0', None, None, 'project-id-ececc8e494d14c6d829d640e01e8c538', 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-9a28492ea45f41cf8b9624866e392b50', '', '', 'ovs', 'normal', 'device-id-84f9a69c44114b8793200501152b88fa', 'compute:nova', '', 'dns-name-8ea3bf754b7f4a7d981ba3e7289c4017', '', '', 'port-id-092a9d1abb294615a968fab393425331', 'fa:16:3e:a9:4e:72', 'port-name-66e95de8ef7f4478a98757cd1369a935', 'network-id-30819e9784fe4b06b1b2f9b1f4596978', True, 'project-id-f8fa65e6dc884a46b9818aeb2689633f', '', '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-520aadfd74fc40749a2dd4ff6fa644f9', 'router-name-c21c2fc4a9724eaf89406abf7fa7c791', 'project-id-ac147396813343448c7927d197fceba3')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-520aadfd74fc40749a2dd4ff6fa644f9, keys=<MagicMock id='47988996548752'>, name=router-name-c21c2fc4a9724eaf89406abf7fa7c791, routes=[], status=ACTIVE, tenant_id=project-id-ac147396813343448c7927d197fceba3>
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-fa9ae9af2a854c6eb9e53f47442ebb4d', 'router-name-ee3f76d54b1c4a72b55e96d9752226ae', 'ACTIVE', 'UP', False, False, 'project-id-b4269148b46b46348d65a829d4a1da29'), ('router-id-5d0007d7b7984b70a478b952eae53ead', 'router-name-58c1e97e94a649f7ac22af8f03c9aba0', 'ACTIVE', 'UP', False, False, 'project-id-393615276e684b34b10e9f4997026737'), ('router-id-d1fcb432e84a417b8e60df5beda64fe9', 'router-name-e52b3baf1d1741bf9f986ad9f2f285c8', 'ACTIVE', 'UP', False, False, 'project-id-c7a5d687b9fb42c88a60eb09caa4a328')]
data_long = [('router-id-fa9ae9af2a854c6eb9e53f47442ebb4d', 'router-name-ee3f76d54b1c4a72b55e96d9752226ae', 'ACTIVE', 'UP', False, False, 'project-id-b4269148b46b46348d65a829d4a1da29', [], '{}', ''), ('router-id-5d0007d7b7984b70a478b952eae53ead', 'router-name-58c1e97e94a649f7ac22af8f03c9aba0', 'ACTIVE', 'UP', False, False, 'project-id-393615276e684b34b10e9f4997026737', [], '{}', ''), ('router-id-d1fcb432e84a417b8e60df5beda64fe9', 'router-name-e52b3baf1d1741bf9f986ad9f2f285c8', 'ACTIVE', 'UP', False, False, 'project-id-c7a5d687b9fb42c88a60eb09caa4a328', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-d1fcb432e84a417b8e60df5beda64fe9, keys=<MagicMock id='47989112433488'>, name=router-name-e52b3baf1d1741bf9f986ad9f2f285c8, routes=[], status=ACTIVE, tenant_id=project-id-c7a5d687b9fb42c88a60eb09caa4a328>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-fa9ae9af2a854c6eb9e53f47442ebb4d, keys=<MagicMock id='47989011184976'>, name=router-name-ee3f76d54b1c4a72b55e96d9752226ae, routes=[], status=ACTIVE, tenant_id=project-id-b4269148b46b46348d65a829d4a1da29>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-5d0007d7b7984b70a478b952eae53ead, keys=<MagicMock id='47989109965840'>, name=router-name-58c1e97e94a649f7ac22af8f03c9aba0, routes=[], status=ACTIVE, tenant_id=project-id-393615276e684b34b10e9f4997026737>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-d1fcb432e84a417b8e60df5beda64fe9, keys=<MagicMock id='47989112433488'>, name=router-name-e52b3baf1d1741bf9f986ad9f2f285c8, routes=[], status=ACTIVE, tenant_id=project-id-c7a5d687b9fb42c88a60eb09caa4a328>]
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-674ede24300840258bf98901566e569f', 'router-name-b2c89e8faf584c0fa49b674741f36eb6', 'project-id-39fd6347803f48778c5ab4a8b11732a2')
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-6469cc8bb6f9413482fd1d1dda1c6fe5', 'security-group-name-2abdbeb033c64296b176140814774f63', 'security-group-description-016f0d184c0644b39a7f8714d5ac8f6b'),)
expected_data_all_projects = (('security-group-id-6469cc8bb6f9413482fd1d1dda1c6fe5', 'security-group-name-2abdbeb033c64296b176140814774f63', 'security-group-description-016f0d184c0644b39a7f8714d5ac8f6b', 'project-id-9250e62bb683415790d65ae8d6f125fa'),)
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-02c0a494b25d44ddbe57e56e35fe8036', 'security-group-name-7fdc0b2975aa4b418e4eec59830d2adf', 'security-group-description-20a14eab19d243c997bee4abd8bf9410', 'project-id-4cbfbdf60a9c4ebd8cca3eef4c4aca62'),)
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-ad6d421efe504eacba8e8d7fd7806b1b', 'icmp', '0.0.0.0/0', 'security-group-id-4b4a63d7a3e143b7b159a5c21415bdd3', '', '')
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-d5fd998b2704494982f785c9604c46b1', None, None, 'project-id-c6755fe535cf4026a1dae0e8b84b0de4', None, 'remote-security-group-id-f8c51f41d1e940a7b7a0bd9d88a23066', None, 'security-group-id-b4ae60e076c547b1b7e8efc2602c31d8')
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-395e4f8c37f34a24bfa0991e0d7e7b0e', 'subnet-name-3c703dc8a4444427b3bdb5a8da26925d', 'network-id-d6192e887c884ad2919073cb4905a23c', '10.10.10.0/24'), ('subnet-id-df7764a2e8304e65a6f41019d363952f', 'subnet-name-6db1c88666584e59918cd2b23ab43421', 'network-id-cf50ab8549544858bc72101187bc68cc', '10.10.10.0/24'), ('subnet-id-8fecf178ac384da2a179b49932d030b9', 'subnet-name-59528ee726ea4735a081e3527f8fb8b8', 'network-id-ee33e5f207d745749d41e417dc63dfc7', '10.10.10.0/24')]
data_long = [('subnet-id-395e4f8c37f34a24bfa0991e0d7e7b0e', 'subnet-name-3c703dc8a4444427b3bdb5a8da26925d', 'network-id-d6192e887c884ad2919073cb4905a23c', '10.10.10.0/24', 'project-id-68d3e3caaff34e35a6f58d55f56c7a71', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-df7764a2e8304e65a6f41019d363952f', 'subnet-name-6db1c88666584e59918cd2b23ab43421', 'network-id-cf50ab8549544858bc72101187bc68cc', '10.10.10.0/24', 'project-id-db9eedc24a234a83874baa7e9084b7ad', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-8fecf178ac384da2a179b49932d030b9', 'subnet-name-59528ee726ea4735a081e3527f8fb8b8', 'network-id-ee33e5f207d745749d41e417dc63dfc7', '10.10.10.0/24', 'project-id-7e954612c55b4a05ac4761ddac107aa1', 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-8fecf178ac384da2a179b49932d030b9, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='47989122150864'>, name=subnet-name-59528ee726ea4735a081e3527f8fb8b8, network_id=network-id-ee33e5f207d745749d41e417dc63dfc7, project_id=project-id-7e954612c55b4a05ac4761ddac107aa1, subnetpool_id=None, tenant_id=project-id-7e954612c55b4a05ac4761ddac107aa1>
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-81d15426c1d846f7b6331564dfd1bbc9', '4', 'None', 'None', 'subnet-name-a7c38a6804d14672bbc80ee3c277cdb1', 'network-id-17dbd0c9f75a436c98772c5b74c477c1', 'project-id-36dc8944abef46fe98a638cb42728899', '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-92e72749d7e940ea8e257b2f884dcc59', 'subnet-pool-name-dded54bb54984fbb917ad6f5a7ef1b03', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-eec9b1a40ced41b296f74b3b5bcee129', 'subnet-pool-name-33dcbbcfbb0d4e4b8a667deeaae3dbc2', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-96cdfd0e3fb141e296db658dc04edc34', 'subnet-pool-name-c6e2d2eca66e49459714ebfdd40c6522', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-92e72749d7e940ea8e257b2f884dcc59', 'subnet-pool-name-dded54bb54984fbb917ad6f5a7ef1b03', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-063e939349184eb79e5a9eb0e8dafd0b'), ('subnet-pool-id-eec9b1a40ced41b296f74b3b5bcee129', 'subnet-pool-name-33dcbbcfbb0d4e4b8a667deeaae3dbc2', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-b62a3f3a47944d36aba311c9a5283b20'), ('subnet-pool-id-96cdfd0e3fb141e296db658dc04edc34', 'subnet-pool-name-c6e2d2eca66e49459714ebfdd40c6522', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-2e333d1533d84b69b4c30e78505c84c7')]
pool = <FakeResource address_scope_id=address-scope-id-2e333d1533d84b69b4c30e78505c84c7, default_prefixlen=8, default_quota=None, id=subnet-pool-id-96cdfd0e3fb141e296db658dc04edc34, ip_version=4, is_default=False, keys=<MagicMock id='47988982548944'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-c6e2d2eca66e49459714ebfdd40c6522, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-d50f0eaea9864e608d2e6682925156c8, shared=False, tenant_id=project-id-d50f0eaea9864e608d2e6682925156c8>
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-425c326caac14ac59d5f322b43b75989', 8, None, 'subnet-pool-id-3924b167657f4ea79ed609cf2ae29d6d', 4, False, 32, 8, 'subnet-pool-name-4abb821f491b4eba88d545ee8f881e92', '10.0.0.0/24, 10.1.0.0/24', 'project-id-604ff2f5c70842b7beae730fa927f0b0', 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