From 9b2e264ada9f98444d5c7f106dd320dde282946c Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Fri, 4 Jul 2014 14:27:16 -0400 Subject: Add support to list volume extensions Since cinderclient has support to list extensions, we should add some of the logic to our list extensions command. Change-Id: I7dc7ca325ea9b82194bba6d875e7b8dc1884d77e Closes-Bug: #1337687 --- openstackclient/volume/client.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'openstackclient/volume/client.py') diff --git a/openstackclient/volume/client.py b/openstackclient/volume/client.py index 9b37b8f5..98e787d6 100644 --- a/openstackclient/volume/client.py +++ b/openstackclient/volume/client.py @@ -15,8 +15,11 @@ import logging +from cinderclient import extension +from cinderclient.v1.contrib import list_extensions from cinderclient.v1 import volume_snapshots from cinderclient.v1 import volumes + from openstackclient.common import utils # Monkey patch for v1 cinderclient @@ -46,6 +49,7 @@ def make_client(instance): # Set client http_log_debug to True if verbosity level is high enough http_log_debug = utils.get_effective_log_level() <= logging.DEBUG + extensions = [extension.Extension('list_extensions', list_extensions)] client = volume_client( username=instance._username, api_key=instance._password, @@ -54,7 +58,8 @@ def make_client(instance): cacert=instance._cacert, insecure=instance._insecure, region_name=instance._region_name, - http_log_debug=http_log_debug + extensions=extensions, + http_log_debug=http_log_debug, ) # Populate the Cinder client to skip another auth query to Identity -- cgit v1.2.1