diff options
author | Ivan Kolodyazhny <e0ne@e0ne.info> | 2015-09-08 17:29:29 +0300 |
---|---|---|
committer | Ivan Kolodyazhny <e0ne@e0ne.info> | 2015-09-08 18:12:32 +0300 |
commit | df2883e0401c47d004433893421ad175da59938f (patch) | |
tree | 918d7c7715a3a81a68165fd71bcd7e88def4522b /cinderclient/utils.py | |
parent | 1c82825c4105f11c05f681e3dea16929f1a2efc5 (diff) | |
download | python-cinderclient-df2883e0401c47d004433893421ad175da59938f.tar.gz |
Remove unused code from cinderclient.utils module
_format_servers_list_networks method is not used anywhere.
It's safe to delete it.
We'ge got the same cinderclient.openstack.common.apiclient.HookableMixin
class so we don't need to duplicate it in the utils
Change-Id: Ifa7f5c1d00c1673811af48575460e6563d2d3180
Diffstat (limited to 'cinderclient/utils.py')
-rw-r--r-- | cinderclient/utils.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/cinderclient/utils.py b/cinderclient/utils.py index 13baf11..9941bbf 100644 --- a/cinderclient/utils.py +++ b/cinderclient/utils.py @@ -228,36 +228,6 @@ def find_volume(cs, volume): return find_resource(cs.volumes, volume) -def _format_servers_list_networks(server): - output = [] - for (network, addresses) in list(server.networks.items()): - if len(addresses) == 0: - continue - addresses_csv = ', '.join(addresses) - group = "%s=%s" % (network, addresses_csv) - output.append(group) - - return '; '.join(output) - - -class HookableMixin(object): - """Mixin so classes can register and run hooks.""" - _hooks_map = {} - - @classmethod - def add_hook(cls, hook_type, hook_func): - if hook_type not in cls._hooks_map: - cls._hooks_map[hook_type] = [] - - cls._hooks_map[hook_type].append(hook_func) - - @classmethod - def run_hooks(cls, hook_type, *args, **kwargs): - hook_funcs = cls._hooks_map.get(hook_type) or [] - for hook_func in hook_funcs: - hook_func(*args, **kwargs) - - def safe_issubclass(*args): """Like issubclass, but will just return False if not a class.""" |