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-5a3739aed06c40cb944ea553e506faf4, instance_id=server-id-9ab24ecc086c4833bcbc296746ce508c, 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-9e17b5ba49884052aa77f8b5834bdf7a, id=floating-ip-id-f1654c426905456b902f096dc9300e25, keys=<MagicMock id='124212496'>, port_id=port-id-6d2bf4bea88c4a68866c82674c0a2c4d, project_id=project-id-101299f3af4d40339a27a225b42f1de7, router_id=router-id-f4d7b2f897434351aff4c37dabc1a44a, status=DOWN, tenant_id=project-id-101299f3af4d40339a27a225b42f1de7>
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-916f7fd5ca1547a2b1891813f35e5ef7', '1.0.9.0', '2.0.9.0', 'server-id-61fb424edc9c4644b9e90a8966e214e0', 'public'), ('floating-ip-id-a55974bb64a4431fb0b536345e5cfcd5', '1.0.9.0', '2.0.9.0', 'server-id-0a04df19526b4e64bb67453ceea104ef', 'public'), ('floating-ip-id-8cbdd0eead154ab4a158330d684cd79b', '1.0.9.0', '2.0.9.0', 'server-id-f9dca021175c4904b52960c265c4f4d9', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-916f7fd5ca1547a2b1891813f35e5ef7, instance_id=server-id-61fb424edc9c4644b9e90a8966e214e0, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-a55974bb64a4431fb0b536345e5cfcd5, instance_id=server-id-0a04df19526b4e64bb67453ceea104ef, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-8cbdd0eead154ab4a158330d684cd79b, instance_id=server-id-f9dca021175c4904b52960c265c4f4d9, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-8cbdd0eead154ab4a158330d684cd79b, instance_id=server-id-f9dca021175c4904b52960c265c4f4d9, 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-156aa68e07714453b59305f88ce196cc', '1.0.9.0', '2.0.9.0', 'port-id-97e3b17b00694da3afa87f086d09c540'), ('floating-ip-id-94466c238731476794ddd152669c17a6', '1.0.9.0', '2.0.9.0', 'port-id-5d3d51f0304f439bbc2e33518879aa2e'), ('floating-ip-id-1b19a63aa5c34d5e805df62551676703', '1.0.9.0', '2.0.9.0', 'port-id-9bd845ddeed34186a11019b9585684d5')]
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-314407946237465c88a318545c58d1ad, id=floating-ip-id-156aa68e07714453b59305f88ce196cc, keys=<MagicMock id='43831248'>, port_id=port-id-97e3b17b00694da3afa87f086d09c540, project_id=project-id-47331b77a27149a7afe59faf89c4152a, router_id=router-id-cf65340a545a4817b931ea6845bb94e9, status=DOWN, tenant_id=project-id-47331b77a27149a7afe59faf89c4152a>, <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-81daff27b0d747698428c548ab3f9433, id=floating-ip-id-94466c238731476794ddd152669c17a6, keys=<MagicMock id='133660368'>, port_id=port-id-5d3d51f0304f439bbc2e33518879aa2e, project_id=project-id-cf86b0cdb37a44bd9507050917bbaccd, router_id=router-id-4272a3ef69174eab9bbce7e41fdb9d5f, status=DOWN, tenant_id=project-id-cf86b0cdb37a44bd9507050917bbaccd>, <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-11833f79367a4a3ba3c1bdaf1cb7a2c4, id=floating-ip-id-1b19a63aa5c34d5e805df62551676703, keys=<MagicMock id='44484560'>, port_id=port-id-9bd845ddeed34186a11019b9585684d5, project_id=project-id-4f905318ae724eb98227b2076c29683b, router_id=router-id-190c5b99d24d48ed982982fc8eaeedb7, status=DOWN, tenant_id=project-id-4f905318ae724eb98227b2076c29683b>]
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-11833f79367a4a3ba3c1bdaf1cb7a2c4, id=floating-ip-id-1b19a63aa5c34d5e805df62551676703, keys=<MagicMock id='44484560'>, port_id=port-id-9bd845ddeed34186a11019b9585684d5, project_id=project-id-4f905318ae724eb98227b2076c29683b, router_id=router-id-190c5b99d24d48ed982982fc8eaeedb7, status=DOWN, tenant_id=project-id-4f905318ae724eb98227b2076c29683b>
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-61b0d044eb354a728414bcd71202b718', 'server-id-c17dd8895d0b44208df822096d91ce2b', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-61b0d044eb354a728414bcd71202b718, instance_id=server-id-c17dd8895d0b44208df822096d91ce2b, 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-04bdb2e1d7eb4dfc8d887529fdf16e99', 'floating-ip-id-ec7fc1c66b594adfb2893b528817b0b5', 'port-id-af91fa140bce4a2ba5bcc0db0ddca354', 'project-id-047aa827edaf476dbbf7177422593712', 'router-id-7c03ba9911c0402186835b456e463caa', '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-04bdb2e1d7eb4dfc8d887529fdf16e99, id=floating-ip-id-ec7fc1c66b594adfb2893b528817b0b5, keys=<MagicMock id='63047632'>, port_id=port-id-af91fa140bce4a2ba5bcc0db0ddca354, project_id=project-id-047aa827edaf476dbbf7177422593712, router_id=router-id-7c03ba9911c0402186835b456e463caa, status=DOWN, tenant_id=project-id-047aa827edaf476dbbf7177422593712>
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-3bdcd465c47845879e24ff25252930cf', False, 'network-label-e1408886c87a43809441bf47cc6c8a28', None, False, '255.255.255.0', None, None, 'project-id-29fe64e8074449ffae599d2291c7b4f2', 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-1f5dc67207fd427d9fd4c230ed6ee4b8', 'network-name-eb595a9953154ed5840a5aa6ab5eceeb', '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-5927b3a092b143c1bef41d79955183c6', 'network-name-364fb1e1e5a84c748cb33807f6bf26ec', '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-db5ac60802474962bcd423b684b110e8', 'network-name-c3f15bdcdd504b4a815eb86164bf6cac', 'a, b'), ('network-id-38123bde523d4bf2bad077c07eb01b21', 'network-name-bfca96536da7417c84e67f84aae64462', 'a, b'), ('network-id-93bd938d051a44b0b1138f3cc94b8bc6', 'network-name-3effddf8fed44f37adc13c9d5c5e6fcb', 'a, b')]
data_long = [('network-id-db5ac60802474962bcd423b684b110e8', 'network-name-c3f15bdcdd504b4a815eb86164bf6cac', 'ACTIVE', 'project-id-0b6f88c4b34a4dff851940e4f774e97d', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-38123bde523d4bf2bad077c07eb01b21', 'network-name-bfca96536da7417c84e67f84aae64462', 'ACTIVE', 'project-id-47545dadbb324341bd8654f1b44164b7', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-93bd938d051a44b0b1138f3cc94b8bc6', 'network-name-3effddf8fed44f37adc13c9d5c5e6fcb', 'ACTIVE', 'project-id-ecfdcc9282084467a796d3b916e6cacc', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-93bd938d051a44b0b1138f3cc94b8bc6, keys=<MagicMock id='144203088'>, name=network-name-3effddf8fed44f37adc13c9d5c5e6fcb, project_id=project-id-ecfdcc9282084467a796d3b916e6cacc, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-ecfdcc9282084467a796d3b916e6cacc>
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-a86746050eb44ae684ac9f95dd7d4735', 'network-label-815f4e6ab8234f20a96aec06fd919a0f', '10.0.0.0/24'), ('network-id-dd9aae91329547a3974e572948ab5708', 'network-label-02704a82bd5841a3a4e3d3467ad7d2e9', '10.0.0.0/24'), ('network-id-f5b006f32c8a47f1a47913595736f79a', 'network-label-cbe2d54f64fd4ea6919b245616b8cfb0', '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-f5b006f32c8a47f1a47913595736f79a, injected=False, keys=<MagicMock id='132130512'>, label=network-label-cbe2d54f64fd4ea6919b245616b8cfb0, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-e842c6348c0c471e88286e705a61ef4d, 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-ae0cc417911a45bc80bfde8e22ad53ec', 'network-name-0a4aa195f6034f03aa7e4cfa8beb9528', 'project-id-536d2b29725b4f68b2d0e2ee6afbb5d5', '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-6ddccf5a7e2346618efdc56dd61e70a2', False, 'network-label-2e202f58bb1646099f9983e37d22995e', None, False, '255.255.255.0', None, None, 'project-id-7402e0e25ff14311aadf0f425541368b', 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-fb6d1d22a2ef4f8f83bbb410af7a1e37', '', '', 'ovs', 'normal', 'device-id-9cb1cd2fd192469e8bba3d0335889e85', 'compute:nova', '', 'dns-name-3cfeee3b8ed94098ab367ae269f42ed6', '', '', 'port-id-9d0fa72a72d94fbf9c9b38784a71921a', 'fa:16:3e:a9:4e:72', 'port-name-45eb850eaf804135acc0ed341c547159', 'network-id-ace16d9d614b4ff29b31db7a296f6eb5', True, 'project-id-870ca6e8191c4758bc9d56b9d778aeff', '', '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-6c182be3ab194120990b9dbd130222c2', 'router-name-4236f51dd75d45e6bf46696b56aafc01', 'project-id-bd6d8b4eb924440596e5ec11f07aa081')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-6c182be3ab194120990b9dbd130222c2, keys=<MagicMock id='157442256'>, name=router-name-4236f51dd75d45e6bf46696b56aafc01, routes=[], status=ACTIVE, tenant_id=project-id-bd6d8b4eb924440596e5ec11f07aa081>
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-7b577e3c82bf4b638041997cb8ee6e15', 'router-name-5b6c7768cac74080b46da798ec61c99b', 'ACTIVE', 'UP', False, False, 'project-id-1aa46e8151164ade80554fefce76687d'), ('router-id-675d31f7c87f4821a1f61cf3352335f1', 'router-name-6a90066edd574033b9864a13736b5dc5', 'ACTIVE', 'UP', False, False, 'project-id-f1ed7691b2294e558803b3470c6c91fe'), ('router-id-563b087d628541438d7f0c847576158b', 'router-name-f4ef84264436423a816beea4498e6080', 'ACTIVE', 'UP', False, False, 'project-id-9e164350df974d24994c7d63324ff890')]
data_long = [('router-id-7b577e3c82bf4b638041997cb8ee6e15', 'router-name-5b6c7768cac74080b46da798ec61c99b', 'ACTIVE', 'UP', False, False, 'project-id-1aa46e8151164ade80554fefce76687d', [], '{}', ''), ('router-id-675d31f7c87f4821a1f61cf3352335f1', 'router-name-6a90066edd574033b9864a13736b5dc5', 'ACTIVE', 'UP', False, False, 'project-id-f1ed7691b2294e558803b3470c6c91fe', [], '{}', ''), ('router-id-563b087d628541438d7f0c847576158b', 'router-name-f4ef84264436423a816beea4498e6080', 'ACTIVE', 'UP', False, False, 'project-id-9e164350df974d24994c7d63324ff890', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-563b087d628541438d7f0c847576158b, keys=<MagicMock id='157471184'>, name=router-name-f4ef84264436423a816beea4498e6080, routes=[], status=ACTIVE, tenant_id=project-id-9e164350df974d24994c7d63324ff890>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-7b577e3c82bf4b638041997cb8ee6e15, keys=<MagicMock id='157460880'>, name=router-name-5b6c7768cac74080b46da798ec61c99b, routes=[], status=ACTIVE, tenant_id=project-id-1aa46e8151164ade80554fefce76687d>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-675d31f7c87f4821a1f61cf3352335f1, keys=<MagicMock id='157457808'>, name=router-name-6a90066edd574033b9864a13736b5dc5, routes=[], status=ACTIVE, tenant_id=project-id-f1ed7691b2294e558803b3470c6c91fe>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-563b087d628541438d7f0c847576158b, keys=<MagicMock id='157471184'>, name=router-name-f4ef84264436423a816beea4498e6080, routes=[], status=ACTIVE, tenant_id=project-id-9e164350df974d24994c7d63324ff890>]
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-a0ee2ab17bb7459d928609ff03fffc1e', 'router-name-456a808cc5334a358fbf146ed2011e9b', 'project-id-d102445d73bc41ac8df281dbab32e9e1')
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-5cac46928d6d4db890f9a1d4655741c7', 'security-group-name-473df879b5e14063b88b4aaff0785d52', 'security-group-description-7a2e488e09344dc493d50a7e29b49087'),)
expected_data_all_projects = (('security-group-id-5cac46928d6d4db890f9a1d4655741c7', 'security-group-name-473df879b5e14063b88b4aaff0785d52', 'security-group-description-7a2e488e09344dc493d50a7e29b49087', 'project-id-be11a1607a4541e1898b0886605aa8a3'),)
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-4dfcf44383ea45e985535715d37f02bd', 'security-group-name-a34091b3afd1406eb9c6b5863259b4d7', 'security-group-description-ca4f28033c474465a6dc6a4aba5b5551', 'project-id-98a0a30823f7478b90b7a18f1502e9b1'),)
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-91636315340b470b9e3414887c387747', 'icmp', '0.0.0.0/0', 'security-group-id-3be82e0227d24e3995bbb0cb0ad2c55c', '', '')
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-8f68e5c7bda340bab9979a2eb8d841c8', None, None, 'project-id-eb226a76097c4a8cbf2679f98caa57f1', None, 'remote-security-group-id-a4e0828995114fc5bf9aaf4ceddba819', None, 'security-group-id-f6f2dcd3b16246e9bd0bd3d4d99c5157')
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-e062896b1bb44ee9912f2bcfd52f5f52', 'subnet-name-b94989200c0f4392822aa39884337d2b', 'network-id-376435166ceb4b94b8c65e1119c64a58', '10.10.10.0/24'), ('subnet-id-9fc8ac2b2b564dd69bb66b75b73fbb64', 'subnet-name-9e0a6d4309794e459a6be7ad437518a7', 'network-id-b76fe78570c04de8955945e55a0130a8', '10.10.10.0/24'), ('subnet-id-487bf72884a74da6b69e05ab5941034b', 'subnet-name-dc50743cc17a4ec1867421c792155e02', 'network-id-b7467f79690641a6b47d73fca501ef58', '10.10.10.0/24')]
data_long = [('subnet-id-e062896b1bb44ee9912f2bcfd52f5f52', 'subnet-name-b94989200c0f4392822aa39884337d2b', 'network-id-376435166ceb4b94b8c65e1119c64a58', '10.10.10.0/24', 'project-id-cd4905e774c94391a6bde05e088a1665', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-9fc8ac2b2b564dd69bb66b75b73fbb64', 'subnet-name-9e0a6d4309794e459a6be7ad437518a7', 'network-id-b76fe78570c04de8955945e55a0130a8', '10.10.10.0/24', 'project-id-f8cc0693c0c847ad9fb1bd96ad4d34f2', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-487bf72884a74da6b69e05ab5941034b', 'subnet-name-dc50743cc17a4ec1867421c792155e02', 'network-id-b7467f79690641a6b47d73fca501ef58', '10.10.10.0/24', 'project-id-e80f1de363ca4005b5594d34028d46f3', 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-487bf72884a74da6b69e05ab5941034b, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='106446032'>, name=subnet-name-dc50743cc17a4ec1867421c792155e02, network_id=network-id-b7467f79690641a6b47d73fca501ef58, project_id=project-id-e80f1de363ca4005b5594d34028d46f3, subnetpool_id=None, tenant_id=project-id-e80f1de363ca4005b5594d34028d46f3>
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-2db7d570ea1d4085b502fcc2d3f951cb', '4', 'None', 'None', 'subnet-name-ed784464a0f647979704f3533e90352d', 'network-id-d03ed77d4cad4782ab4bc221f51268ef', 'project-id-6cf82c47614148afb60169f4de6ab453', '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-66e3590cca774642857e9ff9cacda8c3', 'subnet-pool-name-16a7c1f8ec134c8798246858d504f876', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-fea88d8c1f6b46de98ed6504e097015c', 'subnet-pool-name-260ef93f6b3a4007809b3fcaecd39cd9', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-3ba26eaddf0e41f7ba24f839e8c1ef41', 'subnet-pool-name-6092a0c1dc864f5e81ed82e717a906fb', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-66e3590cca774642857e9ff9cacda8c3', 'subnet-pool-name-16a7c1f8ec134c8798246858d504f876', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-b88165ca358042f9b7b908e878d53278'), ('subnet-pool-id-fea88d8c1f6b46de98ed6504e097015c', 'subnet-pool-name-260ef93f6b3a4007809b3fcaecd39cd9', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-bf28b06912b94f12933007a202379a74'), ('subnet-pool-id-3ba26eaddf0e41f7ba24f839e8c1ef41', 'subnet-pool-name-6092a0c1dc864f5e81ed82e717a906fb', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-3c81c9596a4442d6814a3599a6286a30')]
pool = <FakeResource address_scope_id=address-scope-id-3c81c9596a4442d6814a3599a6286a30, default_prefixlen=8, default_quota=None, id=subnet-pool-id-3ba26eaddf0e41f7ba24f839e8c1ef41, ip_version=4, is_default=False, keys=<MagicMock id='45536720'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-6092a0c1dc864f5e81ed82e717a906fb, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-4267cf2fa4c549308155694d4de6d815, shared=False, tenant_id=project-id-4267cf2fa4c549308155694d4de6d815>
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-2c52aaf3ca594778b75ac78d81ce4903', 8, None, 'subnet-pool-id-01d59f7c239c46dabdf917062a0254cd', 4, False, 32, 8, 'subnet-pool-name-01a0e3d408624296903eec440f4c4945', '10.0.0.0/24, 10.1.0.0/24', 'project-id-f61e4eb585eb4f9b80c04c003adb23cf', 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