Revision 362adf50 kamaki/cli/argument.py

b/kamaki/cli/argument.py
167 167
        return self.value.get(group, term)
168 168

  
169 169
    def get_groups(self):
170
        return self.value.keys('cli')
170
        suffix = '_cli'
171
        slen = len(suffix)
172
        return [term[:-slen] for term in self.value.keys('global') if (
173
            term.endswith(suffix))]
171 174

  
172 175
    def get_cli_specs(self):
173
        return self.value.items('cli')
176
        suffix = '_cli'
177
        slen = len(suffix)
178
        return [(k[:-slen], v) for k, v in self.value.items('global') if (
179
            k.endswith(suffix))]
180

  
181
    def get_global(self, option):
182
        return self.value.get_global(option)
183

  
184
    def get_remote(self, remote, option):
185
        return self.value.get_remote(remote, option)
174 186

  
175 187
_config_arg = ConfigArgument(
176
    1, 'Path to configuration file',
177
    ('-c', '--config'))
188
    1, 'Path to configuration file', ('-c', '--config'))
178 189

  
179 190

  
180 191
class CmdLineConfigArgument(Argument):

Also available in: Unified diff