Revision 017d37ce kamaki/cli/argument.py
b/kamaki/cli/argument.py | ||
---|---|---|
142 | 142 |
def value(self, config_file): |
143 | 143 |
self._value = Config(config_file) if config_file is not None else Config() |
144 | 144 |
|
145 |
def get_groups(self): |
|
146 |
return self.value.apis() |
|
147 |
|
|
148 |
|
|
149 |
_config_arg = ConfigArgument(1, 'Path to configuration file', '--config') |
|
150 |
|
|
145 | 151 |
class CmdLineConfigArgument(Argument): |
146 | 152 |
def __init__(self, config_arg, help='', parsed_name=None, default=None): |
147 | 153 |
super(self.__class__, self).__init__(1, help, parsed_name, default) |
... | ... | |
164 | 170 |
raise CLISyntaxError(details='Missing . between section and key: -o section.key=val') |
165 | 171 |
self._config_arg.value.override(section.strip(), key.strip(), val.strip()) |
166 | 172 |
|
167 |
_config_arg = ConfigArgument(1, 'Path to configuration file', '--config') |
|
168 | 173 |
_arguments = dict(config = _config_arg, |
169 | 174 |
debug = Argument(0, 'Include debug output', ('-d', '--debug')), |
170 | 175 |
include = Argument(0, 'Include protocol headers in the output', ('-i', '--include')), |
Also available in: Unified diff