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-9a907f3f1a504306b792f2750277ebb1, instance_id=server-id-924423c428574f099ce722392a52c25f, 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-9abba67662fa4812a04807f98495789b, id=floating-ip-id-b83ff7562aa94d588a39f3fc77069eb7, keys=<MagicMock id='47253555148432'>, port_id=port-id-8b204425e26f40fab5ee9e407e429a44, project_id=project-id-d0323b9260d5402888f568d3bd9b7560, router_id=router-id-b535c52e9bb6440a9863d3dba4790aa3, status=DOWN, tenant_id=project-id-d0323b9260d5402888f568d3bd9b7560>
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-72f3c321468a42b1b07ac8233b43572d', '1.0.9.0', '2.0.9.0', 'server-id-c6c79ecb27f446c59ba5b7e629180916', 'public'), ('floating-ip-id-54ead16d7473448fa7cddded1d18ee98', '1.0.9.0', '2.0.9.0', 'server-id-42c4bdff91744f1f9cecc72abc141752', 'public'), ('floating-ip-id-b4d034bf360f4eae9694c0e3d51061f0', '1.0.9.0', '2.0.9.0', 'server-id-54a433b02f704e6ca04a2a8e633bf3a0', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-72f3c321468a42b1b07ac8233b43572d, instance_id=server-id-c6c79ecb27f446c59ba5b7e629180916, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-54ead16d7473448fa7cddded1d18ee98, instance_id=server-id-42c4bdff91744f1f9cecc72abc141752, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-b4d034bf360f4eae9694c0e3d51061f0, instance_id=server-id-54a433b02f704e6ca04a2a8e633bf3a0, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-b4d034bf360f4eae9694c0e3d51061f0, instance_id=server-id-54a433b02f704e6ca04a2a8e633bf3a0, 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-18c76db1e8db4164b140e9a5f6939b84', '1.0.9.0', '2.0.9.0', 'port-id-fd51b28502d1417eb20f42dcb62b6e11'), ('floating-ip-id-cbcb4cbedf804b30ae63936801fb951d', '1.0.9.0', '2.0.9.0', 'port-id-40f18fc12bb54b859262b523f8a3b14d'), ('floating-ip-id-977fe382bdd34def88bd16b1ddad03c9', '1.0.9.0', '2.0.9.0', 'port-id-fccb08cd1b034305873c1e6d3a526f1d')]
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-2c88abe1e77944a88e29c9ec65e5e1fd, id=floating-ip-id-18c76db1e8db4164b140e9a5f6939b84, keys=<MagicMock id='47253464136336'>, port_id=port-id-fd51b28502d1417eb20f42dcb62b6e11, project_id=project-id-289c3e643bbd4806a1c85b1a133e405a, router_id=router-id-e8a69f6ee7b94d10820b332ff8da5658, status=DOWN, tenant_id=project-id-289c3e643bbd4806a1c85b1a133e405a>, <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-ca2b8c47cff7447ba6eccc0db723ddda, id=floating-ip-id-cbcb4cbedf804b30ae63936801fb951d, keys=<MagicMock id='47253543780880'>, port_id=port-id-40f18fc12bb54b859262b523f8a3b14d, project_id=project-id-b5c6189b10e44cc0a19623d0e1f3f0b8, router_id=router-id-10125b185c7e468c933a8613bf4f0ab0, status=DOWN, tenant_id=project-id-b5c6189b10e44cc0a19623d0e1f3f0b8>, <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-092ef8d64bb748afa943065273aa36c0, id=floating-ip-id-977fe382bdd34def88bd16b1ddad03c9, keys=<MagicMock id='47253543783120'>, port_id=port-id-fccb08cd1b034305873c1e6d3a526f1d, project_id=project-id-74db525239c54714bdb465d9f77a863f, router_id=router-id-bce0381f57cd4ac0b92a10e830ee3b31, status=DOWN, tenant_id=project-id-74db525239c54714bdb465d9f77a863f>]
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-092ef8d64bb748afa943065273aa36c0, id=floating-ip-id-977fe382bdd34def88bd16b1ddad03c9, keys=<MagicMock id='47253543783120'>, port_id=port-id-fccb08cd1b034305873c1e6d3a526f1d, project_id=project-id-74db525239c54714bdb465d9f77a863f, router_id=router-id-bce0381f57cd4ac0b92a10e830ee3b31, status=DOWN, tenant_id=project-id-74db525239c54714bdb465d9f77a863f>
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-1166c0f33d954dab833028db49bab635', 'server-id-ab8f28bb0ae5488097bdf2a5f38cdb27', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-1166c0f33d954dab833028db49bab635, instance_id=server-id-ab8f28bb0ae5488097bdf2a5f38cdb27, 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-83ede7f4ae6346e283c89c6619bb892c', 'floating-ip-id-80dc13f232a84d53916ab98db06b6dc9', 'port-id-ad2554562dfe42149efb189fd1da55f2', 'project-id-9a55169323e04c1d9f9f1bc89694cf6f', 'router-id-3d2f64e2f6b34b6e90f7950afae4877d', '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-83ede7f4ae6346e283c89c6619bb892c, id=floating-ip-id-80dc13f232a84d53916ab98db06b6dc9, keys=<MagicMock id='47253549712208'>, port_id=port-id-ad2554562dfe42149efb189fd1da55f2, project_id=project-id-9a55169323e04c1d9f9f1bc89694cf6f, router_id=router-id-3d2f64e2f6b34b6e90f7950afae4877d, status=DOWN, tenant_id=project-id-9a55169323e04c1d9f9f1bc89694cf6f>
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-07c2f025122d4b9382e54cb01826cb1b', False, 'network-label-2ed9fce7badd4fb1a0a71f3b7fccff59', None, False, '255.255.255.0', None, None, 'project-id-eb0b12d8e0674b62af37b32d9e068cd2', 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-b072d5e0ce994f669bb72ff6291e6274', 'network-name-4fa774a9ab634259952dc20693de3e6a', '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-9b08f0cebe074e24903869fb1efdbb99', 'network-name-73e0638fe7fa4cb0bf25c396b692004c', '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-aa6b91d7705e434bb1a9d2221fc6a078', 'network-name-ecf11cf0dc9848b6baa1690c04558855', 'a, b'), ('network-id-fbdbfa736c6441e196755f6ae7ba8a13', 'network-name-398073f129f34a7caf61ddbbfec0090a', 'a, b'), ('network-id-81835160b5944d5193638708e0fe58cb', 'network-name-0385aefcaa654cf5a364d2f484c1e1cd', 'a, b')]
data_long = [('network-id-aa6b91d7705e434bb1a9d2221fc6a078', 'network-name-ecf11cf0dc9848b6baa1690c04558855', 'ACTIVE', 'project-id-3b7adbb80b97465fbe043f83c9f0696f', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-fbdbfa736c6441e196755f6ae7ba8a13', 'network-name-398073f129f34a7caf61ddbbfec0090a', 'ACTIVE', 'project-id-fd911ce3b715480cb09c2153d24570a0', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-81835160b5944d5193638708e0fe58cb', 'network-name-0385aefcaa654cf5a364d2f484c1e1cd', 'ACTIVE', 'project-id-add4758d1e6d42a2b08d01b380e04543', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-81835160b5944d5193638708e0fe58cb, keys=<MagicMock id='47253474838352'>, name=network-name-0385aefcaa654cf5a364d2f484c1e1cd, project_id=project-id-add4758d1e6d42a2b08d01b380e04543, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-add4758d1e6d42a2b08d01b380e04543>
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-463d0e084fe144a8a415bb01bebfd369', 'network-label-154c79e4fce844fb935880c5ad916e02', '10.0.0.0/24'), ('network-id-b7a27def1cc04d029065be68a057771e', 'network-label-2f14dcb605a84867b11c326f26a4fe8b', '10.0.0.0/24'), ('network-id-774a9369cfe549ed9feca07f40298277', 'network-label-7fabc09c7dfc47669cad7c06058a9ffd', '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-774a9369cfe549ed9feca07f40298277, injected=False, keys=<MagicMock id='47253565875536'>, label=network-label-7fabc09c7dfc47669cad7c06058a9ffd, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-6b22affc13bf42a9b2906307756d815d, 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-1e293326dfa7460ba53f7b090bf3180f', 'network-name-5a9385e4fc30448a85e8e1f62f478eee', 'project-id-97decfdc60384255addc3b0a79f610d7', '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-ba6bcafa899241a4abc10478ea83457a', False, 'network-label-c32a6fdeee82478f93f523c3c5e77c4a', None, False, '255.255.255.0', None, None, 'project-id-ed7283f634c7409c939a43ae67dddcdd', 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-ad49304390ea48a29edf07defd5fa7ad', '', '', 'ovs', 'normal', 'device-id-d89400d395a34f6f804d5f574b5c2713', 'compute:nova', '', 'dns-name-5b13d02e70db4ba4ad2e5e7b063b5b66', '', '', 'port-id-16e9eb75681448f290a0bb961bdc29fd', 'fa:16:3e:a9:4e:72', 'port-name-67807508f0d449b08299bacdb637b6e2', 'network-id-362a52d1bf57490184527304eb2f5a9d', True, 'project-id-b365bfbe070c40758fefec8574487901', '', '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-61aacea8adc943b09c9ccb3b408c5dae', 'router-name-7032df18c35b46d8b997ff69a678716e', 'project-id-3865ee279d9140fca34609b1155f7e17')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-61aacea8adc943b09c9ccb3b408c5dae, keys=<MagicMock id='47253540250704'>, name=router-name-7032df18c35b46d8b997ff69a678716e, routes=[], status=ACTIVE, tenant_id=project-id-3865ee279d9140fca34609b1155f7e17>
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-505acb7dbf8c4295bd9c782fe44df7a6', 'router-name-dd4cbcb0f11e48a08c4913b5a95305f7', 'ACTIVE', 'UP', False, False, 'project-id-a977d31623404cad94a75e1e605c676e'), ('router-id-14245b7d917b40a5a5264c066ff6db1a', 'router-name-8121e59eb0d5479eb1eb5f2fd14a8fba', 'ACTIVE', 'UP', False, False, 'project-id-1c8d9b94923e41c7a55917eeac1a0a9a'), ('router-id-d283e0cada7a4378bf1046f48124c72c', 'router-name-9e71f2471a3b4aaa9ecd578feed70965', 'ACTIVE', 'UP', False, False, 'project-id-690434c8e4be45049de7a25befb45467')]
data_long = [('router-id-505acb7dbf8c4295bd9c782fe44df7a6', 'router-name-dd4cbcb0f11e48a08c4913b5a95305f7', 'ACTIVE', 'UP', False, False, 'project-id-a977d31623404cad94a75e1e605c676e', [], '{}', ''), ('router-id-14245b7d917b40a5a5264c066ff6db1a', 'router-name-8121e59eb0d5479eb1eb5f2fd14a8fba', 'ACTIVE', 'UP', False, False, 'project-id-1c8d9b94923e41c7a55917eeac1a0a9a', [], '{}', ''), ('router-id-d283e0cada7a4378bf1046f48124c72c', 'router-name-9e71f2471a3b4aaa9ecd578feed70965', 'ACTIVE', 'UP', False, False, 'project-id-690434c8e4be45049de7a25befb45467', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-d283e0cada7a4378bf1046f48124c72c, keys=<MagicMock id='47253561449680'>, name=router-name-9e71f2471a3b4aaa9ecd578feed70965, routes=[], status=ACTIVE, tenant_id=project-id-690434c8e4be45049de7a25befb45467>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-505acb7dbf8c4295bd9c782fe44df7a6, keys=<MagicMock id='47253466657040'>, name=router-name-dd4cbcb0f11e48a08c4913b5a95305f7, routes=[], status=ACTIVE, tenant_id=project-id-a977d31623404cad94a75e1e605c676e>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-14245b7d917b40a5a5264c066ff6db1a, keys=<MagicMock id='47253456363024'>, name=router-name-8121e59eb0d5479eb1eb5f2fd14a8fba, routes=[], status=ACTIVE, tenant_id=project-id-1c8d9b94923e41c7a55917eeac1a0a9a>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-d283e0cada7a4378bf1046f48124c72c, keys=<MagicMock id='47253561449680'>, name=router-name-9e71f2471a3b4aaa9ecd578feed70965, routes=[], status=ACTIVE, tenant_id=project-id-690434c8e4be45049de7a25befb45467>]
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-b6bc94a8ab8b45a7914b32f2fecb18b3', 'router-name-9e220e1b311e4b319d693dabb7f92edb', 'project-id-909f03b37b694f00a0a07c4c6033e56a')
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-9a13cb7d61ba40cfa8228b3698acb2f1', 'security-group-name-2cf8e15f9ada40be81843fc603a9f60a', 'security-group-description-75c8928fae844f5189b86a7c34490090'),)
expected_data_all_projects = (('security-group-id-9a13cb7d61ba40cfa8228b3698acb2f1', 'security-group-name-2cf8e15f9ada40be81843fc603a9f60a', 'security-group-description-75c8928fae844f5189b86a7c34490090', 'project-id-dcb645f255d3400eb90b7be549db3072'),)
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-56847a496df84c518d1a9309d3dddf1c', 'security-group-name-5d0b7be4f100456a80fd93cb47749d99', 'security-group-description-8dd2e852fc1148b4a875b5232e18a3f8', 'project-id-1b781f408a3749fabc35ac0fa12ed1d6'),)
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-dcb0ad9e8cb242a5806377062f88cd38', 'icmp', '0.0.0.0/0', 'security-group-id-64321521ff9049edb047e9d4a7414bdc', '', '')
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-a14ba86cb1d844c8b496b364349267d0', None, None, 'project-id-74f9b0e63f59455496998b196fb708fc', None, 'remote-security-group-id-a7ff664b791d498da12591f2bd2bb22b', None, 'security-group-id-6487677c509d4295bffe6d380bc61737')
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-8392e581f7524ae19645eced55259d51', 'subnet-name-3863fa926eab4d9b9e8fb3c858a3ac40', 'network-id-cb1c2d2fed3c415a97f3c8c5abc07258', '10.10.10.0/24'), ('subnet-id-1b1643531cce425e90852c24348c4dcc', 'subnet-name-7732a2ab083b4bfca9a56975f8e77258', 'network-id-4fad7d6e7cf2441fbc3624a6dcf980d1', '10.10.10.0/24'), ('subnet-id-ab83520bf5cc404bbd16380649d2b71c', 'subnet-name-3f885f71ad094679984ce9c18980a44c', 'network-id-5000f443f2f04a51a1c741d0e409c5ee', '10.10.10.0/24')]
data_long = [('subnet-id-8392e581f7524ae19645eced55259d51', 'subnet-name-3863fa926eab4d9b9e8fb3c858a3ac40', 'network-id-cb1c2d2fed3c415a97f3c8c5abc07258', '10.10.10.0/24', 'project-id-bb0ec210d5664fbc9b2ba4740e9b696b', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-1b1643531cce425e90852c24348c4dcc', 'subnet-name-7732a2ab083b4bfca9a56975f8e77258', 'network-id-4fad7d6e7cf2441fbc3624a6dcf980d1', '10.10.10.0/24', 'project-id-bfa6a12e0f174ff788b29b36706d6bb2', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-ab83520bf5cc404bbd16380649d2b71c', 'subnet-name-3f885f71ad094679984ce9c18980a44c', 'network-id-5000f443f2f04a51a1c741d0e409c5ee', '10.10.10.0/24', 'project-id-82920e7492a4496995dfbb546e8bae24', 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-ab83520bf5cc404bbd16380649d2b71c, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='47253583454672'>, name=subnet-name-3f885f71ad094679984ce9c18980a44c, network_id=network-id-5000f443f2f04a51a1c741d0e409c5ee, project_id=project-id-82920e7492a4496995dfbb546e8bae24, subnetpool_id=None, tenant_id=project-id-82920e7492a4496995dfbb546e8bae24>
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-7652b2846e95416db5d3041b2b9d43a2', '4', 'None', 'None', 'subnet-name-dafbb0cd2f56447ca8a42922058d763a', 'network-id-f62b9b12b0de46389984e614d6aeff2e', 'project-id-2db43486a99e465783f3476c0bf98a39', '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-49eab5ef870942748e33901886b26e75', 'subnet-pool-name-d9f512bdf138443fba549d00ca94b70d', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-1b37b98bf43c4d568bf789b5013c16f8', 'subnet-pool-name-e1eb46d23a8b4729abd1ff80afbea9f4', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-37efd4b556d34d629f9515ab33c581b0', 'subnet-pool-name-046f820ee0034811869419574e4cfb42', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-49eab5ef870942748e33901886b26e75', 'subnet-pool-name-d9f512bdf138443fba549d00ca94b70d', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-df92df4f34774c14ae7dd7c58ab5d79f'), ('subnet-pool-id-1b37b98bf43c4d568bf789b5013c16f8', 'subnet-pool-name-e1eb46d23a8b4729abd1ff80afbea9f4', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-dd76428773334574b8cb41133694baa8'), ('subnet-pool-id-37efd4b556d34d629f9515ab33c581b0', 'subnet-pool-name-046f820ee0034811869419574e4cfb42', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-e1049c3f05ac44f980f52abf677aae91')]
pool = <FakeResource address_scope_id=address-scope-id-e1049c3f05ac44f980f52abf677aae91, default_prefixlen=8, default_quota=None, id=subnet-pool-id-37efd4b556d34d629f9515ab33c581b0, ip_version=4, is_default=False, keys=<MagicMock id='47253479184272'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-046f820ee0034811869419574e4cfb42, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-4aff59dbb123442380d0c0c01ffcc7b3, shared=False, tenant_id=project-id-4aff59dbb123442380d0c0c01ffcc7b3>
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-96ef70b33c314d9191a1f5a20991518e', 8, None, 'subnet-pool-id-069228b2267f4b67bc6ca622c693abeb', 4, False, 32, 8, 'subnet-pool-name-d3caf58e5a1d449d9513f8feb9767bfe', '10.0.0.0/24, 10.1.0.0/24', 'project-id-8b54384c903d4fefb6e21578467f3b8f', 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