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-cc60f8ea36034d9abb591bfccbcd343e, instance_id=server-id-f89a1e1a665142c7a8ee23b2e27b7e15, 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-2f6edd26394f44ab80c5a498c8e06e63, id=floating-ip-id-52df7094ea404c619a61fef50f2c589d, keys=<MagicMock id='140106437034128'>, port_id=port-id-c3a96a59623c4b48b83ed4b70cfa4a34, project_id=project-id-ee5bc9578e5544f8b66cf307b3312faf, router_id=router-id-62d72e72a5e74776961fbd8e0542bdf1, status=DOWN, tenant_id=project-id-ee5bc9578e5544f8b66cf307b3312faf>
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-e6d1122e87fc41d68e5c70dbc569cc65', '1.0.9.0', '2.0.9.0', 'server-id-544f85d3013e4d88a85891022ed7ceaf', 'public'), ('floating-ip-id-a1ca7de380dc4cefb1607b33e5f1e372', '1.0.9.0', '2.0.9.0', 'server-id-0fc338e7e1394f86a8c09ab6a7fc5922', 'public'), ('floating-ip-id-8902dddf89e14735b9b94d41e87958ae', '1.0.9.0', '2.0.9.0', 'server-id-c0554e910aee4e1fa34b38de3c162104', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-e6d1122e87fc41d68e5c70dbc569cc65, instance_id=server-id-544f85d3013e4d88a85891022ed7ceaf, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-a1ca7de380dc4cefb1607b33e5f1e372, instance_id=server-id-0fc338e7e1394f86a8c09ab6a7fc5922, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-8902dddf89e14735b9b94d41e87958ae, instance_id=server-id-c0554e910aee4e1fa34b38de3c162104, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-8902dddf89e14735b9b94d41e87958ae, instance_id=server-id-c0554e910aee4e1fa34b38de3c162104, 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-9cf95af1b86e42d8b9b376368bba533c', '1.0.9.0', '2.0.9.0', 'port-id-ccfccaad4ef44a1e9187479f5a65c035'), ('floating-ip-id-6517c2e57ffb4200abe4d3c5287b6a9d', '1.0.9.0', '2.0.9.0', 'port-id-2dffa49e061a4ead967c73ffb08ae031'), ('floating-ip-id-4d8e9d5d027044e0a57e796773cc92f7', '1.0.9.0', '2.0.9.0', 'port-id-07f050792f8c4660a57f3a686bff1d66')]
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-a33ebf6d83344cd3ab5993ee1710bd40, id=floating-ip-id-9cf95af1b86e42d8b9b376368bba533c, keys=<MagicMock id='140106444831120'>, port_id=port-id-ccfccaad4ef44a1e9187479f5a65c035, project_id=project-id-26d3ed6e6ba24f1d8563cb5261c8fa26, router_id=router-id-678cf2bb21b442508bea6544d53a3556, status=DOWN, tenant_id=project-id-26d3ed6e6ba24f1d8563cb5261c8fa26>, <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-4ab6f73dfb91467dae28048c30ab8eab, id=floating-ip-id-6517c2e57ffb4200abe4d3c5287b6a9d, keys=<MagicMock id='140106441897488'>, port_id=port-id-2dffa49e061a4ead967c73ffb08ae031, project_id=project-id-9b29691cdbd74b589ee6bbe9a388f1e6, router_id=router-id-186197d2f76d496aac20fa1990b59fba, status=DOWN, tenant_id=project-id-9b29691cdbd74b589ee6bbe9a388f1e6>, <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-b2b3878e30054589b98095d691302454, id=floating-ip-id-4d8e9d5d027044e0a57e796773cc92f7, keys=<MagicMock id='140106436907984'>, port_id=port-id-07f050792f8c4660a57f3a686bff1d66, project_id=project-id-45af8227f1a643b9801e6af5bb189023, router_id=router-id-4f52e8e1cfdb419d8a93b84d42077c73, status=DOWN, tenant_id=project-id-45af8227f1a643b9801e6af5bb189023>]
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-b2b3878e30054589b98095d691302454, id=floating-ip-id-4d8e9d5d027044e0a57e796773cc92f7, keys=<MagicMock id='140106436907984'>, port_id=port-id-07f050792f8c4660a57f3a686bff1d66, project_id=project-id-45af8227f1a643b9801e6af5bb189023, router_id=router-id-4f52e8e1cfdb419d8a93b84d42077c73, status=DOWN, tenant_id=project-id-45af8227f1a643b9801e6af5bb189023>
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-61d3a12732384f5d80979a1ec570dd18', 'server-id-734def179f0f4f0ba7e952977ac44344', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-61d3a12732384f5d80979a1ec570dd18, instance_id=server-id-734def179f0f4f0ba7e952977ac44344, 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-d0032ffa5d4940d1bcba3100800c148e', 'floating-ip-id-4e798252aa864c6a86a05f002971bdbd', 'port-id-6481713210e24559bc3bac86bfc3e99d', 'project-id-ed63e16b42084b7e80de9c0743236dd5', 'router-id-193182731ff14c9795addead8591fbe3', '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-d0032ffa5d4940d1bcba3100800c148e, id=floating-ip-id-4e798252aa864c6a86a05f002971bdbd, keys=<MagicMock id='140106437036112'>, port_id=port-id-6481713210e24559bc3bac86bfc3e99d, project_id=project-id-ed63e16b42084b7e80de9c0743236dd5, router_id=router-id-193182731ff14c9795addead8591fbe3, status=DOWN, tenant_id=project-id-ed63e16b42084b7e80de9c0743236dd5>
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-29ade7ab04f549aa847fc27b0f290a06', False, 'network-label-b464689019894bacacd99e27770585d3', None, False, '255.255.255.0', None, None, 'project-id-04944f40927d46e5aa35c68c41089c92', 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-904d630e94b34415860e0c659b2ec4d9', 'network-name-da3fad7124e04feb92ee63ce8b1a5bf8', '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-871e49e2a2004d43bdbc8643a8771e3b', 'network-name-36a60e1e646c44159fd11419b993b9a8', '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-64e91bdee42f47318c14909e56217e47', 'network-name-0d58894a652f4e3baa69bc99bb93cd3a', 'a, b'), ('network-id-662339be6a264f2fa83c757183b1d6f3', 'network-name-d05db5dead1446d091c9e35efb4b7e55', 'a, b'), ('network-id-909dd8ef73e84b42b72a13c0020ce4ff', 'network-name-42859a3ae55a40308ad411cba0ad0def', 'a, b')]
data_long = [('network-id-64e91bdee42f47318c14909e56217e47', 'network-name-0d58894a652f4e3baa69bc99bb93cd3a', 'ACTIVE', 'project-id-1cbb477b64724751ba354739c05a5de5', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-662339be6a264f2fa83c757183b1d6f3', 'network-name-d05db5dead1446d091c9e35efb4b7e55', 'ACTIVE', 'project-id-71df7e047fa54851be4ff61e2bbc976c', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-909dd8ef73e84b42b72a13c0020ce4ff', 'network-name-42859a3ae55a40308ad411cba0ad0def', 'ACTIVE', 'project-id-0862f8b93ad54f05b6780227a05971e7', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-909dd8ef73e84b42b72a13c0020ce4ff, keys=<MagicMock id='140106445185424'>, name=network-name-42859a3ae55a40308ad411cba0ad0def, project_id=project-id-0862f8b93ad54f05b6780227a05971e7, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-0862f8b93ad54f05b6780227a05971e7>
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-34096e6cfe904bfbaa1876a0d90791fa', 'network-label-9fe272c0203b41cbab6be31ff9a569d7', '10.0.0.0/24'), ('network-id-098133c602634304958a33c06ab58151', 'network-label-a8a0aec0420d4e07bd9c47c66b415f27', '10.0.0.0/24'), ('network-id-573e4b0793534e81b10eb2b39117b81e', 'network-label-ef265c64a2dd4e1390c98511e053f2cb', '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-573e4b0793534e81b10eb2b39117b81e, injected=False, keys=<MagicMock id='140106425982224'>, label=network-label-ef265c64a2dd4e1390c98511e053f2cb, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-4668784181124e86a64d8ca86aa4c48d, 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-de13c019b6e34655b9e3366293e0e42d', 'network-name-e25837313ec64356b9e5d78d0c061fd3', 'project-id-7779844defbe4fed8d1a401bab5596f7', '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-76c13d466d9240768a36fc6cc3b2c5ab', False, 'network-label-d88f60c2d242488eb181d9ce29a61a0a', None, False, '255.255.255.0', None, None, 'project-id-feb3b1f8880d4f94810686ff3f921b4d', 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-27947b284d974a5c9fa0189d6a3793dd', '', '', 'ovs', 'normal', 'device-id-6b0b72884d014f21ae82b1b62a85e278', 'compute:nova', '', 'dns-name-ce074f177f964b47ada1295ab320160d', '', '', 'port-id-728b6f45d20649c68253176b15612aae', 'fa:16:3e:a9:4e:72', 'port-name-0ebe4263b5ef4b4396122a3e5911a49a', 'network-id-2b71767a9291402b97faad69e61deeb9', True, 'project-id-4337c20340c44726988ecdea2b6a6cd0', '', '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-bb0239e22fc34e199088188be940fd25', 'router-name-175efb5842f84562b835d44d912be79c', 'project-id-211eaad37ce34421867ca37de99e3a60')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-bb0239e22fc34e199088188be940fd25, keys=<MagicMock id='140106540160848'>, name=router-name-175efb5842f84562b835d44d912be79c, routes=[], status=ACTIVE, tenant_id=project-id-211eaad37ce34421867ca37de99e3a60>
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-91f31f6dc4a74f77a890e20ff2cb5768', 'router-name-e76004c1ea54482ea3f6dde5d9cfd551', 'ACTIVE', 'UP', False, False, 'project-id-a922435e0afd46e2ba2760bcf829fa26'), ('router-id-ea0e8fda3bba4af9bccbda88e7c76c9c', 'router-name-a0935b92e5544c589966f1df04e37902', 'ACTIVE', 'UP', False, False, 'project-id-8b922d3fa0424a409319b158db3c4939'), ('router-id-1975d8b82fc94f9d924c927c26e8b7ad', 'router-name-c73f8178e20d4135a38bd68dfbea2bc9', 'ACTIVE', 'UP', False, False, 'project-id-f372e4fc89c3462093bd586b1622ed8f')]
data_long = [('router-id-91f31f6dc4a74f77a890e20ff2cb5768', 'router-name-e76004c1ea54482ea3f6dde5d9cfd551', 'ACTIVE', 'UP', False, False, 'project-id-a922435e0afd46e2ba2760bcf829fa26', [], '{}', ''), ('router-id-ea0e8fda3bba4af9bccbda88e7c76c9c', 'router-name-a0935b92e5544c589966f1df04e37902', 'ACTIVE', 'UP', False, False, 'project-id-8b922d3fa0424a409319b158db3c4939', [], '{}', ''), ('router-id-1975d8b82fc94f9d924c927c26e8b7ad', 'router-name-c73f8178e20d4135a38bd68dfbea2bc9', 'ACTIVE', 'UP', False, False, 'project-id-f372e4fc89c3462093bd586b1622ed8f', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-1975d8b82fc94f9d924c927c26e8b7ad, keys=<MagicMock id='140106445121616'>, name=router-name-c73f8178e20d4135a38bd68dfbea2bc9, routes=[], status=ACTIVE, tenant_id=project-id-f372e4fc89c3462093bd586b1622ed8f>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-91f31f6dc4a74f77a890e20ff2cb5768, keys=<MagicMock id='140106546660752'>, name=router-name-e76004c1ea54482ea3f6dde5d9cfd551, routes=[], status=ACTIVE, tenant_id=project-id-a922435e0afd46e2ba2760bcf829fa26>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-ea0e8fda3bba4af9bccbda88e7c76c9c, keys=<MagicMock id='140106572361680'>, name=router-name-a0935b92e5544c589966f1df04e37902, routes=[], status=ACTIVE, tenant_id=project-id-8b922d3fa0424a409319b158db3c4939>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-1975d8b82fc94f9d924c927c26e8b7ad, keys=<MagicMock id='140106445121616'>, name=router-name-c73f8178e20d4135a38bd68dfbea2bc9, routes=[], status=ACTIVE, tenant_id=project-id-f372e4fc89c3462093bd586b1622ed8f>]
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-399a6c15432745ad88ba766b6ce3584b', 'router-name-bf4151cc0f71441b9c50aca85dd76485', 'project-id-85801278439e4e48a0013a0fdfac38ec')
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-13ba17cdf2684504b17c824ac0846b36', 'security-group-name-cb6fbc4dc5cd405a95babefca62d1b00', 'security-group-description-5f47c2e5de1248d283522d97e92c9043'),)
expected_data_all_projects = (('security-group-id-13ba17cdf2684504b17c824ac0846b36', 'security-group-name-cb6fbc4dc5cd405a95babefca62d1b00', 'security-group-description-5f47c2e5de1248d283522d97e92c9043', 'project-id-90c8b3cf50ac4d22b08c1daf0c2a23e8'),)
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-c0096794120441a79720fd4fd97890c1', 'security-group-name-415f40f3e51f43079b23667ee15fd86f', 'security-group-description-892aa820bed84b24b6782e6f6884817f', 'project-id-871b502c7ae44c6d904d182f894150bc'),)
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-adbf338b11aa447bbad8f1e145486ecc', 'icmp', '0.0.0.0/0', 'security-group-id-65d0c19009174ad1a5b8250f71203a5a', '', '')
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-ef71451ddd3541ecb8566cf401483a6b', None, None, 'project-id-adb3438a010e4d3c893037ab1ada29ca', None, 'remote-security-group-id-07cacc7d38814ffe9010dfe55d989ead', None, 'security-group-id-68d6f83b6c8f4b0db66652afebb16160')
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-0a310ed4e8e04357b5f9c7c4488e66a7', 'subnet-name-b03556be59dc42f992df0e95ff9d39aa', 'network-id-d5a9a9e01f594974827ab424f340bb8b', '10.10.10.0/24'), ('subnet-id-56a8b76e41eb4f9f81d7ea04bb94cc34', 'subnet-name-8b3ed312bd854423b62371796bf751d7', 'network-id-3b152fd0384c4163bc3467e33c5bcf4a', '10.10.10.0/24'), ('subnet-id-4ef3d42a9ebe437ea9480dc5c7302d0f', 'subnet-name-67ca4b55f0774ee0a3838b136d475058', 'network-id-1cb3f8c7c18647c79f3021da23cddd68', '10.10.10.0/24')]
data_long = [('subnet-id-0a310ed4e8e04357b5f9c7c4488e66a7', 'subnet-name-b03556be59dc42f992df0e95ff9d39aa', 'network-id-d5a9a9e01f594974827ab424f340bb8b', '10.10.10.0/24', 'project-id-31c209ca44f24450ae2c686e60627712', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-56a8b76e41eb4f9f81d7ea04bb94cc34', 'subnet-name-8b3ed312bd854423b62371796bf751d7', 'network-id-3b152fd0384c4163bc3467e33c5bcf4a', '10.10.10.0/24', 'project-id-618814944a7949e7b92725a62f64f5c1', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-4ef3d42a9ebe437ea9480dc5c7302d0f', 'subnet-name-67ca4b55f0774ee0a3838b136d475058', 'network-id-1cb3f8c7c18647c79f3021da23cddd68', '10.10.10.0/24', 'project-id-90002b961336429b9406fef0c7a63eb4', 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-4ef3d42a9ebe437ea9480dc5c7302d0f, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='140106419916560'>, name=subnet-name-67ca4b55f0774ee0a3838b136d475058, network_id=network-id-1cb3f8c7c18647c79f3021da23cddd68, project_id=project-id-90002b961336429b9406fef0c7a63eb4, subnetpool_id=None, tenant_id=project-id-90002b961336429b9406fef0c7a63eb4>
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-aec07c2eb19a4b939eca174394c6e338', '4', 'None', 'None', 'subnet-name-aa0f511249154518aad45bdd8e815b3c', 'network-id-5445fd619f45463db0956fe49111c9a0', 'project-id-1504b076ffc34c1bbc94f76b5fe0b181', '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-3a3ee403b8ae4e2cb15b964aecb67850', 'subnet-pool-name-3a00e07414894e9fbb35111fd8be10f1', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-c1dedf5148f24d1b9263b4cd13779f5d', 'subnet-pool-name-078856689c124817ab6b929e5daf2413', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-991856ec6886468896c177705c7b3508', 'subnet-pool-name-35b6167ef48841b58654f41bad21b139', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-3a3ee403b8ae4e2cb15b964aecb67850', 'subnet-pool-name-3a00e07414894e9fbb35111fd8be10f1', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-3a8139342c6f408db93105c62f879357'), ('subnet-pool-id-c1dedf5148f24d1b9263b4cd13779f5d', 'subnet-pool-name-078856689c124817ab6b929e5daf2413', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-9c7e4c5b31b24197af55fd081222b11c'), ('subnet-pool-id-991856ec6886468896c177705c7b3508', 'subnet-pool-name-35b6167ef48841b58654f41bad21b139', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-b39cf21f0aa24829a28766d9a9936a38')]
pool = <FakeResource address_scope_id=address-scope-id-b39cf21f0aa24829a28766d9a9936a38, default_prefixlen=8, default_quota=None, id=subnet-pool-id-991856ec6886468896c177705c7b3508, ip_version=4, is_default=False, keys=<MagicMock id='140106423381712'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-35b6167ef48841b58654f41bad21b139, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-42653182fb1e4e07a20db563875284fa, shared=False, tenant_id=project-id-42653182fb1e4e07a20db563875284fa>
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-18c720d3f021457b93e6a370f1490b3c', 8, None, 'subnet-pool-id-dd6ac7edcd4c4f0e9b63dd1e2a623a18', 4, False, 32, 8, 'subnet-pool-name-1e63070497264b268b6636d82026ad7e', '10.0.0.0/24, 10.1.0.0/24', 'project-id-74efda6d4e8c48539d7152d19a0ac964', 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