@ -27,13 +27,13 @@ import pkgutil
import sys
import logging
from cinder client import client
from cinder client import exceptions as exc
import cinder client.extension
from cinder client.openstack.common import strutils
from cinder client import utils
from cinder client.v1 import shell as shell_v1
from cinder client.v2 import shell as shell_v2
from manila client import client
from manila client import exceptions as exc
import manila client.extension
from manila client.openstack.common import strutils
from manila client import utils
from manila client.v1 import shell as shell_v1
from manila client.v2 import shell as shell_v2
DEFAULT_OS_VOLUME_API_VERSION = " 1 "
DEFAULT_CINDER_ENDPOINT_TYPE = ' publicURL '
@ -42,10 +42,10 @@ DEFAULT_CINDER_SERVICE_TYPE = 'compute'
logger = logging . getLogger ( __name__ )
class CinderC lientArgumentParser( argparse . ArgumentParser ) :
class manilac lientArgumentParser( argparse . ArgumentParser ) :
def __init__ ( self , * args , * * kwargs ) :
super ( CinderC lientArgumentParser, self ) . __init__ ( * args , * * kwargs )
super ( manilac lientArgumentParser, self ) . __init__ ( * args , * * kwargs )
def error ( self , message ) :
""" error(message: string)
@ -67,7 +67,7 @@ class CinderClientArgumentParser(argparse.ArgumentParser):
class OpenStackCinderShell ( object ) :
def get_base_parser ( self ) :
parser = CinderC lientArgumentParser(
parser = manilac lientArgumentParser(
prog = ' cinder ' ,
description = __doc__ . strip ( ) ,
epilog = ' See " cinder help COMMAND " '
@ -83,11 +83,11 @@ class OpenStackCinderShell(object):
parser . add_argument ( ' --version ' ,
action = ' version ' ,
version = cinder client. __version__ )
version = manila client. __version__ )
parser . add_argument ( ' --debug ' ,
action = ' store_true ' ,
default = utils . env ( ' CINDERCLIENT _DEBUG' ,
default = utils . env ( ' manilaclient _DEBUG' ,
default = False ) ,
help = " Print debugging output " )
@ -185,7 +185,7 @@ class OpenStackCinderShell(object):
' Defaults to env[OS_CACERT] ' )
parser . add_argument ( ' --insecure ' ,
default = utils . env ( ' CINDERCLIENT _INSECURE' ,
default = utils . env ( ' manilaclient _INSECURE' ,
default = False ) ,
action = ' store_true ' ,
help = argparse . SUPPRESS )
@ -254,14 +254,14 @@ class OpenStackCinderShell(object):
self . _discover_via_python_path ( version ) ,
self . _discover_via_contrib_path ( version ) ) :
extension = cinder client. extension . Extension ( name , module )
extension = manila client. extension . Extension ( name , module )
extensions . append ( extension )
return extensions
def _discover_via_python_path ( self , version ) :
for ( module_loader , name , ispkg ) in pkgutil . iter_modules ( ) :
if name . endswith ( ' python_cinder client_ext ' ) :
if name . endswith ( ' python_manila client_ext ' ) :
if not hasattr ( module_loader , ' load_module ' ) :
# Python 2.6 compat: actually get an ImpImporter obj
module_loader = module_loader . find_module ( name )