Fix test.probe.brain CLI
Change-Id: I19716aeb4a4bf7b464928616a3ccb129fff7a7f2 Related-Change: Ib918f10e95970b9f562b88e923c25608b826b83f
This commit is contained in:
parent
5de15c3b6d
commit
0860db1f60
@ -51,7 +51,7 @@ def meta_command(name, bases, attrs):
|
|||||||
for attr, value in attrs.items():
|
for attr, value in attrs.items():
|
||||||
if getattr(value, '__command__', False):
|
if getattr(value, '__command__', False):
|
||||||
commands[attr] = value
|
commands[attr] = value
|
||||||
# methods have always have a __doc__ attribute, sometimes empty
|
# methods always have a __doc__ attribute, sometimes empty
|
||||||
docs[attr] = (getattr(value, '__doc__', None) or
|
docs[attr] = (getattr(value, '__doc__', None) or
|
||||||
'perform the %s command' % attr).strip()
|
'perform the %s command' % attr).strip()
|
||||||
attrs['__commands__'] = commands
|
attrs['__commands__'] = commands
|
||||||
@ -68,6 +68,7 @@ def command(f):
|
|||||||
return f
|
return f
|
||||||
|
|
||||||
|
|
||||||
|
@six.add_metaclass(meta_command)
|
||||||
class BaseBrain(object):
|
class BaseBrain(object):
|
||||||
def _setup(self, account, container_name, object_name,
|
def _setup(self, account, container_name, object_name,
|
||||||
server_type, policy):
|
server_type, policy):
|
||||||
@ -298,7 +299,6 @@ class InternalBrainClient(object):
|
|||||||
return headers, b''.join(resp_iter)
|
return headers, b''.join(resp_iter)
|
||||||
|
|
||||||
|
|
||||||
@six.add_metaclass(meta_command)
|
|
||||||
class BrainSplitter(BaseBrain):
|
class BrainSplitter(BaseBrain):
|
||||||
def __init__(self, url, token, container_name='test', object_name='test',
|
def __init__(self, url, token, container_name='test', object_name='test',
|
||||||
server_type='container', policy=None):
|
server_type='container', policy=None):
|
||||||
@ -307,7 +307,6 @@ class BrainSplitter(BaseBrain):
|
|||||||
server_type, policy)
|
server_type, policy)
|
||||||
|
|
||||||
|
|
||||||
@six.add_metaclass(meta_command)
|
|
||||||
class InternalBrainSplitter(BaseBrain):
|
class InternalBrainSplitter(BaseBrain):
|
||||||
def __init__(self, conf, container_name='test', object_name='test',
|
def __init__(self, conf, container_name='test', object_name='test',
|
||||||
server_type='container', policy=None):
|
server_type='container', policy=None):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user