Revision 0ec19fd3
b/kamaki/cli/command_shell.py | ||
---|---|---|
199 | 199 |
ldescr = getattr(cls, 'long_description', '') |
200 | 200 |
if subcmd.path == 'history_run': |
201 | 201 |
instance = cls( |
202 |
dict(cmd_parser.arguments), |
|
202 |
dict(cmd_parser.arguments), self.auth_base,
|
|
203 | 203 |
cmd_tree=self.cmd_tree) |
204 | 204 |
else: |
205 | 205 |
instance = cls( |
206 | 206 |
dict(cmd_parser.arguments), |
207 |
self.auth_base, |
|
208 |
self.cloud) |
|
207 |
self.auth_base, self.cloud) |
|
209 | 208 |
cmd_parser.update_arguments(instance.arguments) |
210 | 209 |
cmd_parser.arguments = instance.arguments |
211 | 210 |
cmd_parser.syntax = '%s %s' % ( |
... | ... | |
223 | 222 |
|
224 | 223 |
for name, arg in instance.arguments.items(): |
225 | 224 |
arg.value = getattr( |
226 |
cmd_parser.parsed, |
|
227 |
name, |
|
228 |
arg.default) |
|
225 |
cmd_parser.parsed, name, arg.default) |
|
229 | 226 |
|
230 | 227 |
exec_cmd(instance, cmd_parser.unparsed, help_method) |
231 | 228 |
#[term for term in cmd_parser.unparsed\ |
... | ... | |
283 | 280 |
empty, sep, subname = subcmd.path.partition(cmd.path) |
284 | 281 |
cmd_name = '%s %s' % (cmd.name, subname.replace('_', ' ')) |
285 | 282 |
print('\n%s\nSyntax:\t%s %s' % ( |
286 |
cls.description, |
|
287 |
cmd_name, |
|
288 |
cls.syntax)) |
|
283 |
cls.description, cmd_name, cls.syntax)) |
|
289 | 284 |
cmd_args = {} |
290 | 285 |
for arg in instance.arguments.values(): |
291 | 286 |
cmd_args[','.join(arg.parsed_name)] = arg.help |
b/kamaki/cli/commands/history.py | ||
---|---|---|
161 | 161 |
_cmd_tree = None |
162 | 162 |
|
163 | 163 |
def __init__(self, arguments={}, auth_base=None, cmd_tree=None): |
164 |
super(self.__class__, self).__init__(arguments) |
|
164 |
super(self.__class__, self).__init__(arguments, auth_base=auth_base)
|
|
165 | 165 |
self._cmd_tree = cmd_tree |
166 | 166 |
|
167 | 167 |
@errors.generic.all |
... | ... | |
171 | 171 |
if not cmd.is_command: |
172 | 172 |
return |
173 | 173 |
try: |
174 |
instance = cmd.get_class()(self.arguments) |
|
174 |
instance = cmd.get_class()( |
|
175 |
self.arguments, |
|
176 |
auth_base=getattr(self, 'auth_base', None)) |
|
175 | 177 |
instance.config = self.config |
176 | 178 |
prs = ArgumentParseManager( |
177 | 179 |
cmd.path.split(), |
Also available in: Unified diff