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-27068e84979b4b74b6a794d2fc326252, instance_id=server-id-37de780631ee4e81b96e7851a96c7ba3, 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-b5caa596f00a4d74877859aebc69d74d, id=floating-ip-id-87fafde0bc14496aa1c8bcb3571b9d49, keys=<MagicMock id='140076679683024'>, port_id=port-id-18a583c0f90346afbb1070fc4a77bfd6, project_id=project-id-d4bc906c8f814a02934ce2948f142eca, router_id=router-id-3670a50e5c5246f0b1c93f5fe5e42ad4, status=DOWN, tenant_id=project-id-d4bc906c8f814a02934ce2948f142eca>
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-97544ee8da5d47ba92687d1b442a00f7', '1.0.9.0', '2.0.9.0', 'server-id-7af15bd8b17f404b9c7d4388d9050b93', 'public'), ('floating-ip-id-2285064d3f7942d1b4577df4d67d35d7', '1.0.9.0', '2.0.9.0', 'server-id-70b9179838134f8cae336dceb7809cbd', 'public'), ('floating-ip-id-0ad5f9b3ded1441ea49b8547b564b702', '1.0.9.0', '2.0.9.0', 'server-id-6dc5004364b144f0917dd144d32618df', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-97544ee8da5d47ba92687d1b442a00f7, instance_id=server-id-7af15bd8b17f404b9c7d4388d9050b93, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-2285064d3f7942d1b4577df4d67d35d7, instance_id=server-id-70b9179838134f8cae336dceb7809cbd, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-0ad5f9b3ded1441ea49b8547b564b702, instance_id=server-id-6dc5004364b144f0917dd144d32618df, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-0ad5f9b3ded1441ea49b8547b564b702, instance_id=server-id-6dc5004364b144f0917dd144d32618df, 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-53fe3eb011db48fd9419d0984e991dcb', '1.0.9.0', '2.0.9.0', 'port-id-5c425a7c82de407abc69a4610f2ec34b'), ('floating-ip-id-8561ce8bcc6b4542b7dbbce74e8571ab', '1.0.9.0', '2.0.9.0', 'port-id-c310b8afd32c41aa886a17c824551dcb'), ('floating-ip-id-957950790923420e890c514740e82c13', '1.0.9.0', '2.0.9.0', 'port-id-01dadfb35f65415e92d1da59363ed6f6')]
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-d421ee5baaa54d9ebf6d8f88243ccb39, id=floating-ip-id-53fe3eb011db48fd9419d0984e991dcb, keys=<MagicMock id='140076676595792'>, port_id=port-id-5c425a7c82de407abc69a4610f2ec34b, project_id=project-id-f3dd69713841444a840b034519dd05ce, router_id=router-id-6f07f65010c448d49f6526d89a991d80, status=DOWN, tenant_id=project-id-f3dd69713841444a840b034519dd05ce>, <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-159cc1580afa4681bfd5f47af33db43f, id=floating-ip-id-8561ce8bcc6b4542b7dbbce74e8571ab, keys=<MagicMock id='140076674231312'>, port_id=port-id-c310b8afd32c41aa886a17c824551dcb, project_id=project-id-a52e4b8238c34afea40185fec892a779, router_id=router-id-df4f9e7eaedf465090f009dbd9b8a07d, status=DOWN, tenant_id=project-id-a52e4b8238c34afea40185fec892a779>, <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-caa266da8d604c7f9ddbd1a36f04e31f, id=floating-ip-id-957950790923420e890c514740e82c13, keys=<MagicMock id='140076680244176'>, port_id=port-id-01dadfb35f65415e92d1da59363ed6f6, project_id=project-id-32b46ac263a3437ba27166485350447a, router_id=router-id-c6ba79be77e1497a9ae89c09ab276f51, status=DOWN, tenant_id=project-id-32b46ac263a3437ba27166485350447a>]
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-caa266da8d604c7f9ddbd1a36f04e31f, id=floating-ip-id-957950790923420e890c514740e82c13, keys=<MagicMock id='140076680244176'>, port_id=port-id-01dadfb35f65415e92d1da59363ed6f6, project_id=project-id-32b46ac263a3437ba27166485350447a, router_id=router-id-c6ba79be77e1497a9ae89c09ab276f51, status=DOWN, tenant_id=project-id-32b46ac263a3437ba27166485350447a>
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-f6ae575f4b464f2184c1c7a193a988d4', 'server-id-167f040854bc486298c460759e9b0cd6', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-f6ae575f4b464f2184c1c7a193a988d4, instance_id=server-id-167f040854bc486298c460759e9b0cd6, 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-3aecc7f25b7645779d19aff248210f01', 'floating-ip-id-8cdabd2183fc43b3819e926a9f70eb40', 'port-id-7e9a0f976d854307bac9c870c514faca', 'project-id-2cda17855a60465c8d03237f123a3c31', 'router-id-fb1c5cb76ab84b5592987ac0693abc2b', '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-3aecc7f25b7645779d19aff248210f01, id=floating-ip-id-8cdabd2183fc43b3819e926a9f70eb40, keys=<MagicMock id='140076684745424'>, port_id=port-id-7e9a0f976d854307bac9c870c514faca, project_id=project-id-2cda17855a60465c8d03237f123a3c31, router_id=router-id-fb1c5cb76ab84b5592987ac0693abc2b, status=DOWN, tenant_id=project-id-2cda17855a60465c8d03237f123a3c31>
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-fba61e07f5784f3397fe50cfaae4e4b8', False, 'network-label-4f25902c70534f05939fa2b0508c4994', None, False, '255.255.255.0', None, None, 'project-id-c11123a9ddd54691bdb48b0b0a6948f3', 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-5ddf4bb1e68b4c18b623af2d7c8258a9', 'network-name-6a7eff5a822041ca8ba96d983ed46ea7', '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-a58fd29007e44b5e92030660f44510ee', 'network-name-e3aee2f1ad524be592d268588d172527', '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-adcb9931d0df4c25b1bbc3651f6bd205', 'network-name-418ce4aa82ba486584ba65ed52d4e4f7', 'a, b'), ('network-id-8b35b99045764d9ab87835104033f9e9', 'network-name-d0c82e6f964a438196b217a383fcc251', 'a, b'), ('network-id-b5324c97671f47f4bb1095af8cf99f10', 'network-name-fb61968e3fa04e3dad4237768d5c6e4c', 'a, b')]
data_long = [('network-id-adcb9931d0df4c25b1bbc3651f6bd205', 'network-name-418ce4aa82ba486584ba65ed52d4e4f7', 'ACTIVE', 'project-id-cd19ebf999564b4fbb10e9beffed4353', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-8b35b99045764d9ab87835104033f9e9', 'network-name-d0c82e6f964a438196b217a383fcc251', 'ACTIVE', 'project-id-cea0a84f7da74e33812b09fa50713c58', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-b5324c97671f47f4bb1095af8cf99f10', 'network-name-fb61968e3fa04e3dad4237768d5c6e4c', 'ACTIVE', 'project-id-eee5a3fa4f6444bc98be27cddc7b2bec', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-b5324c97671f47f4bb1095af8cf99f10, keys=<MagicMock id='140076767356240'>, name=network-name-fb61968e3fa04e3dad4237768d5c6e4c, project_id=project-id-eee5a3fa4f6444bc98be27cddc7b2bec, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-eee5a3fa4f6444bc98be27cddc7b2bec>
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-e54a9734567d4ca4a6b3ed6c300eb8cd', 'network-label-b28a971b4a6c474a93598cd6d99682df', '10.0.0.0/24'), ('network-id-7bacc7f6d28c4e7b8b28f041fda51207', 'network-label-18f10c7b85e94a4297d4f02e9067d9ed', '10.0.0.0/24'), ('network-id-5a2a23493de5480991c63e12f745edbe', 'network-label-e33076e34d014e698f60da8adc3e04c2', '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-5a2a23493de5480991c63e12f745edbe, injected=False, keys=<MagicMock id='140076703654288'>, label=network-label-e33076e34d014e698f60da8adc3e04c2, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-c826e6d33ee14b0b88625752940ef8a5, 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-3cb4df22a7b64f41adbc583f2f11d7ac', 'network-name-6213ff1e6d17461da02feb358acbac94', 'project-id-917b08b4d2f54205bee03ceeffc46a29', '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-decbaa7ad762433dbdbf9d585bcf5f04', False, 'network-label-ef78f0d03b9d4d66b6782e4e60710ad4', None, False, '255.255.255.0', None, None, 'project-id-9284843bbcd54d24882c58dcdaed0012', 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-a82d0a1a98104e05bbb27678940f1cc0', '', '', 'ovs', 'normal', 'device-id-afca14f06de444c387506efcbf763129', 'compute:nova', '', 'dns-name-e98deb2a8491447585e7f61ad84c10b2', '', '', 'port-id-ef036dcee045441d9a05a4aefa7149dc', 'fa:16:3e:a9:4e:72', 'port-name-510eec72cc0641758efbeec15c9924ec', 'network-id-8034ca9350464024972c7d8d8f4857b9', True, 'project-id-4f8cc427246f4704a60a9ab0f82bf47e', '', '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-87a82d3c314d4c9a9cd171d61734b80a', 'router-name-fb6d33092f624778997277e5a523205e', 'project-id-cc94fee189e54feaaf894dfbb254d145')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-87a82d3c314d4c9a9cd171d61734b80a, keys=<MagicMock id='140076662871568'>, name=router-name-fb6d33092f624778997277e5a523205e, routes=[], status=ACTIVE, tenant_id=project-id-cc94fee189e54feaaf894dfbb254d145>
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-e0eb3edee9c24fd091a7015a3d626f7f', 'router-name-84bd43d645704825b2b864ca80dd65dd', 'ACTIVE', 'UP', False, False, 'project-id-2e4c852b27184477b6f42d632770d903'), ('router-id-a8cd47a0f1d04133a200a9589f13fe3b', 'router-name-8ef0350ec80a4e5e824f23acb04dfba3', 'ACTIVE', 'UP', False, False, 'project-id-35d651f72c6d4f2682a872b9b11d4abf'), ('router-id-1dbdfa58d420427194d15ceb0b7ea058', 'router-name-1ff4a50e4f18497f97e32ccc6cbb3fa4', 'ACTIVE', 'UP', False, False, 'project-id-6029b34c317e49e39a52f2710d357ff2')]
data_long = [('router-id-e0eb3edee9c24fd091a7015a3d626f7f', 'router-name-84bd43d645704825b2b864ca80dd65dd', 'ACTIVE', 'UP', False, False, 'project-id-2e4c852b27184477b6f42d632770d903', [], '{}', ''), ('router-id-a8cd47a0f1d04133a200a9589f13fe3b', 'router-name-8ef0350ec80a4e5e824f23acb04dfba3', 'ACTIVE', 'UP', False, False, 'project-id-35d651f72c6d4f2682a872b9b11d4abf', [], '{}', ''), ('router-id-1dbdfa58d420427194d15ceb0b7ea058', 'router-name-1ff4a50e4f18497f97e32ccc6cbb3fa4', 'ACTIVE', 'UP', False, False, 'project-id-6029b34c317e49e39a52f2710d357ff2', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-1dbdfa58d420427194d15ceb0b7ea058, keys=<MagicMock id='140076663367440'>, name=router-name-1ff4a50e4f18497f97e32ccc6cbb3fa4, routes=[], status=ACTIVE, tenant_id=project-id-6029b34c317e49e39a52f2710d357ff2>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-e0eb3edee9c24fd091a7015a3d626f7f, keys=<MagicMock id='140076663373584'>, name=router-name-84bd43d645704825b2b864ca80dd65dd, routes=[], status=ACTIVE, tenant_id=project-id-2e4c852b27184477b6f42d632770d903>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-a8cd47a0f1d04133a200a9589f13fe3b, keys=<MagicMock id='140076694486544'>, name=router-name-8ef0350ec80a4e5e824f23acb04dfba3, routes=[], status=ACTIVE, tenant_id=project-id-35d651f72c6d4f2682a872b9b11d4abf>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-1dbdfa58d420427194d15ceb0b7ea058, keys=<MagicMock id='140076663367440'>, name=router-name-1ff4a50e4f18497f97e32ccc6cbb3fa4, routes=[], status=ACTIVE, tenant_id=project-id-6029b34c317e49e39a52f2710d357ff2>]
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-f4f6fd4c679647aebf416a5d0671895a', 'router-name-ee5006593c06484ba0134d6a71a3b359', 'project-id-ce9c5d0ee31a474fa06516d0d90576a6')
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-71372d59052c4407b09a7ad3792893bd', 'security-group-name-31a45e96c86441aab547cb5977ea6643', 'security-group-description-3c9f48037664467cac35147f730cb56c'),)
expected_data_all_projects = (('security-group-id-71372d59052c4407b09a7ad3792893bd', 'security-group-name-31a45e96c86441aab547cb5977ea6643', 'security-group-description-3c9f48037664467cac35147f730cb56c', 'project-id-7ee14372418a4a249ca92b9b7c121329'),)
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-2e587f9ec5a54ef9985aa0185ff35fb6', 'security-group-name-568b558c2272460ba3cefebc8e50b107', 'security-group-description-13e2f65548554be2b1373a1a3246a9ce', 'project-id-c87a042b112d46328f93c73a44566efa'),)
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-5761c009714c4b8a9c808efa5eeab763', 'icmp', '0.0.0.0/0', 'security-group-id-7a633fd32517444c97bbcc6f34478d2d', '', '')
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-c6a46f4fa24f4370ab44973830aa3685', None, None, 'project-id-d0671545456943d59f7a3cd9285cb604', None, 'remote-security-group-id-f1e1fe75bf5449e685754c6553dc12c6', None, 'security-group-id-385a5a96fe604ccf89b8e501562f37ad')
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-4119beb4209b48adbaa0949bec8d6e53', 'subnet-name-88d0daa2ffa344dfb6e4109254c7590c', 'network-id-e50cfe97a20e41368e4e1baaa37154eb', '10.10.10.0/24'), ('subnet-id-e2550597125349c8913f2407bdcd4e49', 'subnet-name-70f58635db3341d18e41025c605a9062', 'network-id-59121a205614472cb7bfc62f1c718473', '10.10.10.0/24'), ('subnet-id-2fa57e5af2fe42f380a5584eae96c18a', 'subnet-name-763a21b89f264fc592677b05e0b3a05f', 'network-id-38e41ea0e3894f91af159895c6ef07c1', '10.10.10.0/24')]
data_long = [('subnet-id-4119beb4209b48adbaa0949bec8d6e53', 'subnet-name-88d0daa2ffa344dfb6e4109254c7590c', 'network-id-e50cfe97a20e41368e4e1baaa37154eb', '10.10.10.0/24', 'project-id-65848e2fad6e4e1f8ad9cb0a11b54a73', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-e2550597125349c8913f2407bdcd4e49', 'subnet-name-70f58635db3341d18e41025c605a9062', 'network-id-59121a205614472cb7bfc62f1c718473', '10.10.10.0/24', 'project-id-13e7e46ad56c4ae786b6de22fafcf6cc', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-2fa57e5af2fe42f380a5584eae96c18a', 'subnet-name-763a21b89f264fc592677b05e0b3a05f', 'network-id-38e41ea0e3894f91af159895c6ef07c1', '10.10.10.0/24', 'project-id-903c6af795ea4681815df9926693c0db', 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-2fa57e5af2fe42f380a5584eae96c18a, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='140076787125520'>, name=subnet-name-763a21b89f264fc592677b05e0b3a05f, network_id=network-id-38e41ea0e3894f91af159895c6ef07c1, project_id=project-id-903c6af795ea4681815df9926693c0db, subnetpool_id=None, tenant_id=project-id-903c6af795ea4681815df9926693c0db>
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-c549d93aa99d4bb88d043bc39c7b0662', '4', 'None', 'None', 'subnet-name-2353ca4c90574db79d637a9d5374e3c6', 'network-id-ee42e4e7da16430b8a841398884e50c1', 'project-id-cfaaffdb758440cd82009b68c277444a', '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-126a08dc73814ae1ba5e14fe0fbf3657', 'subnet-pool-name-51536d67575d48e7ae0ca5e84f6f33fe', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-7853cca6a21747b3b3b2671fe6cfc288', 'subnet-pool-name-67b5628f2f3a4975887cba263a8b2a9f', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-2623452e827c43429c351a269768a0e5', 'subnet-pool-name-5dd572f2864443899d068420b872c795', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-126a08dc73814ae1ba5e14fe0fbf3657', 'subnet-pool-name-51536d67575d48e7ae0ca5e84f6f33fe', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-b0fb89dd4a5f4c00a88041f34093905a'), ('subnet-pool-id-7853cca6a21747b3b3b2671fe6cfc288', 'subnet-pool-name-67b5628f2f3a4975887cba263a8b2a9f', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-c0868f3480f84af5ae383d7d01f2ace8'), ('subnet-pool-id-2623452e827c43429c351a269768a0e5', 'subnet-pool-name-5dd572f2864443899d068420b872c795', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-cd0657b1e5784dd2bf51f0059ba960d7')]
pool = <FakeResource address_scope_id=address-scope-id-cd0657b1e5784dd2bf51f0059ba960d7, default_prefixlen=8, default_quota=None, id=subnet-pool-id-2623452e827c43429c351a269768a0e5, ip_version=4, is_default=False, keys=<MagicMock id='140076705534928'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-5dd572f2864443899d068420b872c795, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-cab191eaa67e4cce9498f878af1c5630, shared=False, tenant_id=project-id-cab191eaa67e4cce9498f878af1c5630>
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-1415679ca93347d4a8aeb85d31fb4596', 8, None, 'subnet-pool-id-8380dff414664002bcad2aa78942c1e2', 4, False, 32, 8, 'subnet-pool-name-87cc8700409d4030bbe6b1d25375ae91', '10.0.0.0/24, 10.1.0.0/24', 'project-id-8bbcf44cde2e403e9e0f64382baf2839', 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