removed unused methods from nova.utils

Removed method is_integer_like and get_resource_manager_extra_kwargs.

Change-Id: I6430d339cf5a7fb0b7d4c628c22dfe40aa6ef60c
This commit is contained in:
Christian Berendt
2014-05-27 23:57:54 +02:00
parent a18209fc99
commit b497f9f5c9

View File

@@ -90,26 +90,6 @@ def add_resource_manager_extra_kwargs_hook(f, hook):
f.resource_manager_kwargs_hooks.append(hook)
# Unused and does not pass pep8 (F821)
#def get_resource_manager_extra_kwargs(f, args, allow_conflicts=False):
# """Return extra_kwargs by calling resource manager kwargs hooks."""
# hooks = getattr(f, "resource_manager_kwargs_hooks", [])
# extra_kwargs = {}
# for hook in hooks:
# hook_kwargs = hook(args)
#
# conflicting_keys = set(hook_kwargs.keys()) & set(extra_kwargs.keys())
# if conflicting_keys and not allow_conflicts:
# raise Exception("Hook '%(hook_name)s' is attempting to redefine"
# " attributes '%(conflicting_keys)s'" %
# {'hook_name': hook_name,
# 'conflicting_keys': conflicting_keys})
#
# extra_kwargs.update(hook_kwargs)
#
# return extra_kwargs
def unauthenticated(f):
"""Adds 'unauthenticated' attribute to decorated function.
Usage:
@@ -390,13 +370,3 @@ def _load_entry_point(ep_name, name=None):
return ep.load()
except (ImportError, pkg_resources.UnknownExtra, AttributeError):
continue
# Unused and doesn't pass pep8 (F841)
#def is_integer_like(val):
# """Returns validation of a value as an integer."""
# try:
# value = int(val)
# return True
# except (TypeError, ValueError, AttributeError):
# return False