Bump black to 23.3.0
I was using the distro-provided version of black, 22.8.0, during the blackify series. There's a newer version out however, 23.3.0. Bump this, applying the various changes it introduces in the process. Change-Id: I3442a7ddaf0cb35f37b84bdbe06625a28e982dba Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
c946294bdd
commit
c7010a2f92
@ -22,7 +22,7 @@ repos:
|
|||||||
hooks:
|
hooks:
|
||||||
- id: doc8
|
- id: doc8
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 22.8.0
|
rev: 23.3.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
args: ['-S', '-l', '79']
|
args: ['-S', '-l', '79']
|
||||||
|
@ -38,7 +38,6 @@ def download_image_stream(conn):
|
|||||||
# Read only 1024 bytes of memory at a time until
|
# Read only 1024 bytes of memory at a time until
|
||||||
# all of the image data has been consumed.
|
# all of the image data has been consumed.
|
||||||
for chunk in response.iter_content(chunk_size=1024):
|
for chunk in response.iter_content(chunk_size=1024):
|
||||||
|
|
||||||
# With each chunk, add it to the hash to be computed.
|
# With each chunk, add it to the hash to be computed.
|
||||||
md5.update(chunk)
|
md5.update(chunk)
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@ from openstack.workflow import workflow_service
|
|||||||
|
|
||||||
|
|
||||||
class ServicesMixin:
|
class ServicesMixin:
|
||||||
|
|
||||||
identity = identity_service.IdentityService(service_type='identity')
|
identity = identity_service.IdentityService(service_type='identity')
|
||||||
|
|
||||||
compute = compute_service.ComputeService(service_type='compute')
|
compute = compute_service.ComputeService(service_type='compute')
|
||||||
|
@ -27,7 +27,6 @@ from openstack import utils
|
|||||||
|
|
||||||
|
|
||||||
class Proxy(proxy.Proxy):
|
class Proxy(proxy.Proxy):
|
||||||
|
|
||||||
retriable_status_codes = _common.RETRIABLE_STATUS_CODES
|
retriable_status_codes = _common.RETRIABLE_STATUS_CODES
|
||||||
|
|
||||||
_resource_registry = {
|
_resource_registry = {
|
||||||
|
@ -17,7 +17,6 @@ from openstack import utils
|
|||||||
|
|
||||||
|
|
||||||
class Allocation(_common.ListMixin, resource.Resource):
|
class Allocation(_common.ListMixin, resource.Resource):
|
||||||
|
|
||||||
resources_key = 'allocations'
|
resources_key = 'allocations'
|
||||||
base_path = '/allocations'
|
base_path = '/allocations'
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class Chassis(_common.ListMixin, resource.Resource):
|
class Chassis(_common.ListMixin, resource.Resource):
|
||||||
|
|
||||||
resources_key = 'chassis'
|
resources_key = 'chassis'
|
||||||
base_path = '/chassis'
|
base_path = '/chassis'
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class Conductor(_common.ListMixin, resource.Resource):
|
class Conductor(_common.ListMixin, resource.Resource):
|
||||||
|
|
||||||
resources_key = 'conductors'
|
resources_key = 'conductors'
|
||||||
base_path = '/conductors'
|
base_path = '/conductors'
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class DeployTemplate(_common.ListMixin, resource.Resource):
|
class DeployTemplate(_common.ListMixin, resource.Resource):
|
||||||
|
|
||||||
resources_key = 'deploy_templates'
|
resources_key = 'deploy_templates'
|
||||||
base_path = '/deploy_templates'
|
base_path = '/deploy_templates'
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@ from openstack import utils
|
|||||||
|
|
||||||
|
|
||||||
class Driver(resource.Resource):
|
class Driver(resource.Resource):
|
||||||
|
|
||||||
resources_key = 'drivers'
|
resources_key = 'drivers'
|
||||||
base_path = '/drivers'
|
base_path = '/drivers'
|
||||||
|
|
||||||
|
@ -71,7 +71,6 @@ class WaitResult(
|
|||||||
|
|
||||||
|
|
||||||
class Node(_common.ListMixin, resource.Resource):
|
class Node(_common.ListMixin, resource.Resource):
|
||||||
|
|
||||||
resources_key = 'nodes'
|
resources_key = 'nodes'
|
||||||
base_path = '/nodes'
|
base_path = '/nodes'
|
||||||
|
|
||||||
@ -1323,7 +1322,6 @@ class Node(_common.ListMixin, resource.Resource):
|
|||||||
base_path=None,
|
base_path=None,
|
||||||
reset_interfaces=None,
|
reset_interfaces=None,
|
||||||
):
|
):
|
||||||
|
|
||||||
if reset_interfaces is not None:
|
if reset_interfaces is not None:
|
||||||
# The id cannot be dirty for an commit
|
# The id cannot be dirty for an commit
|
||||||
self._body._dirty.discard("id")
|
self._body._dirty.discard("id")
|
||||||
|
@ -15,7 +15,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class Port(_common.ListMixin, resource.Resource):
|
class Port(_common.ListMixin, resource.Resource):
|
||||||
|
|
||||||
resources_key = 'ports'
|
resources_key = 'ports'
|
||||||
base_path = '/ports'
|
base_path = '/ports'
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class PortGroup(_common.ListMixin, resource.Resource):
|
class PortGroup(_common.ListMixin, resource.Resource):
|
||||||
|
|
||||||
resources_key = 'portgroups'
|
resources_key = 'portgroups'
|
||||||
base_path = '/portgroups'
|
base_path = '/portgroups'
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class VolumeConnector(_common.ListMixin, resource.Resource):
|
class VolumeConnector(_common.ListMixin, resource.Resource):
|
||||||
|
|
||||||
resources_key = 'connectors'
|
resources_key = 'connectors'
|
||||||
base_path = '/volume/connectors'
|
base_path = '/volume/connectors'
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class VolumeTarget(_common.ListMixin, resource.Resource):
|
class VolumeTarget(_common.ListMixin, resource.Resource):
|
||||||
|
|
||||||
resources_key = 'targets'
|
resources_key = 'targets'
|
||||||
base_path = '/volume/targets'
|
base_path = '/volume/targets'
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@ _logger = _log.setup_logging('openstack')
|
|||||||
|
|
||||||
|
|
||||||
class Introspection(resource.Resource):
|
class Introspection(resource.Resource):
|
||||||
|
|
||||||
resources_key = 'introspection'
|
resources_key = 'introspection'
|
||||||
base_path = '/introspection'
|
base_path = '/introspection'
|
||||||
|
|
||||||
|
@ -22,7 +22,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class Proxy(_base_proxy.BaseBlockStorageProxy):
|
class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||||
|
|
||||||
# ====== SNAPSHOTS ======
|
# ====== SNAPSHOTS ======
|
||||||
def get_snapshot(self, snapshot):
|
def get_snapshot(self, snapshot):
|
||||||
"""Get a single snapshot
|
"""Get a single snapshot
|
||||||
|
@ -14,7 +14,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class QuotaSet(quota_set.QuotaSet):
|
class QuotaSet(quota_set.QuotaSet):
|
||||||
|
|
||||||
#: Properties
|
#: Properties
|
||||||
#: The size (GB) of backups that are allowed for each project.
|
#: The size (GB) of backups that are allowed for each project.
|
||||||
backup_gigabytes = resource.Body('backup_gigabytes', type=int)
|
backup_gigabytes = resource.Body('backup_gigabytes', type=int)
|
||||||
|
@ -14,7 +14,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class QuotaSet(quota_set.QuotaSet):
|
class QuotaSet(quota_set.QuotaSet):
|
||||||
|
|
||||||
#: Properties
|
#: Properties
|
||||||
#: The size (GB) of backups that are allowed for each project.
|
#: The size (GB) of backups that are allowed for each project.
|
||||||
backup_gigabytes = resource.Body('backup_gigabytes', type=int)
|
backup_gigabytes = resource.Body('backup_gigabytes', type=int)
|
||||||
|
@ -294,7 +294,6 @@ class BlockStorageCloudMixin:
|
|||||||
project_id = None
|
project_id = None
|
||||||
error_msg = "Failed to get limits"
|
error_msg = "Failed to get limits"
|
||||||
if name_or_id:
|
if name_or_id:
|
||||||
|
|
||||||
proj = self.get_project(name_or_id)
|
proj = self.get_project(name_or_id)
|
||||||
if not proj:
|
if not proj:
|
||||||
raise exc.OpenStackCloudException("project does not exist")
|
raise exc.OpenStackCloudException("project does not exist")
|
||||||
|
@ -432,7 +432,6 @@ class ComputeCloudMixin:
|
|||||||
params = {}
|
params = {}
|
||||||
project_id = None
|
project_id = None
|
||||||
if name_or_id:
|
if name_or_id:
|
||||||
|
|
||||||
proj = self.get_project(name_or_id)
|
proj = self.get_project(name_or_id)
|
||||||
if not proj:
|
if not proj:
|
||||||
raise exc.OpenStackCloudException("project does not exist")
|
raise exc.OpenStackCloudException("project does not exist")
|
||||||
@ -874,7 +873,7 @@ class ComputeCloudMixin:
|
|||||||
user_data = kwargs.pop('userdata')
|
user_data = kwargs.pop('userdata')
|
||||||
if user_data:
|
if user_data:
|
||||||
kwargs['user_data'] = self._encode_server_userdata(user_data)
|
kwargs['user_data'] = self._encode_server_userdata(user_data)
|
||||||
for (desired, given) in (
|
for desired, given in (
|
||||||
('OS-DCF:diskConfig', 'disk_config'),
|
('OS-DCF:diskConfig', 'disk_config'),
|
||||||
('config_drive', 'config_drive'),
|
('config_drive', 'config_drive'),
|
||||||
('key_name', 'key_name'),
|
('key_name', 'key_name'),
|
||||||
@ -1092,7 +1091,6 @@ class ComputeCloudMixin:
|
|||||||
kwargs['block_device_mapping_v2'].append(block_mapping)
|
kwargs['block_device_mapping_v2'].append(block_mapping)
|
||||||
kwargs['imageRef'] = ''
|
kwargs['imageRef'] = ''
|
||||||
elif boot_from_volume:
|
elif boot_from_volume:
|
||||||
|
|
||||||
if isinstance(image, dict):
|
if isinstance(image, dict):
|
||||||
image_obj = image
|
image_obj = image
|
||||||
else:
|
else:
|
||||||
|
@ -495,7 +495,6 @@ class FloatingIPCloudMixin:
|
|||||||
timeout=60,
|
timeout=60,
|
||||||
network_id=None,
|
network_id=None,
|
||||||
):
|
):
|
||||||
|
|
||||||
if not network_id:
|
if not network_id:
|
||||||
if network_name_or_id:
|
if network_name_or_id:
|
||||||
try:
|
try:
|
||||||
@ -796,7 +795,6 @@ class FloatingIPCloudMixin:
|
|||||||
def _neutron_attach_ip_to_server(
|
def _neutron_attach_ip_to_server(
|
||||||
self, server, floating_ip, fixed_address=None, nat_destination=None
|
self, server, floating_ip, fixed_address=None, nat_destination=None
|
||||||
):
|
):
|
||||||
|
|
||||||
# Find an available port
|
# Find an available port
|
||||||
(port, fixed_address) = self._nat_destination_port(
|
(port, fixed_address) = self._nat_destination_port(
|
||||||
server,
|
server,
|
||||||
@ -884,7 +882,6 @@ class FloatingIPCloudMixin:
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def _nova_detach_ip_from_server(self, server_id, floating_ip_id):
|
def _nova_detach_ip_from_server(self, server_id, floating_ip_id):
|
||||||
|
|
||||||
f_ip = self.get_floating_ip(id=floating_ip_id)
|
f_ip = self.get_floating_ip(id=floating_ip_id)
|
||||||
if f_ip is None:
|
if f_ip is None:
|
||||||
raise exc.OpenStackCloudException(
|
raise exc.OpenStackCloudException(
|
||||||
|
@ -454,7 +454,6 @@ class IdentityCloudMixin:
|
|||||||
'name', 'enabled', 'type', 'service_type', 'description'
|
'name', 'enabled', 'type', 'service_type', 'description'
|
||||||
)
|
)
|
||||||
def update_service(self, name_or_id, **kwargs):
|
def update_service(self, name_or_id, **kwargs):
|
||||||
|
|
||||||
# NOTE(SamYaple): Keystone v3 only accepts 'type' but shade accepts
|
# NOTE(SamYaple): Keystone v3 only accepts 'type' but shade accepts
|
||||||
# both 'type' and 'service_type' with a preference
|
# both 'type' and 'service_type' with a preference
|
||||||
# towards 'type'
|
# towards 'type'
|
||||||
|
@ -90,7 +90,6 @@ class NetworkCommonCloudMixin:
|
|||||||
return
|
return
|
||||||
|
|
||||||
for network in all_networks:
|
for network in all_networks:
|
||||||
|
|
||||||
# External IPv4 networks
|
# External IPv4 networks
|
||||||
if (
|
if (
|
||||||
network['name'] in self._external_ipv4_names
|
network['name'] in self._external_ipv4_names
|
||||||
|
@ -465,7 +465,6 @@ class SecurityGroupCloudMixin:
|
|||||||
# TODO(stephenfin): Remove this once we get rid of support for nova
|
# TODO(stephenfin): Remove this once we get rid of support for nova
|
||||||
# secgroups
|
# secgroups
|
||||||
def _normalize_secgroup(self, group):
|
def _normalize_secgroup(self, group):
|
||||||
|
|
||||||
ret = utils.Munch()
|
ret = utils.Munch()
|
||||||
# Copy incoming group because of shared dicts in unittests
|
# Copy incoming group because of shared dicts in unittests
|
||||||
group = group.copy()
|
group = group.copy()
|
||||||
@ -518,7 +517,6 @@ class SecurityGroupCloudMixin:
|
|||||||
# TODO(stephenfin): Remove this once we get rid of support for nova
|
# TODO(stephenfin): Remove this once we get rid of support for nova
|
||||||
# secgroups
|
# secgroups
|
||||||
def _normalize_secgroup_rule(self, rule):
|
def _normalize_secgroup_rule(self, rule):
|
||||||
|
|
||||||
ret = utils.Munch()
|
ret = utils.Munch()
|
||||||
# Copy incoming rule because of shared dicts in unittests
|
# Copy incoming rule because of shared dicts in unittests
|
||||||
rule = rule.copy()
|
rule = rule.copy()
|
||||||
|
@ -23,7 +23,6 @@ __all__ = ['OpenStackInventory']
|
|||||||
|
|
||||||
|
|
||||||
class OpenStackInventory:
|
class OpenStackInventory:
|
||||||
|
|
||||||
# Put this here so the capability can be detected with hasattr on the class
|
# Put this here so the capability can be detected with hasattr on the class
|
||||||
extra_config = None
|
extra_config = None
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ def find_nova_interfaces(
|
|||||||
addresses, ext_tag=None, key_name=None, version=4, mac_addr=None
|
addresses, ext_tag=None, key_name=None, version=4, mac_addr=None
|
||||||
):
|
):
|
||||||
ret = []
|
ret = []
|
||||||
for (k, v) in iter(addresses.items()):
|
for k, v in iter(addresses.items()):
|
||||||
if key_name is not None and k != key_name:
|
if key_name is not None and k != key_name:
|
||||||
# key_name is specified and it doesn't match the current network.
|
# key_name is specified and it doesn't match the current network.
|
||||||
# Continue with the next one
|
# Continue with the next one
|
||||||
|
@ -75,7 +75,6 @@ class _OpenStackCloudMixin:
|
|||||||
_SHADE_OBJECT_AUTOCREATE_KEY = 'x-object-meta-x-shade-autocreated'
|
_SHADE_OBJECT_AUTOCREATE_KEY = 'x-object-meta-x-shade-autocreated'
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
||||||
super(_OpenStackCloudMixin, self).__init__()
|
super(_OpenStackCloudMixin, self).__init__()
|
||||||
|
|
||||||
self.log = _log.setup_logging('openstack')
|
self.log = _log.setup_logging('openstack')
|
||||||
|
@ -15,7 +15,6 @@ from openstack import utils
|
|||||||
|
|
||||||
|
|
||||||
class MetadataMixin:
|
class MetadataMixin:
|
||||||
|
|
||||||
#: *Type: list of tag strings*
|
#: *Type: list of tag strings*
|
||||||
metadata = resource.Body('metadata', type=dict)
|
metadata = resource.Body('metadata', type=dict)
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@ from openstack import utils
|
|||||||
|
|
||||||
|
|
||||||
class TagMixin:
|
class TagMixin:
|
||||||
|
|
||||||
_tag_query_parameters = {
|
_tag_query_parameters = {
|
||||||
'tags': 'tags',
|
'tags': 'tags',
|
||||||
'any_tags': 'tags-any',
|
'any_tags': 'tags-any',
|
||||||
|
@ -14,7 +14,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class AbsoluteLimits(resource.Resource):
|
class AbsoluteLimits(resource.Resource):
|
||||||
|
|
||||||
_max_microversion = '2.57'
|
_max_microversion = '2.57'
|
||||||
|
|
||||||
#: The number of key-value pairs that can be set as image metadata.
|
#: The number of key-value pairs that can be set as image metadata.
|
||||||
@ -74,7 +73,6 @@ class AbsoluteLimits(resource.Resource):
|
|||||||
|
|
||||||
|
|
||||||
class RateLimit(resource.Resource):
|
class RateLimit(resource.Resource):
|
||||||
|
|
||||||
# TODO(mordred) Make a resource type for the contents of limit and add
|
# TODO(mordred) Make a resource type for the contents of limit and add
|
||||||
# it to list_type here.
|
# it to list_type here.
|
||||||
#: A list of the specific limits that apply to the ``regex`` and ``uri``.
|
#: A list of the specific limits that apply to the ``regex`` and ``uri``.
|
||||||
|
@ -14,7 +14,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class ServerActionEvent(resource.Resource):
|
class ServerActionEvent(resource.Resource):
|
||||||
|
|
||||||
# Added the 'details' field in 2.84
|
# Added the 'details' field in 2.84
|
||||||
_max_microversion = '2.84'
|
_max_microversion = '2.84'
|
||||||
|
|
||||||
|
@ -41,7 +41,6 @@ class ServerIP(resource.Resource):
|
|||||||
base_path=None,
|
base_path=None,
|
||||||
**params
|
**params
|
||||||
):
|
):
|
||||||
|
|
||||||
if base_path is None:
|
if base_path is None:
|
||||||
base_path = cls.base_path
|
base_path = cls.base_path
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ def normalize_keys(config):
|
|||||||
def merge_clouds(old_dict, new_dict):
|
def merge_clouds(old_dict, new_dict):
|
||||||
"""Like dict.update, except handling nested dicts."""
|
"""Like dict.update, except handling nested dicts."""
|
||||||
ret = old_dict.copy()
|
ret = old_dict.copy()
|
||||||
for (k, v) in new_dict.items():
|
for k, v in new_dict.items():
|
||||||
if isinstance(v, dict):
|
if isinstance(v, dict):
|
||||||
if k in ret:
|
if k in ret:
|
||||||
ret[k] = merge_clouds(ret[k], v)
|
ret[k] = merge_clouds(ret[k], v)
|
||||||
|
@ -101,7 +101,7 @@ def get_boolean(value):
|
|||||||
def _auth_update(old_dict, new_dict_source):
|
def _auth_update(old_dict, new_dict_source):
|
||||||
"""Like dict.update, except handling the nested dict called auth."""
|
"""Like dict.update, except handling the nested dict called auth."""
|
||||||
new_dict = copy.deepcopy(new_dict_source)
|
new_dict = copy.deepcopy(new_dict_source)
|
||||||
for (k, v) in new_dict.items():
|
for k, v in new_dict.items():
|
||||||
if k == 'auth':
|
if k == 'auth':
|
||||||
if k in old_dict:
|
if k in old_dict:
|
||||||
old_dict[k].update(v)
|
old_dict[k].update(v)
|
||||||
@ -143,7 +143,6 @@ def _fix_argv(argv):
|
|||||||
|
|
||||||
|
|
||||||
class OpenStackConfig:
|
class OpenStackConfig:
|
||||||
|
|
||||||
# These two attribute are to allow os-client-config to plumb in its
|
# These two attribute are to allow os-client-config to plumb in its
|
||||||
# local versions for backwards compat.
|
# local versions for backwards compat.
|
||||||
# They should not be used by anyone else.
|
# They should not be used by anyone else.
|
||||||
@ -949,7 +948,6 @@ class OpenStackConfig:
|
|||||||
return new_cloud
|
return new_cloud
|
||||||
|
|
||||||
def get_all(self):
|
def get_all(self):
|
||||||
|
|
||||||
clouds = []
|
clouds = []
|
||||||
|
|
||||||
for cloud in self.get_cloud_names():
|
for cloud in self.get_cloud_names():
|
||||||
@ -985,7 +983,7 @@ class OpenStackConfig:
|
|||||||
|
|
||||||
os_args = dict()
|
os_args = dict()
|
||||||
new_args = dict()
|
new_args = dict()
|
||||||
for (key, val) in iter(args.items()):
|
for key, val in iter(args.items()):
|
||||||
if type(args[key]) == dict:
|
if type(args[key]) == dict:
|
||||||
# dive into the auth dict
|
# dive into the auth dict
|
||||||
new_args[key] = self._fix_args(args[key])
|
new_args[key] = self._fix_args(args[key])
|
||||||
@ -1136,7 +1134,6 @@ class OpenStackConfig:
|
|||||||
return config
|
return config
|
||||||
|
|
||||||
def _clean_up_after_ourselves(self, config, p_opt, winning_value):
|
def _clean_up_after_ourselves(self, config, p_opt, winning_value):
|
||||||
|
|
||||||
# Clean up after ourselves
|
# Clean up after ourselves
|
||||||
for opt in [p_opt.name] + [o.name for o in p_opt.deprecated]:
|
for opt in [p_opt.name] + [o.name for o in p_opt.deprecated]:
|
||||||
opt = opt.replace('-', '_')
|
opt = opt.replace('-', '_')
|
||||||
@ -1245,7 +1242,7 @@ class OpenStackConfig:
|
|||||||
|
|
||||||
# Can't just do update, because None values take over
|
# Can't just do update, because None values take over
|
||||||
for arg_list in region_args, args:
|
for arg_list in region_args, args:
|
||||||
for (key, val) in iter(arg_list.items()):
|
for key, val in iter(arg_list.items()):
|
||||||
if val is not None:
|
if val is not None:
|
||||||
if key == 'auth' and config[key] is not None:
|
if key == 'auth' and config[key] is not None:
|
||||||
config[key] = _auth_update(config[key], val)
|
config[key] = _auth_update(config[key], val)
|
||||||
@ -1268,7 +1265,7 @@ class OpenStackConfig:
|
|||||||
auth_plugin = None
|
auth_plugin = None
|
||||||
|
|
||||||
# If any of the defaults reference other values, we need to expand
|
# If any of the defaults reference other values, we need to expand
|
||||||
for (key, value) in config.items():
|
for key, value in config.items():
|
||||||
if hasattr(value, 'format') and key not in FORMAT_EXCLUSIONS:
|
if hasattr(value, 'format') and key not in FORMAT_EXCLUSIONS:
|
||||||
config[key] = value.format(**config)
|
config[key] = value.format(**config)
|
||||||
|
|
||||||
@ -1367,7 +1364,7 @@ class OpenStackConfig:
|
|||||||
|
|
||||||
# Can't just do update, because None values take over
|
# Can't just do update, because None values take over
|
||||||
for arg_list in region_args, args:
|
for arg_list in region_args, args:
|
||||||
for (key, val) in iter(arg_list.items()):
|
for key, val in iter(arg_list.items()):
|
||||||
if val is not None:
|
if val is not None:
|
||||||
if key == 'auth' and config[key] is not None:
|
if key == 'auth' and config[key] is not None:
|
||||||
config[key] = _auth_update(config[key], val)
|
config[key] = _auth_update(config[key], val)
|
||||||
@ -1389,7 +1386,7 @@ class OpenStackConfig:
|
|||||||
auth_plugin = None
|
auth_plugin = None
|
||||||
|
|
||||||
# If any of the defaults reference other values, we need to expand
|
# If any of the defaults reference other values, we need to expand
|
||||||
for (key, value) in config.items():
|
for key, value in config.items():
|
||||||
if hasattr(value, 'format') and key not in FORMAT_EXCLUSIONS:
|
if hasattr(value, 'format') and key not in FORMAT_EXCLUSIONS:
|
||||||
config[key] = value.format(**config)
|
config[key] = value.format(**config)
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@ from openstack import proxy
|
|||||||
|
|
||||||
|
|
||||||
class Proxy(proxy.Proxy):
|
class Proxy(proxy.Proxy):
|
||||||
|
|
||||||
_resource_registry = {
|
_resource_registry = {
|
||||||
"cluster": _cluster.Cluster,
|
"cluster": _cluster.Cluster,
|
||||||
"cluster_template": _cluster_template.ClusterTemplate,
|
"cluster_template": _cluster_template.ClusterTemplate,
|
||||||
|
@ -16,7 +16,6 @@ from openstack import utils
|
|||||||
|
|
||||||
|
|
||||||
class Cluster(resource.Resource):
|
class Cluster(resource.Resource):
|
||||||
|
|
||||||
resources_key = 'clusters'
|
resources_key = 'clusters'
|
||||||
base_path = '/clusters'
|
base_path = '/clusters'
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class ClusterCertificate(resource.Resource):
|
class ClusterCertificate(resource.Resource):
|
||||||
|
|
||||||
base_path = '/certificates'
|
base_path = '/certificates'
|
||||||
|
|
||||||
# capabilities
|
# capabilities
|
||||||
|
@ -14,7 +14,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class ClusterTemplate(resource.Resource):
|
class ClusterTemplate(resource.Resource):
|
||||||
|
|
||||||
resources_key = 'clustertemplates'
|
resources_key = 'clustertemplates'
|
||||||
base_path = '/clustertemplates'
|
base_path = '/clustertemplates'
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class Service(resource.Resource):
|
class Service(resource.Resource):
|
||||||
|
|
||||||
resources_key = 'mservices'
|
resources_key = 'mservices'
|
||||||
base_path = '/mservices'
|
base_path = '/mservices'
|
||||||
|
|
||||||
|
@ -34,7 +34,6 @@ _ENDPOINT_TEMPLATES = {
|
|||||||
|
|
||||||
|
|
||||||
class ConnectionFixture(fixtures.Fixture):
|
class ConnectionFixture(fixtures.Fixture):
|
||||||
|
|
||||||
_suffixes = {
|
_suffixes = {
|
||||||
'baremetal': '/',
|
'baremetal': '/',
|
||||||
'block-storage': '/{project_id}',
|
'block-storage': '/{project_id}',
|
||||||
|
@ -44,7 +44,6 @@ class Extension(resource.Resource):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def list(cls, session, paginated=False, base_path=None, **params):
|
def list(cls, session, paginated=False, base_path=None, **params):
|
||||||
|
|
||||||
if base_path is None:
|
if base_path is None:
|
||||||
base_path = cls.base_path
|
base_path = cls.base_path
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@ class Version(resource.Resource):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def list(cls, session, paginated=False, base_path=None, **params):
|
def list(cls, session, paginated=False, base_path=None, **params):
|
||||||
|
|
||||||
if base_path is None:
|
if base_path is None:
|
||||||
base_path = cls.base_path
|
base_path = cls.base_path
|
||||||
|
|
||||||
|
@ -49,7 +49,6 @@ def _get_name_and_filename(name, image_format):
|
|||||||
|
|
||||||
|
|
||||||
class Proxy(proxy.Proxy):
|
class Proxy(proxy.Proxy):
|
||||||
|
|
||||||
_resource_registry = {
|
_resource_registry = {
|
||||||
"cache": _cache.Cache,
|
"cache": _cache.Cache,
|
||||||
"image": _image.Image,
|
"image": _image.Image,
|
||||||
|
@ -16,7 +16,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class BaseResource(resource.Resource):
|
class BaseResource(resource.Resource):
|
||||||
|
|
||||||
commit_method = 'POST'
|
commit_method = 'POST'
|
||||||
create_method = 'PUT'
|
create_method = 'PUT'
|
||||||
|
|
||||||
|
@ -447,7 +447,6 @@ class Proxy(proxy.Proxy):
|
|||||||
file_size = os.path.getsize(filename)
|
file_size = os.path.getsize(filename)
|
||||||
|
|
||||||
if self.is_object_stale(container_name, name, filename, md5, sha256):
|
if self.is_object_stale(container_name, name, filename, md5, sha256):
|
||||||
|
|
||||||
self._connection.log.debug(
|
self._connection.log.debug(
|
||||||
"swift uploading %(filename)s to %(endpoint)s",
|
"swift uploading %(filename)s to %(endpoint)s",
|
||||||
{'filename': filename, 'endpoint': endpoint},
|
{'filename': filename, 'endpoint': endpoint},
|
||||||
@ -744,7 +743,7 @@ class Proxy(proxy.Proxy):
|
|||||||
def _get_file_segments(self, endpoint, filename, file_size, segment_size):
|
def _get_file_segments(self, endpoint, filename, file_size, segment_size):
|
||||||
# Use an ordered dict here so that testing can replicate things
|
# Use an ordered dict here so that testing can replicate things
|
||||||
segments = collections.OrderedDict()
|
segments = collections.OrderedDict()
|
||||||
for (index, offset) in enumerate(range(0, file_size, segment_size)):
|
for index, offset in enumerate(range(0, file_size, segment_size)):
|
||||||
remaining = file_size - (index * segment_size)
|
remaining = file_size - (index * segment_size)
|
||||||
segment = _utils.FileSegment(
|
segment = _utils.FileSegment(
|
||||||
filename,
|
filename,
|
||||||
|
@ -18,7 +18,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class Info(resource.Resource):
|
class Info(resource.Resource):
|
||||||
|
|
||||||
base_path = "/info"
|
base_path = "/info"
|
||||||
|
|
||||||
allow_fetch = True
|
allow_fetch = True
|
||||||
|
@ -31,7 +31,6 @@ def get_template_contents(
|
|||||||
files=None,
|
files=None,
|
||||||
existing=False,
|
existing=False,
|
||||||
):
|
):
|
||||||
|
|
||||||
is_object = False
|
is_object = False
|
||||||
tpl = None
|
tpl = None
|
||||||
|
|
||||||
@ -123,7 +122,6 @@ def get_file_contents(
|
|||||||
is_object=False,
|
is_object=False,
|
||||||
object_request=None,
|
object_request=None,
|
||||||
):
|
):
|
||||||
|
|
||||||
if recurse_if and recurse_if(from_data):
|
if recurse_if and recurse_if(from_data):
|
||||||
if isinstance(from_data, dict):
|
if isinstance(from_data, dict):
|
||||||
recurse_data = from_data.values()
|
recurse_data = from_data.values()
|
||||||
|
@ -187,7 +187,6 @@ class Stack(resource.Resource):
|
|||||||
skip_cache=False,
|
skip_cache=False,
|
||||||
resolve_outputs=True,
|
resolve_outputs=True,
|
||||||
):
|
):
|
||||||
|
|
||||||
if not self.allow_fetch:
|
if not self.allow_fetch:
|
||||||
raise exceptions.MethodNotSupported(self, "fetch")
|
raise exceptions.MethodNotSupported(self, "fetch")
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class StackEnvironment(resource.Resource):
|
class StackEnvironment(resource.Resource):
|
||||||
|
|
||||||
base_path = "/stacks/%(stack_name)s/%(stack_id)s/environment"
|
base_path = "/stacks/%(stack_name)s/%(stack_id)s/environment"
|
||||||
|
|
||||||
# capabilities
|
# capabilities
|
||||||
|
@ -14,7 +14,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class StackFiles(resource.Resource):
|
class StackFiles(resource.Resource):
|
||||||
|
|
||||||
base_path = "/stacks/%(stack_name)s/%(stack_id)s/files"
|
base_path = "/stacks/%(stack_name)s/%(stack_id)s/files"
|
||||||
|
|
||||||
# capabilities
|
# capabilities
|
||||||
|
@ -14,7 +14,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class StackTemplate(resource.Resource):
|
class StackTemplate(resource.Resource):
|
||||||
|
|
||||||
base_path = "/stacks/%(stack_name)s/%(stack_id)s/template"
|
base_path = "/stacks/%(stack_name)s/%(stack_id)s/template"
|
||||||
|
|
||||||
# capabilities
|
# capabilities
|
||||||
|
@ -16,7 +16,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class Template(resource.Resource):
|
class Template(resource.Resource):
|
||||||
|
|
||||||
# capabilities
|
# capabilities
|
||||||
allow_create = False
|
allow_create = False
|
||||||
allow_list = False
|
allow_list = False
|
||||||
|
@ -87,7 +87,6 @@ def _convert_type(value, data_type, list_type=None):
|
|||||||
|
|
||||||
|
|
||||||
class _BaseComponent:
|
class _BaseComponent:
|
||||||
|
|
||||||
# The name this component is being tracked as in the Resource
|
# The name this component is being tracked as in the Resource
|
||||||
key = None
|
key = None
|
||||||
# The class to be used for mappings
|
# The class to be used for mappings
|
||||||
@ -2031,7 +2030,7 @@ class Resource(dict):
|
|||||||
)
|
)
|
||||||
client_filters = dict()
|
client_filters = dict()
|
||||||
# Gather query parameters which are not supported by the server
|
# Gather query parameters which are not supported by the server
|
||||||
for (k, v) in params.items():
|
for k, v in params.items():
|
||||||
if (
|
if (
|
||||||
# Known attr
|
# Known attr
|
||||||
hasattr(cls, k)
|
hasattr(cls, k)
|
||||||
|
@ -42,7 +42,6 @@ class _ServiceDisabledProxyShim:
|
|||||||
|
|
||||||
|
|
||||||
class ServiceDescription:
|
class ServiceDescription:
|
||||||
|
|
||||||
#: Dictionary of supported versions and proxy classes for that version
|
#: Dictionary of supported versions and proxy classes for that version
|
||||||
supported_versions = None
|
supported_versions = None
|
||||||
#: main service_type to use to find this service in the catalog
|
#: main service_type to use to find this service in the catalog
|
||||||
@ -216,7 +215,6 @@ class ServiceDescription:
|
|||||||
)
|
)
|
||||||
|
|
||||||
if proxy_obj:
|
if proxy_obj:
|
||||||
|
|
||||||
if getattr(proxy_obj, 'skip_discovery', False):
|
if getattr(proxy_obj, 'skip_discovery', False):
|
||||||
# Some services, like swift, don't have discovery. While
|
# Some services, like swift, don't have discovery. While
|
||||||
# keystoneauth will behave correctly and handle such
|
# keystoneauth will behave correctly and handle such
|
||||||
|
@ -14,7 +14,6 @@ from openstack import resource
|
|||||||
|
|
||||||
|
|
||||||
class StoragePool(resource.Resource):
|
class StoragePool(resource.Resource):
|
||||||
|
|
||||||
resources_key = "pools"
|
resources_key = "pools"
|
||||||
base_path = "/scheduler-stats/pools"
|
base_path = "/scheduler-stats/pools"
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class BaseBaremetalTest(base.BaseFunctionalTest):
|
class BaseBaremetalTest(base.BaseFunctionalTest):
|
||||||
|
|
||||||
min_microversion = None
|
min_microversion = None
|
||||||
node_id = None
|
node_id = None
|
||||||
|
|
||||||
|
@ -39,7 +39,6 @@ class Base(base.BaseBaremetalTest):
|
|||||||
|
|
||||||
|
|
||||||
class TestBareMetalAllocation(Base):
|
class TestBareMetalAllocation(Base):
|
||||||
|
|
||||||
min_microversion = '1.52'
|
min_microversion = '1.52'
|
||||||
|
|
||||||
def test_allocation_create_get_delete(self):
|
def test_allocation_create_get_delete(self):
|
||||||
@ -135,7 +134,6 @@ class TestBareMetalAllocation(Base):
|
|||||||
|
|
||||||
|
|
||||||
class TestBareMetalAllocationUpdate(Base):
|
class TestBareMetalAllocationUpdate(Base):
|
||||||
|
|
||||||
min_microversion = '1.57'
|
min_microversion = '1.57'
|
||||||
|
|
||||||
def test_allocation_update(self):
|
def test_allocation_update(self):
|
||||||
|
@ -72,7 +72,6 @@ class TestBareMetalChassis(base.BaseBaremetalTest):
|
|||||||
|
|
||||||
|
|
||||||
class TestBareMetalChassisFields(base.BaseBaremetalTest):
|
class TestBareMetalChassisFields(base.BaseBaremetalTest):
|
||||||
|
|
||||||
min_microversion = '1.8'
|
min_microversion = '1.8'
|
||||||
|
|
||||||
def test_chassis_fields(self):
|
def test_chassis_fields(self):
|
||||||
|
@ -15,7 +15,6 @@ from openstack.tests.functional.baremetal import base
|
|||||||
|
|
||||||
|
|
||||||
class TestBareMetalConductor(base.BaseBaremetalTest):
|
class TestBareMetalConductor(base.BaseBaremetalTest):
|
||||||
|
|
||||||
min_microversion = '1.49'
|
min_microversion = '1.49'
|
||||||
|
|
||||||
def test_list_get_conductor(self):
|
def test_list_get_conductor(self):
|
||||||
|
@ -15,7 +15,6 @@ from openstack.tests.functional.baremetal import base
|
|||||||
|
|
||||||
|
|
||||||
class TestBareMetalDeployTemplate(base.BaseBaremetalTest):
|
class TestBareMetalDeployTemplate(base.BaseBaremetalTest):
|
||||||
|
|
||||||
min_microversion = '1.55'
|
min_microversion = '1.55'
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -34,7 +34,6 @@ class TestBareMetalDriver(base.BaseBaremetalTest):
|
|||||||
|
|
||||||
|
|
||||||
class TestBareMetalDriverDetails(base.BaseBaremetalTest):
|
class TestBareMetalDriverDetails(base.BaseBaremetalTest):
|
||||||
|
|
||||||
min_microversion = '1.30'
|
min_microversion = '1.30'
|
||||||
|
|
||||||
def test_fake_hardware_get(self):
|
def test_fake_hardware_get(self):
|
||||||
|
@ -327,7 +327,6 @@ class TestBareMetalNode(base.BaseBaremetalTest):
|
|||||||
|
|
||||||
|
|
||||||
class TestNodeRetired(base.BaseBaremetalTest):
|
class TestNodeRetired(base.BaseBaremetalTest):
|
||||||
|
|
||||||
min_microversion = '1.61'
|
min_microversion = '1.61'
|
||||||
|
|
||||||
def test_retired(self):
|
def test_retired(self):
|
||||||
@ -390,7 +389,6 @@ class TestNodeRetired(base.BaseBaremetalTest):
|
|||||||
|
|
||||||
|
|
||||||
class TestBareMetalNodeFields(base.BaseBaremetalTest):
|
class TestBareMetalNodeFields(base.BaseBaremetalTest):
|
||||||
|
|
||||||
min_microversion = '1.8'
|
min_microversion = '1.8'
|
||||||
|
|
||||||
def test_node_fields(self):
|
def test_node_fields(self):
|
||||||
@ -404,7 +402,6 @@ class TestBareMetalNodeFields(base.BaseBaremetalTest):
|
|||||||
|
|
||||||
|
|
||||||
class TestBareMetalVif(base.BaseBaremetalTest):
|
class TestBareMetalVif(base.BaseBaremetalTest):
|
||||||
|
|
||||||
min_microversion = '1.28'
|
min_microversion = '1.28'
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
@ -445,7 +442,6 @@ class TestBareMetalVif(base.BaseBaremetalTest):
|
|||||||
|
|
||||||
|
|
||||||
class TestTraits(base.BaseBaremetalTest):
|
class TestTraits(base.BaseBaremetalTest):
|
||||||
|
|
||||||
min_microversion = '1.37'
|
min_microversion = '1.37'
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -132,7 +132,6 @@ class TestBareMetalPort(base.BaseBaremetalTest):
|
|||||||
|
|
||||||
|
|
||||||
class TestBareMetalPortFields(base.BaseBaremetalTest):
|
class TestBareMetalPortFields(base.BaseBaremetalTest):
|
||||||
|
|
||||||
min_microversion = '1.8'
|
min_microversion = '1.8'
|
||||||
|
|
||||||
def test_port_fields(self):
|
def test_port_fields(self):
|
||||||
|
@ -16,7 +16,6 @@ from openstack.tests.functional.baremetal import base
|
|||||||
|
|
||||||
|
|
||||||
class TestBareMetalPortGroup(base.BaseBaremetalTest):
|
class TestBareMetalPortGroup(base.BaseBaremetalTest):
|
||||||
|
|
||||||
min_microversion = '1.23'
|
min_microversion = '1.23'
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -16,7 +16,6 @@ from openstack.tests.functional.baremetal import base
|
|||||||
|
|
||||||
|
|
||||||
class TestBareMetalVolumeconnector(base.BaseBaremetalTest):
|
class TestBareMetalVolumeconnector(base.BaseBaremetalTest):
|
||||||
|
|
||||||
min_microversion = '1.32'
|
min_microversion = '1.32'
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -16,7 +16,6 @@ from openstack.tests.functional.baremetal import base
|
|||||||
|
|
||||||
|
|
||||||
class TestBareMetalVolumetarget(base.BaseBaremetalTest):
|
class TestBareMetalVolumetarget(base.BaseBaremetalTest):
|
||||||
|
|
||||||
min_microversion = '1.32'
|
min_microversion = '1.32'
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -41,7 +41,6 @@ def _disable_keep_alive(conn):
|
|||||||
|
|
||||||
|
|
||||||
class BaseFunctionalTest(base.TestCase):
|
class BaseFunctionalTest(base.TestCase):
|
||||||
|
|
||||||
_wait_for_timeout_key = ''
|
_wait_for_timeout_key = ''
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -14,7 +14,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class BaseBlockStorageTest(base.BaseFunctionalTest):
|
class BaseBlockStorageTest(base.BaseFunctionalTest):
|
||||||
|
|
||||||
_wait_for_timeout_key = 'OPENSTACKSDK_FUNC_TEST_TIMEOUT_BLOCK_STORAGE'
|
_wait_for_timeout_key = 'OPENSTACKSDK_FUNC_TEST_TIMEOUT_BLOCK_STORAGE'
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -14,7 +14,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class BaseBlockStorageTest(base.BaseFunctionalTest):
|
class BaseBlockStorageTest(base.BaseFunctionalTest):
|
||||||
|
|
||||||
_wait_for_timeout_key = 'OPENSTACKSDK_FUNC_TEST_TIMEOUT_BLOCK_STORAGE'
|
_wait_for_timeout_key = 'OPENSTACKSDK_FUNC_TEST_TIMEOUT_BLOCK_STORAGE'
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -26,7 +26,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestDevstack(base.BaseFunctionalTest):
|
class TestDevstack(base.BaseFunctionalTest):
|
||||||
|
|
||||||
scenarios = [
|
scenarios = [
|
||||||
('designate', dict(env='DESIGNATE', service='dns')),
|
('designate', dict(env='DESIGNATE', service='dns')),
|
||||||
('heat', dict(env='HEAT', service='orchestration')),
|
('heat', dict(env='HEAT', service='orchestration')),
|
||||||
|
@ -28,7 +28,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestEndpoints(base.KeystoneBaseFunctionalTest):
|
class TestEndpoints(base.KeystoneBaseFunctionalTest):
|
||||||
|
|
||||||
endpoint_attributes = [
|
endpoint_attributes = [
|
||||||
'id',
|
'id',
|
||||||
'region',
|
'region',
|
||||||
|
@ -119,7 +119,6 @@ class TestFloatingIP(base.BaseFunctionalTest):
|
|||||||
raise OpenStackCloudException('\n'.join(exception_list))
|
raise OpenStackCloudException('\n'.join(exception_list))
|
||||||
|
|
||||||
def _cleanup_ips(self, server):
|
def _cleanup_ips(self, server):
|
||||||
|
|
||||||
exception_list = list()
|
exception_list = list()
|
||||||
|
|
||||||
fixed_ip = meta.get_server_private_ip(server)
|
fixed_ip = meta.get_server_private_ip(server)
|
||||||
|
@ -22,7 +22,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestProjectCleanup(base.BaseFunctionalTest):
|
class TestProjectCleanup(base.BaseFunctionalTest):
|
||||||
|
|
||||||
_wait_for_timeout_key = 'OPENSTACKSDK_FUNC_TEST_TIMEOUT_CLEANUP'
|
_wait_for_timeout_key = 'OPENSTACKSDK_FUNC_TEST_TIMEOUT_CLEANUP'
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -28,7 +28,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestServices(base.KeystoneBaseFunctionalTest):
|
class TestServices(base.KeystoneBaseFunctionalTest):
|
||||||
|
|
||||||
service_attributes = ['id', 'name', 'type', 'description']
|
service_attributes = ['id', 'name', 'type', 'description']
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -145,7 +145,6 @@ class TestStack(base.BaseFunctionalTest):
|
|||||||
self.assertEqual(12, len(new_rand))
|
self.assertEqual(12, len(new_rand))
|
||||||
|
|
||||||
def test_stack_nested(self):
|
def test_stack_nested(self):
|
||||||
|
|
||||||
test_template = tempfile.NamedTemporaryFile(
|
test_template = tempfile.NamedTemporaryFile(
|
||||||
suffix='.yaml', delete=False
|
suffix='.yaml', delete=False
|
||||||
)
|
)
|
||||||
|
@ -26,7 +26,6 @@ from openstack import utils
|
|||||||
|
|
||||||
|
|
||||||
class TestVolume(base.BaseFunctionalTest):
|
class TestVolume(base.BaseFunctionalTest):
|
||||||
|
|
||||||
# Creating and deleting volumes is slow
|
# Creating and deleting volumes is slow
|
||||||
TIMEOUT_SCALING_FACTOR = 1.5
|
TIMEOUT_SCALING_FACTOR = 1.5
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@ from openstack.tests.functional.network.v2 import test_network
|
|||||||
|
|
||||||
|
|
||||||
class TestCluster(base.BaseFunctionalTest):
|
class TestCluster(base.BaseFunctionalTest):
|
||||||
|
|
||||||
_wait_for_timeout_key = 'OPENSTACKSDK_FUNC_TEST_TIMEOUT_CLUSTER'
|
_wait_for_timeout_key = 'OPENSTACKSDK_FUNC_TEST_TIMEOUT_CLUSTER'
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -14,5 +14,4 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class BaseComputeTest(base.BaseFunctionalTest):
|
class BaseComputeTest(base.BaseFunctionalTest):
|
||||||
|
|
||||||
_wait_for_timeout_key = 'OPENSTACKSDK_FUNC_TEST_TIMEOUT_COMPUTE'
|
_wait_for_timeout_key = 'OPENSTACKSDK_FUNC_TEST_TIMEOUT_COMPUTE'
|
||||||
|
@ -14,7 +14,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class BaseImageTest(base.BaseFunctionalTest):
|
class BaseImageTest(base.BaseFunctionalTest):
|
||||||
|
|
||||||
_wait_for_timeout_key = 'OPENSTACKSDK_FUNC_TEST_TIMEOUT_IMAGE'
|
_wait_for_timeout_key = 'OPENSTACKSDK_FUNC_TEST_TIMEOUT_IMAGE'
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -15,7 +15,6 @@ from openstack.tests.functional.image.v2 import base
|
|||||||
|
|
||||||
|
|
||||||
class TestMetadefNamespace(base.BaseImageTest):
|
class TestMetadefNamespace(base.BaseImageTest):
|
||||||
|
|
||||||
# TODO(stephenfin): We should use setUpClass here for MOAR SPEED!!!
|
# TODO(stephenfin): We should use setUpClass here for MOAR SPEED!!!
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super().setUp()
|
super().setUp()
|
||||||
|
@ -26,7 +26,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestLoadBalancer(base.BaseFunctionalTest):
|
class TestLoadBalancer(base.BaseFunctionalTest):
|
||||||
|
|
||||||
HM_ID = None
|
HM_ID = None
|
||||||
L7POLICY_ID = None
|
L7POLICY_ID = None
|
||||||
LB_ID = None
|
LB_ID = None
|
||||||
|
@ -16,7 +16,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestAddressGroup(base.BaseFunctionalTest):
|
class TestAddressGroup(base.BaseFunctionalTest):
|
||||||
|
|
||||||
ADDRESS_GROUP_ID = None
|
ADDRESS_GROUP_ID = None
|
||||||
ADDRESSES = ["10.0.0.1/32", "2001:db8::/32"]
|
ADDRESSES = ["10.0.0.1/32", "2001:db8::/32"]
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestAddressScope(base.BaseFunctionalTest):
|
class TestAddressScope(base.BaseFunctionalTest):
|
||||||
|
|
||||||
ADDRESS_SCOPE_ID = None
|
ADDRESS_SCOPE_ID = None
|
||||||
IS_SHARED = False
|
IS_SHARED = False
|
||||||
IP_VERSION = 4
|
IP_VERSION = 4
|
||||||
|
@ -17,7 +17,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestAgent(base.BaseFunctionalTest):
|
class TestAgent(base.BaseFunctionalTest):
|
||||||
|
|
||||||
AGENT = None
|
AGENT = None
|
||||||
DESC = "test description"
|
DESC = "test description"
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestAgentNetworks(base.BaseFunctionalTest):
|
class TestAgentNetworks(base.BaseFunctionalTest):
|
||||||
|
|
||||||
NETWORK_ID = None
|
NETWORK_ID = None
|
||||||
AGENT = None
|
AGENT = None
|
||||||
AGENT_ID = None
|
AGENT_ID = None
|
||||||
|
@ -16,7 +16,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestAgentRouters(base.BaseFunctionalTest):
|
class TestAgentRouters(base.BaseFunctionalTest):
|
||||||
|
|
||||||
ROUTER = None
|
ROUTER = None
|
||||||
AGENT = None
|
AGENT = None
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestAutoAllocatedTopology(base.BaseFunctionalTest):
|
class TestAutoAllocatedTopology(base.BaseFunctionalTest):
|
||||||
|
|
||||||
NETWORK_NAME = "auto_allocated_network"
|
NETWORK_NAME = "auto_allocated_network"
|
||||||
NETWORK_ID = None
|
NETWORK_ID = None
|
||||||
PROJECT_ID = None
|
PROJECT_ID = None
|
||||||
|
@ -18,7 +18,6 @@ class TestAvailabilityZone(base.BaseFunctionalTest):
|
|||||||
def test_list(self):
|
def test_list(self):
|
||||||
availability_zones = list(self.user_cloud.network.availability_zones())
|
availability_zones = list(self.user_cloud.network.availability_zones())
|
||||||
if len(availability_zones) > 0:
|
if len(availability_zones) > 0:
|
||||||
|
|
||||||
for az in availability_zones:
|
for az in availability_zones:
|
||||||
self.assertIsInstance(az.name, str)
|
self.assertIsInstance(az.name, str)
|
||||||
self.assertIsInstance(az.resource, str)
|
self.assertIsInstance(az.resource, str)
|
||||||
|
@ -16,7 +16,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestDVRRouter(base.BaseFunctionalTest):
|
class TestDVRRouter(base.BaseFunctionalTest):
|
||||||
|
|
||||||
ID = None
|
ID = None
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -19,7 +19,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestFirewallGroup(base.BaseFunctionalTest):
|
class TestFirewallGroup(base.BaseFunctionalTest):
|
||||||
|
|
||||||
ID = None
|
ID = None
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -19,7 +19,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestFirewallPolicy(base.BaseFunctionalTest):
|
class TestFirewallPolicy(base.BaseFunctionalTest):
|
||||||
|
|
||||||
ID = None
|
ID = None
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -19,7 +19,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestFirewallRule(base.BaseFunctionalTest):
|
class TestFirewallRule(base.BaseFunctionalTest):
|
||||||
|
|
||||||
ACTION = "allow"
|
ACTION = "allow"
|
||||||
DEST_IP = "10.0.0.0/24"
|
DEST_IP = "10.0.0.0/24"
|
||||||
DEST_PORT = "80"
|
DEST_PORT = "80"
|
||||||
|
@ -21,7 +21,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestFirewallPolicyRuleAssociations(base.BaseFunctionalTest):
|
class TestFirewallPolicyRuleAssociations(base.BaseFunctionalTest):
|
||||||
|
|
||||||
POLICY_NAME = uuid.uuid4().hex
|
POLICY_NAME = uuid.uuid4().hex
|
||||||
RULE1_NAME = uuid.uuid4().hex
|
RULE1_NAME = uuid.uuid4().hex
|
||||||
RULE2_NAME = uuid.uuid4().hex
|
RULE2_NAME = uuid.uuid4().hex
|
||||||
|
@ -15,7 +15,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestFlavor(base.BaseFunctionalTest):
|
class TestFlavor(base.BaseFunctionalTest):
|
||||||
|
|
||||||
UPDATE_NAME = "UPDATED-NAME"
|
UPDATE_NAME = "UPDATED-NAME"
|
||||||
SERVICE_TYPE = "FLAVORS"
|
SERVICE_TYPE = "FLAVORS"
|
||||||
ID = None
|
ID = None
|
||||||
|
@ -20,7 +20,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestFloatingIP(base.BaseFunctionalTest):
|
class TestFloatingIP(base.BaseFunctionalTest):
|
||||||
|
|
||||||
IPV4 = 4
|
IPV4 = 4
|
||||||
EXT_CIDR = "10.100.0.0/24"
|
EXT_CIDR = "10.100.0.0/24"
|
||||||
INT_CIDR = "10.101.0.0/24"
|
INT_CIDR = "10.101.0.0/24"
|
||||||
|
@ -17,7 +17,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestL3ConntrackHelper(base.BaseFunctionalTest):
|
class TestL3ConntrackHelper(base.BaseFunctionalTest):
|
||||||
|
|
||||||
PROTOCOL = "udp"
|
PROTOCOL = "udp"
|
||||||
HELPER = "tftp"
|
HELPER = "tftp"
|
||||||
PORT = 69
|
PORT = 69
|
||||||
|
@ -18,7 +18,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestLocalIP(base.BaseFunctionalTest):
|
class TestLocalIP(base.BaseFunctionalTest):
|
||||||
|
|
||||||
LOCAL_IP_ID = None
|
LOCAL_IP_ID = None
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -19,7 +19,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestNDPProxy(base.BaseFunctionalTest):
|
class TestNDPProxy(base.BaseFunctionalTest):
|
||||||
|
|
||||||
IPV6 = 6
|
IPV6 = 6
|
||||||
EXT_CIDR = "2002::1:0/112"
|
EXT_CIDR = "2002::1:0/112"
|
||||||
INT_CIDR = "2002::2:0/112"
|
INT_CIDR = "2002::2:0/112"
|
||||||
|
@ -36,7 +36,6 @@ def delete_network(conn, network, subnet):
|
|||||||
|
|
||||||
|
|
||||||
class TestNetwork(base.BaseFunctionalTest):
|
class TestNetwork(base.BaseFunctionalTest):
|
||||||
|
|
||||||
ID = None
|
ID = None
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -18,7 +18,6 @@ from openstack.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
class TestNetworkIPAvailability(base.BaseFunctionalTest):
|
class TestNetworkIPAvailability(base.BaseFunctionalTest):
|
||||||
|
|
||||||
IPV4 = 4
|
IPV4 = 4
|
||||||
CIDR = "10.100.0.0/24"
|
CIDR = "10.100.0.0/24"
|
||||||
NET_ID = None
|
NET_ID = None
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user