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-2275b00955194c758308a2b449099412, instance_id=server-id-acb1cd4f70d0430cac468f40958030e7, 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-03c533ac9629442586ffac0bc063a30b, id=floating-ip-id-397b75633ab4487e9fe1c2a7fcd7a750, keys=<MagicMock id='68202576'>, port_id=port-id-8e61c87d45344b628dde4f24c4a978a2, project_id=project-id-a881dec05b6d45438431e6d31d05659d, router_id=router-id-0690053bd82b47e2a2d130548df56aa7, status=DOWN, tenant_id=project-id-a881dec05b6d45438431e6d31d05659d>
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-d59ca31a021f414598928f109611d0fb', '1.0.9.0', '2.0.9.0', 'server-id-9ebac26e0a454395b50c44453c877049', 'public'), ('floating-ip-id-70031247f13e4c69a3e7236789183e95', '1.0.9.0', '2.0.9.0', 'server-id-6d2686a6b7c448f78adc9be71f3bc0ac', 'public'), ('floating-ip-id-ec340ddc8e32404eaa22cbeecc39a51a', '1.0.9.0', '2.0.9.0', 'server-id-3cf455546583499fa73b96e949ca694b', 'public')]
floating_ips = [<FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-d59ca31a021f414598928f109611d0fb, instance_id=server-id-9ebac26e0a454395b50c44453c877049, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-70031247f13e4c69a3e7236789183e95, instance_id=server-id-6d2686a6b7c448f78adc9be71f3bc0ac, ip=1.0.9.0, pool=public>, <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-ec340ddc8e32404eaa22cbeecc39a51a, instance_id=server-id-3cf455546583499fa73b96e949ca694b, ip=1.0.9.0, pool=public>]
ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-ec340ddc8e32404eaa22cbeecc39a51a, instance_id=server-id-3cf455546583499fa73b96e949ca694b, 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-410ab3d938f94d588fd82aed91782c33', '1.0.9.0', '2.0.9.0', 'port-id-39ba87f6bc1347439fac03318e7fefd2'), ('floating-ip-id-768337a417ed4ad5aee53b67dde4e8fc', '1.0.9.0', '2.0.9.0', 'port-id-bee20e049492402a8667505c939dda03'), ('floating-ip-id-4159ba5a7e294be69a530d0864ff77d3', '1.0.9.0', '2.0.9.0', 'port-id-5016c97052a54c4aa603278ed61ff448')]
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-9c6d7ea54eb94d649dccfab0e9421f64, id=floating-ip-id-410ab3d938f94d588fd82aed91782c33, keys=<MagicMock id='114865552'>, port_id=port-id-39ba87f6bc1347439fac03318e7fefd2, project_id=project-id-4d61bd21baf945a6938fbf3c4dd1c956, router_id=router-id-caf0feded0b7445a8631370dbbf3f89d, status=DOWN, tenant_id=project-id-4d61bd21baf945a6938fbf3c4dd1c956>, <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-0d86b38a48494eb38054f6362e6fb00a, id=floating-ip-id-768337a417ed4ad5aee53b67dde4e8fc, keys=<MagicMock id='126284688'>, port_id=port-id-bee20e049492402a8667505c939dda03, project_id=project-id-b6ae02ecc4f5405388d8b3b1e4a3e724, router_id=router-id-4cc7a0d26db24b47921c664884ce6fe3, status=DOWN, tenant_id=project-id-b6ae02ecc4f5405388d8b3b1e4a3e724>, <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-5784d4b9fbf6413ea8b0c4f5a2e8806d, id=floating-ip-id-4159ba5a7e294be69a530d0864ff77d3, keys=<MagicMock id='124594256'>, port_id=port-id-5016c97052a54c4aa603278ed61ff448, project_id=project-id-3848d357f7024861a54c4dccfb0ad4f5, router_id=router-id-a93af990bbc14c07ae135a07b728c648, status=DOWN, tenant_id=project-id-3848d357f7024861a54c4dccfb0ad4f5>]
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-5784d4b9fbf6413ea8b0c4f5a2e8806d, id=floating-ip-id-4159ba5a7e294be69a530d0864ff77d3, keys=<MagicMock id='124594256'>, port_id=port-id-5016c97052a54c4aa603278ed61ff448, project_id=project-id-3848d357f7024861a54c4dccfb0ad4f5, router_id=router-id-a93af990bbc14c07ae135a07b728c648, status=DOWN, tenant_id=project-id-3848d357f7024861a54c4dccfb0ad4f5>
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-e2f342692c60469ab62284e3ee048b0c', 'server-id-fa0c177d378047fbb9159b60abef7c28', '1.0.9.0', 'public')
floating_ip = <FakeResource fixed_ip=2.0.9.0, id=floating-ip-id-e2f342692c60469ab62284e3ee048b0c, instance_id=server-id-fa0c177d378047fbb9159b60abef7c28, 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-dac0e71f6d9c4700984514ea90f4ff0a', 'floating-ip-id-767c9fa25fb54df18a25c8621c909dd4', 'port-id-39d833fd61e84c69a83a209d1ae5a367', 'project-id-42ea9139b12b4f00b28a0b04b0228428', 'router-id-407c5a790b3548d68a71779c94189554', '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-dac0e71f6d9c4700984514ea90f4ff0a, id=floating-ip-id-767c9fa25fb54df18a25c8621c909dd4, keys=<MagicMock id='118103120'>, port_id=port-id-39d833fd61e84c69a83a209d1ae5a367, project_id=project-id-42ea9139b12b4f00b28a0b04b0228428, router_id=router-id-407c5a790b3548d68a71779c94189554, status=DOWN, tenant_id=project-id-42ea9139b12b4f00b28a0b04b0228428>
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-9748017476bd4086aaa387dfe529ecea', False, 'network-label-a45eedeea3f641a6aa0732b4a195f97f', None, False, '255.255.255.0', None, None, 'project-id-7b61060f341d4215ad6218096c3d7e87', 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-8d16382cf36344fb8c990bec75a822f1', 'network-name-abd33b6177744209885e033f2d94a7d8', '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-7689b385d0ba46968c114a520635291b', 'network-name-b664d70cc133406fbe492f1752fd9b09', '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-1cf03e63a0194201994db2e1036d8349', 'network-name-faa4ab909287414b9a5de81320aed973', 'a, b'), ('network-id-1aa6ae9487b144daabcd445af8e8e863', 'network-name-548e1a9aec044347b39ef2a0d02585d9', 'a, b'), ('network-id-231e62cec35a436daac212c459d91539', 'network-name-eba5316b6815415e92efd699013369cc', 'a, b')]
data_long = [('network-id-1cf03e63a0194201994db2e1036d8349', 'network-name-faa4ab909287414b9a5de81320aed973', 'ACTIVE', 'project-id-4fea896d79e84a3fb425fa932a37b5f3', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-1aa6ae9487b144daabcd445af8e8e863', 'network-name-548e1a9aec044347b39ef2a0d02585d9', 'ACTIVE', 'project-id-0c30e6cc54c74bbfb3dbedf610264b00', 'UP', False, 'a, b', 'vlan', 'External', ''), ('network-id-231e62cec35a436daac212c459d91539', 'network-name-eba5316b6815415e92efd699013369cc', 'ACTIVE', 'project-id-e05405ba5d374ccc9d7ac2d42d2b7472', 'UP', False, 'a, b', 'vlan', 'External', '')]
net = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], id=network-id-231e62cec35a436daac212c459d91539, keys=<MagicMock id='146406928'>, name=network-name-eba5316b6815415e92efd699013369cc, project_id=project-id-e05405ba5d374ccc9d7ac2d42d2b7472, provider_network_type=vlan, router_external=True, shared=False, status=ACTIVE, subnets=['a', 'b'], tenant_id=project-id-e05405ba5d374ccc9d7ac2d42d2b7472>
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-57886699a503444881704bd4f52a5bcb', 'network-label-82a9d9b6274f4f9596d215bff62a3e2d', '10.0.0.0/24'), ('network-id-fa925beaec6a413ab85bb1f1c891d151', 'network-label-a302cd504bf14573b4d48772cb7dc917', '10.0.0.0/24'), ('network-id-23a6188d71864da795c7cad923f62820', 'network-label-a82cb3f6398c494d8053b0eb12387d9c', '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-23a6188d71864da795c7cad923f62820, injected=False, keys=<MagicMock id='158950160'>, label=network-label-a82cb3f6398c494d8053b0eb12387d9c, mtu=None, multi_host=False, netmask=255.255.255.0, netmask_v6=None, priority=None, project_id=project-id-a8f768cb17114716a63116575548fc09, 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-b8c16730d86c4721b92cd7a0f86184cb', 'network-name-c7123b7df0c943e68eef7a9dce093223', 'project-id-5f71c7ed89974ae1bfc0f269205c977a', '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-3c1a513d8892460ea82c27f61e7918ce', False, 'network-label-98c3bbae52c8447b9ed12acec150d96b', None, False, '255.255.255.0', None, None, 'project-id-1c94fe2023834e05ad8908922920b048', 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-8efe276e897643a8ac645db3d712375a', '', '', 'ovs', 'normal', 'device-id-bde89212119c4fb9851f21b24300ec32', 'compute:nova', '', 'dns-name-ecae19c9ec3a4efda64a0ef5aee84b71', '', '', 'port-id-203773c6682b433d9f02211f2dead831', 'fa:16:3e:a9:4e:72', 'port-name-461819cd8401400e9d44519d744f3e21', 'network-id-7fdf030b6ed549c79fed14a95e0c99cf', True, 'project-id-c79e19e0d4ac4798aeec8f292b279f47', '', '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-e15eb1c80ec64c64810c6161a3b2e5ea', 'router-name-0aa38e9e20784baf8f7cd67fcafb1519', 'project-id-01cf5f2ed71145d89cff463fa8477dd1')
new_router = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-e15eb1c80ec64c64810c6161a3b2e5ea, keys=<MagicMock id='168566480'>, name=router-name-0aa38e9e20784baf8f7cd67fcafb1519, routes=[], status=ACTIVE, tenant_id=project-id-01cf5f2ed71145d89cff463fa8477dd1>
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-884cfe953dc94bacaf242bc718d5a058', 'router-name-410a542b049b4f7dbef10c12c68c5c2c', 'ACTIVE', 'UP', False, False, 'project-id-193b01c8d949485b82668840e47a6203'), ('router-id-6ff2220ea9654164b50b48e3c2cdfb69', 'router-name-c67697b8ea0349a69bbfca92ad4e1390', 'ACTIVE', 'UP', False, False, 'project-id-669f38867c4e4c6d86f7c1edbec260f4'), ('router-id-285e36bd1c5d4161a93e64c878b3acbf', 'router-name-127044e15b094fdc9bd08b1404daf61a', 'ACTIVE', 'UP', False, False, 'project-id-32acf51dbc3e48b1973b2f80ca2220d3')]
data_long = [('router-id-884cfe953dc94bacaf242bc718d5a058', 'router-name-410a542b049b4f7dbef10c12c68c5c2c', 'ACTIVE', 'UP', False, False, 'project-id-193b01c8d949485b82668840e47a6203', [], '{}', ''), ('router-id-6ff2220ea9654164b50b48e3c2cdfb69', 'router-name-c67697b8ea0349a69bbfca92ad4e1390', 'ACTIVE', 'UP', False, False, 'project-id-669f38867c4e4c6d86f7c1edbec260f4', [], '{}', ''), ('router-id-285e36bd1c5d4161a93e64c878b3acbf', 'router-name-127044e15b094fdc9bd08b1404daf61a', 'ACTIVE', 'UP', False, False, 'project-id-32acf51dbc3e48b1973b2f80ca2220d3', [], '{}', '')]
i = 2
r = <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-285e36bd1c5d4161a93e64c878b3acbf, keys=<MagicMock id='69807440'>, name=router-name-127044e15b094fdc9bd08b1404daf61a, routes=[], status=ACTIVE, tenant_id=project-id-32acf51dbc3e48b1973b2f80ca2220d3>
routers = [<FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-884cfe953dc94bacaf242bc718d5a058, keys=<MagicMock id='141076944'>, name=router-name-410a542b049b4f7dbef10c12c68c5c2c, routes=[], status=ACTIVE, tenant_id=project-id-193b01c8d949485b82668840e47a6203>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-6ff2220ea9654164b50b48e3c2cdfb69, keys=<MagicMock id='161888080'>, name=router-name-c67697b8ea0349a69bbfca92ad4e1390, routes=[], status=ACTIVE, tenant_id=project-id-669f38867c4e4c6d86f7c1edbec260f4>, <FakeResource admin_state_up=True, availability_zone_hints=[], availability_zones=[], distributed=False, external_gateway_info={}, ha=False, id=router-id-285e36bd1c5d4161a93e64c878b3acbf, keys=<MagicMock id='69807440'>, name=router-name-127044e15b094fdc9bd08b1404daf61a, routes=[], status=ACTIVE, tenant_id=project-id-32acf51dbc3e48b1973b2f80ca2220d3>]
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-91584b6ddb584afb92e14bf6dd5d24ea', 'router-name-3193b393ce494847a5a4f1163ff8ce21', 'project-id-a8fc7806b8d24f84ae6052a2b49cd57c')
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-5ba66931174d46b5b80e933715a704bd', 'security-group-name-c322cfa469b0497293e1002918ff7a04', 'security-group-description-a84969fd8fe54c22b5afeb94e3e15803'),)
expected_data_all_projects = (('security-group-id-5ba66931174d46b5b80e933715a704bd', 'security-group-name-c322cfa469b0497293e1002918ff7a04', 'security-group-description-a84969fd8fe54c22b5afeb94e3e15803', 'project-id-41b63d664a294d69a7a4a63ec3703f2e'),)
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-ea1708de17284cdbb80b1164f4f7b4c1', 'security-group-name-04a16142f2254af68d1294fa63dafa9a', 'security-group-description-d932d177d93e4469b9f5f245ce70bcc3', 'project-id-71316ffc9c7b4d968d1dd07399846472'),)
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-d80926527d66463c8db7707b0398aee5', 'icmp', '0.0.0.0/0', 'security-group-id-71c18bb5a25e4f778320401bfb3a5cdd', '', '')
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-e9fcb830eef04616bd7dca9980b4cced', None, None, 'project-id-6b4d01cf59d04822ae45a21af4ca4702', None, 'remote-security-group-id-2bed6b1fb72a42cd99212de9943fb7e2', None, 'security-group-id-c90ffe1880604a8e81e959eb99bebe10')
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-a5d9fefd00ba4be5b6c1962630090c97', 'subnet-name-b5670dda67f44edaa5fb01a5f053e8cc', 'network-id-7b895067cb0545ca86e9119e92f96c7b', '10.10.10.0/24'), ('subnet-id-cc53ccfed053452790b46a0f9b3452ac', 'subnet-name-e44fed40368c474c90458f20f39bbead', 'network-id-0ea05b6b609442cdbb71ad389a8eb8ae', '10.10.10.0/24'), ('subnet-id-52e5a57efe664daeaaf4995a7cc5f904', 'subnet-name-dcfc50e2e1ba492d92fe3625253bbd3d', 'network-id-d95ade00d03b429b9e958d00ef9845b4', '10.10.10.0/24')]
data_long = [('subnet-id-a5d9fefd00ba4be5b6c1962630090c97', 'subnet-name-b5670dda67f44edaa5fb01a5f053e8cc', 'network-id-7b895067cb0545ca86e9119e92f96c7b', '10.10.10.0/24', 'project-id-8a9ad1cb49fe4b32aa73b8505e789ee9', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-cc53ccfed053452790b46a0f9b3452ac', 'subnet-name-e44fed40368c474c90458f20f39bbead', 'network-id-0ea05b6b609442cdbb71ad389a8eb8ae', '10.10.10.0/24', 'project-id-1198201fe05340ad85524e079058bae0', True, '', '', '', '4', '10.10.10.1'), ('subnet-id-52e5a57efe664daeaaf4995a7cc5f904', 'subnet-name-dcfc50e2e1ba492d92fe3625253bbd3d', 'network-id-d95ade00d03b429b9e958d00ef9845b4', '10.10.10.0/24', 'project-id-8ec9c09ab5e640fa91c4d48fde2bf5c6', 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-52e5a57efe664daeaaf4995a7cc5f904, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, keys=<MagicMock id='70902800'>, name=subnet-name-dcfc50e2e1ba492d92fe3625253bbd3d, network_id=network-id-d95ade00d03b429b9e958d00ef9845b4, project_id=project-id-8ec9c09ab5e640fa91c4d48fde2bf5c6, subnetpool_id=None, tenant_id=project-id-8ec9c09ab5e640fa91c4d48fde2bf5c6>
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-8c49e11684e24cec8168bfd3b39022eb', '4', 'None', 'None', 'subnet-name-312d2ddc83064f279cd970b1a4456999', 'network-id-7771e10d53414ce7ad3cc5d013375e42', 'project-id-f1ac5711100043979d3fc333c44a511e', '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-9cb6cf9628ed4fb7a091702d5691e404', 'subnet-pool-name-bc0aa49995144b3395007bb44862110c', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-9f8ed777893a41718f5f0d28f79e8844', 'subnet-pool-name-57196f6fddd340dba9fc78ca37a08b6e', ['10.0.0.0/24', '10.1.0.0/24']), ('subnet-pool-id-211bc6903cf0429d90aca783bce2fe01', 'subnet-pool-name-377e265729de42cda7577c749269ca71', ['10.0.0.0/24', '10.1.0.0/24'])]
data_long = [('subnet-pool-id-9cb6cf9628ed4fb7a091702d5691e404', 'subnet-pool-name-bc0aa49995144b3395007bb44862110c', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-cfa40b089c21491c963222942c8b15dc'), ('subnet-pool-id-9f8ed777893a41718f5f0d28f79e8844', 'subnet-pool-name-57196f6fddd340dba9fc78ca37a08b6e', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-307cb0b53cd74d6a9f6c7bfacda99cb5'), ('subnet-pool-id-211bc6903cf0429d90aca783bce2fe01', 'subnet-pool-name-377e265729de42cda7577c749269ca71', ['10.0.0.0/24', '10.1.0.0/24'], 8, 'address-scope-id-ed2b75df18104a0da5df40d7f63270f5')]
pool = <FakeResource address_scope_id=address-scope-id-ed2b75df18104a0da5df40d7f63270f5, default_prefixlen=8, default_quota=None, id=subnet-pool-id-211bc6903cf0429d90aca783bce2fe01, ip_version=4, is_default=False, keys=<MagicMock id='154112336'>, max_prefixlen=32, min_prefixlen=8, name=subnet-pool-name-377e265729de42cda7577c749269ca71, prefixes=['10.0.0.0/24', '10.1.0.0/24'], project_id=project-id-5877b79056634fbe819f604478d7c83a, shared=False, tenant_id=project-id-5877b79056634fbe819f604478d7c83a>
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-2ae623941e0e4a8cbd898c8e31a093c7', 8, None, 'subnet-pool-id-1f9b07dbd5524570b19aa516c6e69292', 4, False, 32, 8, 'subnet-pool-name-4ede71d0daf043a3973a620bab756d9e', '10.0.0.0/24, 10.1.0.0/24', 'project-id-13014d8972464beca72e0ea4eea417ca', 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