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-7f12d20a22504446afa0a83cbc07d42c, instance_id=server-id-3970e77149ad4a9f876f4a0807fbe7c6, 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-1f43d4536c1f4f4a93d738569c554d1c, id=floating-ip-id-8dcf91cb5edb4aa1994c8ac03c685d7f, keys=<MagicMock id='140299292097936'>, port_id=port-id-cb07a7d5e83446049f342550f294113f, project_id=project-id-8d015538ca1a4c71905c04ab5a210010, router_id=router-id-2117bcff0030499791abbde8c2fa5097, status=DOWN, tenant_id=project-id-8d015538ca1a4c71905c04ab5a210010>
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-6c1f47671049488c8db3f5050117611f', '1.0.9.0', '2.0.9.0', 'server-id-98eaa03a45ef42009721ca282baec7e2', 'public'), ('floating-ip-id-391b4ebb3f3e48b9893b01e91fdd8254', '1.0.9.0', '2.0.9.0', 'server-id-f66085c279e54e06aef7c4076c140af2', 'public'), ('floating-ip-id-d3e67484beff46139f4cdfee8a1daeac', '1.0.9.0', '2.0.9.0', 'server-id-64e7aa4e5bef4f8798bb11c04eedb85c', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-6c1f47671049488c8db3f5050117611f, instance_id=server-id-98eaa03a45ef42009721ca282baec7e2, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-391b4ebb3f3e48b9893b01e91fdd8254, instance_id=server-id-f66085c279e54e06aef7c4076c140af2, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-d3e67484beff46139f4cdfee8a1daeac, instance_id=server-id-64e7aa4e5bef4f8798bb11c04eedb85c, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-d3e67484beff46139f4cdfee8a1daeac, instance_id=server-id-64e7aa4e5bef4f8798bb11c04eedb85c, 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-2e53504f29c54267bf6a68fe61bc2fad', '1.0.9.0', '2.0.9.0', 'port-id-f8e91b9d7fec4ce6ac546e1f890264d3'), ('floating-ip-id-98b1851db98546acbf5343e83329cdd3', '1.0.9.0', '2.0.9.0', 'port-id-27e19152db244964ad99e4a3cb9fdc49'), ('floating-ip-id-8c10db17ecaa4801b9d3ea1ab6d64508', '1.0.9.0', '2.0.9.0', 'port-id-2ccaa81b3ec54c97a4697c0da9ea09f3')]
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-a3ee6b99d9be4d4e9a97abe1b45f5f68, id=floating-ip-id-2e53504f29c54267bf6a68fe61bc2fad, keys=<MagicMock id='140299196599440'>, port_id=port-id-f8e91b9d7fec4ce6ac546e1f890264d3, project_id=project-id-b5becd72cbae448abc510899b48d74d1, router_id=router-id-f643645b2ade4bf698f5ace34f714e35, status=DOWN, tenant_id=project-id-b5becd72cbae448abc510899b48d74d1>, <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-55b1b38ea2ad441e8c9ad03f566e1072, id=floating-ip-id-98b1851db98546acbf5343e83329cdd3, keys=<MagicMock id='140299194124752'>, port_id=port-id-27e19152db244964ad99e4a3cb9fdc49, project_id=project-id-7b683c7ab3ee4d68ab56f8e1b53331ab, router_id=router-id-5bd259359b38466ab27e8d8cdcdcbe69, status=DOWN, tenant_id=project-id-7b683c7ab3ee4d68ab56f8e1b53331ab>, <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-734934e7b9f848a2b332b35fef1b953d, id=floating-ip-id-8c10db17ecaa4801b9d3ea1ab6d64508, keys=<MagicMock id='140299277460048'>, port_id=port-id-2ccaa81b3ec54c97a4697c0da9ea09f3, project_id=project-id-97222542631146219d85497bf08df7c0, router_id=router-id-83ac6f866fa1457c8a5cc2d45726ed33, status=DOWN, tenant_id=project-id-97222542631146219d85497bf08df7c0>]
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-734934e7b9f848a2b332b35fef1b953d, id=floating-ip-id-8c10db17ecaa4801b9d3ea1ab6d64508, keys=<MagicMock id='140299277460048'>, port_id=port-id-2ccaa81b3ec54c97a4697c0da9ea09f3, project_id=project-id-97222542631146219d85497bf08df7c0, router_id=router-id-83ac6f866fa1457c8a5cc2d45726ed33, status=DOWN, tenant_id=project-id-97222542631146219d85497bf08df7c0>
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-fe566acc9dad455d9702d2ebdf795a7b', 'server-id-ba70d7b0fda047ae96be199d91a78874', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-fe566acc9dad455d9702d2ebdf795a7b, instance_id=server-id-ba70d7b0fda047ae96be199d91a78874, 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-9e6835a9b92c4b3ea2e4d2b261d2b2c4', 'floating-ip-id-718662911d5340448a8d7db887457dd8', 'port-id-f8766989364345578ac13fdabffc42ec', 'project-id-542145e0314148bd862e464d30adb8e0', 'router-id-81004aa47aec4f7daeed38d25bc19241', '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-9e6835a9b92c4b3ea2e4d2b261d2b2c4, id=floating-ip-id-718662911d5340448a8d7db887457dd8, keys=<MagicMock id='140299202192784'>, port_id=port-id-f8766989364345578ac13fdabffc42ec, project_id=project-id-542145e0314148bd862e464d30adb8e0, router_id=router-id-81004aa47aec4f7daeed38d25bc19241, status=DOWN, tenant_id=project-id-542145e0314148bd862e464d30adb8e0>
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-2c426c59be1141be849228d8321d9d73', False, 'network-label-b6ec7df26f5d4547a60372215c85c2b6', None, False, '255.255.255.0', None, None, 'project-id-32e47db09bad482ba420d840782a5dbb', 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-eb8af42da5824938a0225d5c10d0ef34', 'network-name-49e8adc8909948e8aeb625d42df73150', '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-805c363b93df4fba998ca0a519deb827', 'network-name-ee869bf86b10441cbec0cf96ce03005e', '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-d79592900b5647cf8f52d895dc73e439', 'network-name-bf3f77e99d5043118a88f2ca844ab161', 'a, b'), ('network-id-0c891c3abcea403f93a295d03e2ccc93', 'network-name-cd2b775bf02e4567bc2d59fb7dd8a21c', 'a, b'), ('network-id-50e561b1e39441b3a55b7e3695017ca1', 'network-name-542188a38b334db68fd8175d887f6378', 'a, b')]
data_long = [('network-id-d79592900b5647cf8f52d895dc73e439', 'network-name-bf3f77e99d5043118a88f2ca844ab161', 'ACTIVE', 'project-id-b341e190817942edaf1ac44b2cd9eb10', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-0c891c3abcea403f93a295d03e2ccc93', 'network-name-cd2b775bf02e4567bc2d59fb7dd8a21c', 'ACTIVE', 'project-id-0d558f9e06264752bccccb794398f1b9', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-50e561b1e39441b3a55b7e3695017ca1', 'network-name-542188a38b334db68fd8175d887f6378', 'ACTIVE', 'project-id-0e2b4d0819e241d8acda6387746af932', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-50e561b1e39441b3a55b7e3695017ca1, keys=<MagicMock id='140299326879376'>, name=network-name-542188a38b334db68fd8175d887f6378, project_id=project-id-0e2b4d0819e241d8acda6387746af932, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-0e2b4d0819e241d8acda6387746af932>
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-9bb00c6f889d4cdf9c7ff4c44b48eeb8', 'network-label-d5e68f1974914306b943a344d6dbca4a', '10.0.0.0/24'), ('network-id-7df56428c69c4b978ce9a3112d2e3db3', 'network-label-350d9fb1e93d407bb687e81045e0f712', '10.0.0.0/24'), ('network-id-f35019e02a854659883f0d4c41709202', 'network-label-2c1d1695125d4a038bb33d95f8815729', '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-f35019e02a854659883f0d4c41709202, injected=False, keys=<MagicMock id='140299276886416'>, label=network-label-2c1d1695125d4a038bb33d95f8815729, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-b17aee3db3614b8f8b76379af20108ab, 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-bb7eae789ff3405f875d1d49e1cd01e4', 'network-name-dc8a8c0b9f084de78a9c0d99a2214243', 'project-id-36eb60c19b5c42bca168c93f8a085813', '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-5e60398defd74ac0b9a814f057786e0e', False, 'network-label-7d5b7b8a17f54608a850ca35cadfac25', None, False, '255.255.255.0', None, None, 'project-id-e3ba425a3f6b420aa48153e19881db7d', 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-034911e9918c417cbcc06f13d15f48e2', '', '', 'ovs', 'normal', 'device-id-182ea3484423446fb485808937fa0441', 'compute:nova', '', 'dns-name-4e99a5710e3e43609c1975c6c8f11967', '', '', 'port-id-a43670986a034863a172799391870eed', 'fa:16:3e:a9:4e:72', 'port-name-854ecb042e1d457c88dc2f894d2254c3', 'network-id-2fb694580de141819f7c9cdb6638290e', True, 'project-id-db7aa9f783794b26af5950cb57304401', '', '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-9539e02b69f5473f90ee513a7bd2b7f2', 'router-name-18ba2ca92acc44ddb7c5863d6ce17265', 'project-id-c851d05b05b04fc1aa71209edaa35993')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-9539e02b69f5473f90ee513a7bd2b7f2, keys=<MagicMock id='140299214570640'>, name=router-name-18ba2ca92acc44ddb7c5863d6ce17265, routes=[], status=ACTIVE, tenant_id=project-id-c851d05b05b04fc1aa71209edaa35993>
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-7069d503ff314e65a2681cd55d3d065d', 'router-name-f53f9d92df1545aea5ad16dab57ef79d', 'ACTIVE', 'UP', False, False, 'project-id-43ad9614ba594e62b3630652d3bb1435'), ('router-id-a5f6a38588864a80873d850ee9b5417a', 'router-name-dbe897aa7fee4f3b93d05769e7307037', 'ACTIVE', 'UP', False, False, 'project-id-7882956a2bfc433f90fb748bbc70e742'), ('router-id-269018a91e974e9cb62b74e1f436da33', 'router-name-c2574628e6c84e418df83d198ad26d62', 'ACTIVE', 'UP', False, False, 'project-id-9dbe602613c94a199dbcd3970327806c')]
data_long = [('router-id-7069d503ff314e65a2681cd55d3d065d', 'router-name-f53f9d92df1545aea5ad16dab57ef79d', 'ACTIVE', 'UP', False, False, 'project-id-43ad9614ba594e62b3630652d3bb1435', [], '{}', ''), ('router-id-a5f6a38588864a80873d850ee9b5417a', 'router-name-dbe897aa7fee4f3b93d05769e7307037', 'ACTIVE', 'UP', False, False, 'project-id-7882956a2bfc433f90fb748bbc70e742', [], '{}', ''), ('router-id-269018a91e974e9cb62b74e1f436da33', 'router-name-c2574628e6c84e418df83d198ad26d62', 'ACTIVE', 'UP', False, False, 'project-id-9dbe602613c94a199dbcd3970327806c', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-269018a91e974e9cb62b74e1f436da33, keys=<MagicMock id='140299211819920'>, name=router-name-c2574628e6c84e418df83d198ad26d62, routes=[], status=ACTIVE, tenant_id=project-id-9dbe602613c94a199dbcd3970327806c>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-7069d503ff314e65a2681cd55d3d065d, keys=<MagicMock id='140299322328656'>, name=router-name-f53f9d92df1545aea5ad16dab57ef79d, routes=[], status=ACTIVE, tenant_id=project-id-43ad9614ba594e62b3630652d3bb1435>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-a5f6a38588864a80873d850ee9b5417a, keys=<MagicMock id='140299212410832'>, name=router-name-dbe897aa7fee4f3b93d05769e7307037, routes=[], status=ACTIVE, tenant_id=project-id-7882956a2bfc433f90fb748bbc70e742>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-269018a91e974e9cb62b74e1f436da33, keys=<MagicMock id='140299211819920'>, name=router-name-c2574628e6c84e418df83d198ad26d62, routes=[], status=ACTIVE, tenant_id=project-id-9dbe602613c94a199dbcd3970327806c>]
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-5fdb8fc44ac54a249ae4cc4d30056d70', 'router-name-84f9caf9eee94d3b8ef0f192ea7965eb', 'project-id-712a9fe63e764dd1af1216147589f434')
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-b8eb6bc4288346028bf00653370dbdbb', 'security-group-name-8bb5a6abc84746e89da9e725808a0e74', 'security-group-description-a10608c7ce0f4e99b9ceee9080d4e0b7'),)
expected_data_all_projects = (('security-group-id-b8eb6bc4288346028bf00653370dbdbb', 'security-group-name-8bb5a6abc84746e89da9e725808a0e74', 'security-group-description-a10608c7ce0f4e99b9ceee9080d4e0b7', 'project-id-facbecfe21d24bfda269014763269199'),)
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-e044d516f2b54151886a04889f0fe469', 'security-group-name-3884399bd14743c987bb44c3ec76b23a', 'security-group-description-0ffbedd85ed149b7bae2c1a10221d75c', 'project-id-4c146d7f36b94db2a91863d882313e98'),)
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-f36c274313324ae688391bd1b464ba6a', 'icmp', '0.0.0.0/0', 'security-group-id-e8b8fd20a5c143398a2801fc3db0121c', '', '')
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-007652974ef44c41a9a290b813242602', None, None, 'project-id-d357544328a54efab22c2c6fb3988b51', None, 'remote-security-group-id-399acf84607842798bfa5a6ff8405845', None, 'security-group-id-cd9b1871ce644ad5b7b5bd7163971e66')
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-6065430116b34df0bd9ff82f94841226', 'subnet-name-9e5a89f110c64759b45ebef2d03ec022', 'network-id-6788a61027c04b8589d0f4afcc9f364b', '10.10.10.0/24'), ('subnet-id-0a9adde14a55424eb4b7acbd44ecda8f', 'subnet-name-01b545f8b7f441f28984b1a2ae1791b4', 'network-id-e283b2561451475282b9d2ac33212b1b', '10.10.10.0/24'), ('subnet-id-673f45701cf9469186782b4be38995fe', 'subnet-name-3e8cd66d734f4044b784ff96926efc20', 'network-id-d94b9a6ead75447abd7fd1d84dc21668', '10.10.10.0/24')]
data_long = [('subnet-id-6065430116b34df0bd9ff82f94841226', 'subnet-name-9e5a89f110c64759b45ebef2d03ec022', 'network-id-6788a61027c04b8589d0f4afcc9f364b', '10.10.10.0/24', 'project-id-b6da00adf5e34ee69058c32f485a5366', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-0a9adde14a55424eb4b7acbd44ecda8f', 'subnet-name-01b545f8b7f441f28984b1a2ae1791b4', 'network-id-e283b2561451475282b9d2ac33212b1b', '10.10.10.0/24', 'project-id-01666c2f86084b98bbddeb0158ed6002', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-673f45701cf9469186782b4be38995fe', 'subnet-name-3e8cd66d734f4044b784ff96926efc20', 'network-id-d94b9a6ead75447abd7fd1d84dc21668', '10.10.10.0/24', 'project-id-9c8afadb5c6b465bbaa9ab3d2493bbc6', 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-673f45701cf9469186782b4be38995fe, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='140299178369296'>, name=subnet-name-3e8cd66d734f4044b784ff96926efc20, network_id=network-id-d94b9a6ead75447abd7fd1d84dc21668, project_id=project-id-9c8afadb5c6b465bbaa9ab3d2493bbc6, subnetpool_id=None, tenant_id=project-id-9c8afadb5c6b465bbaa9ab3d2493bbc6>
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-a2897eb81a5243f8b6d9b23e1e6d3a6e', '4', 'None', 'None', 'subnet-name-59152818f38b4b148a5fe5351117984b', 'network-id-9300f5cebf66425ea05bed92351e1c22', 'project-id-d2d1055bf1fa45509c68ed8fb7a7f9e7', '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-9e976749b0f44377ac2894d248a9e6c3', 'subnet-pool-name-21c016a6a60a4020b59b226467b32e88', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-2e44469b170a46a5b95231550d62c775', 'subnet-pool-name-e861dfb817474b38ab741eabb0f272ce', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-fdb20d204d1f463d8146d01d24977ea9', 'subnet-pool-name-b6a162780eec46c5877d90f9f63a17b0', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-9e976749b0f44377ac2894d248a9e6c3', 'subnet-pool-name-21c016a6a60a4020b59b226467b32e88', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-80ea9226b4484717821afe08af262655'), ('subnet-pool-id-2e44469b170a46a5b95231550d62c775', 'subnet-pool-name-e861dfb817474b38ab741eabb0f272ce', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-a8f49f35d0704fbe824ba881ffacf329'), ('subnet-pool-id-fdb20d204d1f463d8146d01d24977ea9', 'subnet-pool-name-b6a162780eec46c5877d90f9f63a17b0', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-a20e0b6c9af14a7ca7017214cc0ff94a')]
pool = <FakeResource address_scope_id=address-scope-id-a20e0b6c9af14a7ca7017214cc0ff94a, default_prefixlen=8, default_quota=None, id=subnet-pool-id-fdb20d204d1f463d8146d01d24977ea9, ip_version=4, is_default=False, keys=<MagicMock id='140299295109328'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-b6a162780eec46c5877d90f9f63a17b0, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-2077215d7cfd4da1a18028c941053d60, shared=False, tenant_id=project-id-2077215d7cfd4da1a18028c941053d60>
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-f3c7be32ee65412d9b0f65bc02b47a2e', 8, None, 'subnet-pool-id-77bed0f75a6f44f0806bbc78b1eabdec', 4, False, 32, 8, 'subnet-pool-name-e69d288b99514f54b2cf0656edfecea6', '10.0.0.0/24, 10.1.0.0/24', 'project-id-cf45acd4e1e54efab7154ee4db0af034', 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