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-cac6887800394612856d2e5b705a8889, instance_id=server-id-133865e32d194a898580bee243efcc1f, 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-05d709efddcb4eb09939e62524017170, id=floating-ip-id-6508c26968894909a0ddc3d2243e21fa, keys=<MagicMock id='146034832'>, port_id=port-id-97a9bfc105334cfc88792ff3f6a295fb, project_id=project-id-42bedeb9619940bea538d875426fa03c, router_id=router-id-0fa854c41e5a4230a931adc941772b5d, status=DOWN, tenant_id=project-id-42bedeb9619940bea538d875426fa03c>
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-7a40551485904c5a9782688a972e183b', '1.0.9.0', '2.0.9.0', 'server-id-3986a2c4071b45168510950969ad6468', 'public'), ('floating-ip-id-fe400311629c4c51bf0fe1bae46c8c47', '1.0.9.0', '2.0.9.0', 'server-id-f2a6fcf672a5452c81821aeedc6a0647', 'public'), ('floating-ip-id-d422cbcc2f39431c8fb9039ddd7f11fb', '1.0.9.0', '2.0.9.0', 'server-id-6e73c50e7c22446e9b23c860b1e79e0f', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-7a40551485904c5a9782688a972e183b, instance_id=server-id-3986a2c4071b45168510950969ad6468, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-fe400311629c4c51bf0fe1bae46c8c47, instance_id=server-id-f2a6fcf672a5452c81821aeedc6a0647, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-d422cbcc2f39431c8fb9039ddd7f11fb, instance_id=server-id-6e73c50e7c22446e9b23c860b1e79e0f, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-d422cbcc2f39431c8fb9039ddd7f11fb, instance_id=server-id-6e73c50e7c22446e9b23c860b1e79e0f, 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-970cc9c51e1845779e74710450d25137', '1.0.9.0', '2.0.9.0', 'port-id-6982b96bd3e342128a0e3f20536caf80'), ('floating-ip-id-8d0f1468047a4b239cebcb83e82c0e91', '1.0.9.0', '2.0.9.0', 'port-id-4c5faa760b684eeab1bbd703c9623cee'), ('floating-ip-id-3c40fa11633843279334ecdf6cf3b0e1', '1.0.9.0', '2.0.9.0', 'port-id-54e4b519c9dc47e5ad58b47496b95079')]
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-0ccfbc36793d44c4b3209d6e6e167dcd, id=floating-ip-id-970cc9c51e1845779e74710450d25137, keys=<MagicMock id='44973136'>, port_id=port-id-6982b96bd3e342128a0e3f20536caf80, project_id=project-id-5e07451295ea4c36b00d5bd8318e1351, router_id=router-id-2995be767837474d9ed86d6e7ead1e0a, status=DOWN, tenant_id=project-id-5e07451295ea4c36b00d5bd8318e1351>, <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-0593adb9d49f4dbea0274a56aef057db, id=floating-ip-id-8d0f1468047a4b239cebcb83e82c0e91, keys=<MagicMock id='53105616'>, port_id=port-id-4c5faa760b684eeab1bbd703c9623cee, project_id=project-id-2a6793d9eb5f4224a78da271a8ba6f24, router_id=router-id-bcb6f809cd734a7db0c7d83de193e904, status=DOWN, tenant_id=project-id-2a6793d9eb5f4224a78da271a8ba6f24>, <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-11881a1944eb4e73922a0ce53140fe40, id=floating-ip-id-3c40fa11633843279334ecdf6cf3b0e1, keys=<MagicMock id='45026960'>, port_id=port-id-54e4b519c9dc47e5ad58b47496b95079, project_id=project-id-f6dd17c06d9f497aa307f653180c0591, router_id=router-id-8ca78550726746c9a1d9f9c010429135, status=DOWN, tenant_id=project-id-f6dd17c06d9f497aa307f653180c0591>]
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-11881a1944eb4e73922a0ce53140fe40, id=floating-ip-id-3c40fa11633843279334ecdf6cf3b0e1, keys=<MagicMock id='45026960'>, port_id=port-id-54e4b519c9dc47e5ad58b47496b95079, project_id=project-id-f6dd17c06d9f497aa307f653180c0591, router_id=router-id-8ca78550726746c9a1d9f9c010429135, status=DOWN, tenant_id=project-id-f6dd17c06d9f497aa307f653180c0591>
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-bd8b881c7e034be18ae915685872a80c', 'server-id-ff59a0b79f084cc598c6f0b57530400a', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-bd8b881c7e034be18ae915685872a80c, instance_id=server-id-ff59a0b79f084cc598c6f0b57530400a, 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-a3d4f6fbde044398837c87708f385798', 'floating-ip-id-1b6a11eadf94400a979bbe7dbcfd4c1c', 'port-id-6c8a74011bac4abdb565a2b75e89fa5c', 'project-id-f24850cf5dda4a00972ee466234d1ae8', 'router-id-3d6bfed7a58c436784c27f8885297b1f', '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-a3d4f6fbde044398837c87708f385798, id=floating-ip-id-1b6a11eadf94400a979bbe7dbcfd4c1c, keys=<MagicMock id='130212816'>, port_id=port-id-6c8a74011bac4abdb565a2b75e89fa5c, project_id=project-id-f24850cf5dda4a00972ee466234d1ae8, router_id=router-id-3d6bfed7a58c436784c27f8885297b1f, status=DOWN, tenant_id=project-id-f24850cf5dda4a00972ee466234d1ae8>
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-a21054f9be334fc68d73db96b2cde4d7', False, 'network-label-240a8d03efd04424a246698d00f8d9a9', None, False, '255.255.255.0', None, None, 'project-id-f114eeb9b4334c86b124798235b2fbc2', 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-816cd769ca51467eb4a6d874654dfb02', 'network-name-959c201300fa4c0b85406f8d08dc2965', '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-2f069e40ebc14e4f9e3f284f7439c27c', 'network-name-10af4df483f648d89a15c29e87a76005', '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-b18e832c14714d1aa9966adac23ca6b0', 'network-name-bee91e7cabcb4f559cdc111da9e40d2f', 'a, b'), ('network-id-99bbc5378122483db09574608b07e927', 'network-name-9dbe6e3886ab494caf53929f9328a978', 'a, b'), ('network-id-95bd4584337d407aaa9a58dc8fe35a4e', 'network-name-fd0bc75d192146cfbadf2fc5dd1c3624', 'a, b')]
data_long = [('network-id-b18e832c14714d1aa9966adac23ca6b0', 'network-name-bee91e7cabcb4f559cdc111da9e40d2f', 'ACTIVE', 'project-id-38fd996b7e604f39ba43dc7366944d92', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-99bbc5378122483db09574608b07e927', 'network-name-9dbe6e3886ab494caf53929f9328a978', 'ACTIVE', 'project-id-2c8f8004678640f58c1c4a55f4645a71', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-95bd4584337d407aaa9a58dc8fe35a4e', 'network-name-fd0bc75d192146cfbadf2fc5dd1c3624', 'ACTIVE', 'project-id-09cd4c8be5164f9dbeafaa7f63108e42', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-95bd4584337d407aaa9a58dc8fe35a4e, keys=<MagicMock id='115095504'>, name=network-name-fd0bc75d192146cfbadf2fc5dd1c3624, project_id=project-id-09cd4c8be5164f9dbeafaa7f63108e42, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-09cd4c8be5164f9dbeafaa7f63108e42>
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-26dd0854296945d492e8be1dae96f626', 'network-label-5b5f8f24e0ed49108066686901ad126c', '10.0.0.0/24'), ('network-id-570a7aca9a444d47a506f663d4dec989', 'network-label-67791efb815c493abb358b6d675bc6a0', '10.0.0.0/24'), ('network-id-6177898de4ba4676ab509ae97c72c972', 'network-label-137754a7e60348cbbc69ed9381dd8688', '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-6177898de4ba4676ab509ae97c72c972, injected=False, keys=<MagicMock id='120443856'>, label=network-label-137754a7e60348cbbc69ed9381dd8688, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-7993f30441cd49848647285b79303e9c, 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-78c6fab7fc8c427e8dfcf05490fad219', 'network-name-c2f167bfef754814a5ef06bb1f3d620b', 'project-id-0885d2dbd4c54cfdbd5de4d75a268b17', '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-79b041080f2641788a6344a413c8350c', False, 'network-label-87c0c7c37ee34d798aeebc40dfe0c9f4', None, False, '255.255.255.0', None, None, 'project-id-228c56390fa7439cb4b78f0aad3f37be', 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-c26c518861cc4cb48bfdf7ad6cb688a3', '', '', 'ovs', 'normal', 'device-id-64f9c23e36e045f6a037e856c23f2873', 'compute:nova', '', 'dns-name-f854d844a9f5426c866cdc2a6880c618', '', '', 'port-id-2f310aad5d0f4af9a291eb95413c6f93', 'fa:16:3e:a9:4e:72', 'port-name-ab733a7340d64272b37aaa551c470a0b', 'network-id-e7de924c71eb44388e812b0842c21e9f', True, 'project-id-da428d3d7a1544848fa7d93c3d6193c7', '', '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-ca9603fd87f0413e8aa14c6aee2762f0', 'router-name-af4906191fad462494de5965cb45642f', 'project-id-4f711ac6bbfe4b91943af3a4368a682a')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-ca9603fd87f0413e8aa14c6aee2762f0, keys=<MagicMock id='158207120'>, name=router-name-af4906191fad462494de5965cb45642f, routes=[], status=ACTIVE, tenant_id=project-id-4f711ac6bbfe4b91943af3a4368a682a>
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-113b1a7cb5824f799c2a4814214f7364', 'router-name-5d6570fbe1e44a40af408540d9531706', 'ACTIVE', 'UP', False, False, 'project-id-a64589bd5c7a4c7eb37c02aafbb4f0b1'), ('router-id-e97f480378894a1e822dfbd0e772125b', 'router-name-4283cfdf9ccf436db2f68966329f542f', 'ACTIVE', 'UP', False, False, 'project-id-53b021ff32064b5f89e85e1f4bf2cd41'), ('router-id-c1e88f6fdab44e9ba1b95841f18d77c8', 'router-name-603cbcfe9ada40dea388f2a5423492da', 'ACTIVE', 'UP', False, False, 'project-id-7e8021297bea4432ac9a8b5b4b8c2bac')]
data_long = [('router-id-113b1a7cb5824f799c2a4814214f7364', 'router-name-5d6570fbe1e44a40af408540d9531706', 'ACTIVE', 'UP', False, False, 'project-id-a64589bd5c7a4c7eb37c02aafbb4f0b1', [], '{}', ''), ('router-id-e97f480378894a1e822dfbd0e772125b', 'router-name-4283cfdf9ccf436db2f68966329f542f', 'ACTIVE', 'UP', False, False, 'project-id-53b021ff32064b5f89e85e1f4bf2cd41', [], '{}', ''), ('router-id-c1e88f6fdab44e9ba1b95841f18d77c8', 'router-name-603cbcfe9ada40dea388f2a5423492da', 'ACTIVE', 'UP', False, False, 'project-id-7e8021297bea4432ac9a8b5b4b8c2bac', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-c1e88f6fdab44e9ba1b95841f18d77c8, keys=<MagicMock id='158172048'>, name=router-name-603cbcfe9ada40dea388f2a5423492da, routes=[], status=ACTIVE, tenant_id=project-id-7e8021297bea4432ac9a8b5b4b8c2bac>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-113b1a7cb5824f799c2a4814214f7364, keys=<MagicMock id='158161744'>, name=router-name-5d6570fbe1e44a40af408540d9531706, routes=[], status=ACTIVE, tenant_id=project-id-a64589bd5c7a4c7eb37c02aafbb4f0b1>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-e97f480378894a1e822dfbd0e772125b, keys=<MagicMock id='158179152'>, name=router-name-4283cfdf9ccf436db2f68966329f542f, routes=[], status=ACTIVE, tenant_id=project-id-53b021ff32064b5f89e85e1f4bf2cd41>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-c1e88f6fdab44e9ba1b95841f18d77c8, keys=<MagicMock id='158172048'>, name=router-name-603cbcfe9ada40dea388f2a5423492da, routes=[], status=ACTIVE, tenant_id=project-id-7e8021297bea4432ac9a8b5b4b8c2bac>]
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-fef79525fbc14b9c96c9cb309ce55a54', 'router-name-4e0a1b9487b74efea77f6954e5cba1cd', 'project-id-8b871a8218fc4f2f94f5ebd977cd9390')
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-094ffcdf6c214d979724144c51061c26', 'security-group-name-9de98d02ef784e9194044e112bcca7a2', 'security-group-description-d29fa4d9863e4fedbc593fa22d21fec1'),)
expected_data_all_projects = (('security-group-id-094ffcdf6c214d979724144c51061c26', 'security-group-name-9de98d02ef784e9194044e112bcca7a2', 'security-group-description-d29fa4d9863e4fedbc593fa22d21fec1', 'project-id-7be3f26d308547cfb63d498e7e4152fc'),)
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-37191d8a499a47398994a98f106c365d', 'security-group-name-45d70bdebcf54baf92072bbe3b5c2b38', 'security-group-description-1bbbc1d209e149fda98faa2b8892f2ac', 'project-id-1331678fc2bc4abbaa626996f011c694'),)
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-cc922fc05c384b53ae3a26868b88e489', 'icmp', '0.0.0.0/0', 'security-group-id-cb8e8b962e914f938d18e18163f40542', '', '')
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-dfa0dd71ff224211a120791a31c91258', None, None, 'project-id-8bb7e194842e439e855168233ac27966', None, 'remote-security-group-id-88a66a08029d419aa34691e49aa9c771', None, 'security-group-id-0d1c840e448d4f018bb65c7b0c17d8f8')
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-5314664ba9f74d8f8dc1af8da88437f5', 'subnet-name-b653820bee8e46a4a0256833e9d8949d', 'network-id-b8118f10d24e4dfb9124f48a180e4b67', '10.10.10.0/24'), ('subnet-id-6236af39354046fa91302ca53ca89fde', 'subnet-name-07706bde11b749b985ca1f1b6e670bfb', 'network-id-6581c9c6ab9f42359e8f5a6931ac8f5c', '10.10.10.0/24'), ('subnet-id-e058c4d1205d428d98fad2fff4b82ca6', 'subnet-name-0ce8b29b2fb94ccca6f948d755a8515d', 'network-id-72546e9d6f54497ab1b034b0b01b0910', '10.10.10.0/24')]
data_long = [('subnet-id-5314664ba9f74d8f8dc1af8da88437f5', 'subnet-name-b653820bee8e46a4a0256833e9d8949d', 'network-id-b8118f10d24e4dfb9124f48a180e4b67', '10.10.10.0/24', 'project-id-4afa0c7a54564b098708a6833511b7b7', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-6236af39354046fa91302ca53ca89fde', 'subnet-name-07706bde11b749b985ca1f1b6e670bfb', 'network-id-6581c9c6ab9f42359e8f5a6931ac8f5c', '10.10.10.0/24', 'project-id-5ed9ef7e58f84a3db5d60e0a620b8e2f', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-e058c4d1205d428d98fad2fff4b82ca6', 'subnet-name-0ce8b29b2fb94ccca6f948d755a8515d', 'network-id-72546e9d6f54497ab1b034b0b01b0910', '10.10.10.0/24', 'project-id-67843a2f20644340b886177f4d7d4e94', 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-e058c4d1205d428d98fad2fff4b82ca6, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='154870608'>, name=subnet-name-0ce8b29b2fb94ccca6f948d755a8515d, network_id=network-id-72546e9d6f54497ab1b034b0b01b0910, project_id=project-id-67843a2f20644340b886177f4d7d4e94, subnetpool_id=None, tenant_id=project-id-67843a2f20644340b886177f4d7d4e94>
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-b86a8647235e4284be9fa06b4cdc1459', '4', 'None', 'None', 'subnet-name-cb50f4f20120470da33fdd1525aee9f7', 'network-id-a3af55e2bdf24372afa43320f75ab5df', 'project-id-6fd0dc387411467b90d56ed09ea9b1fe', '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-615c48d4ee314b41b853b34981a34ed7', 'subnet-pool-name-3d7992e06b0a4df8a0c158f0fbfc265f', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-0d351e90d7c8447fb70139424318745e', 'subnet-pool-name-68a316c8e4ae47ce983537448a5f3a1a', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-93da02c6b29542f9bde6499c3966ebc2', 'subnet-pool-name-0f38fb27d2894cda8cdcd76cc0869644', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-615c48d4ee314b41b853b34981a34ed7', 'subnet-pool-name-3d7992e06b0a4df8a0c158f0fbfc265f', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-74c2d9b670234bda9fecaef1d86df2dc'), ('subnet-pool-id-0d351e90d7c8447fb70139424318745e', 'subnet-pool-name-68a316c8e4ae47ce983537448a5f3a1a', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-48cdb64841624a41a9fb82b56a0bee50'), ('subnet-pool-id-93da02c6b29542f9bde6499c3966ebc2', 'subnet-pool-name-0f38fb27d2894cda8cdcd76cc0869644', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-5a1d6c3559cb459984d317468597a9b3')]
pool = <FakeResource address_scope_id=address-scope-id-5a1d6c3559cb459984d317468597a9b3, default_prefixlen=8, default_quota=None, id=subnet-pool-id-93da02c6b29542f9bde6499c3966ebc2, ip_version=4, is_default=False, keys=<MagicMock id='152047440'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-0f38fb27d2894cda8cdcd76cc0869644, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-71e4d20f7ee14cf7982d2d5060272727, shared=False, tenant_id=project-id-71e4d20f7ee14cf7982d2d5060272727>
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-00ff3b0b2e954103827f24b4e0875c10', 8, None, 'subnet-pool-id-4ef5441d3b92459ba647497d273ce0d6', 4, False, 32, 8, 'subnet-pool-name-53e68cf7218540c982fa2f304d32dcab', '10.0.0.0/24, 10.1.0.0/24', 'project-id-312b655f648c4c37a9306df04fb9d0dd', 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