rjd15372 / crust

crust - A Ceph deployment tool library
GNU General Public License v3.0
0 stars 0 forks source link

Implement command line arguments parser #13

Open rjd15372 opened 7 years ago

rjd15372 commented 7 years ago

The command line arguments structure for crust should look like the following:

crust [config_opts, ...] <command> [command_opts, ...] <cmd_arg 1> ... <cmd_arg n>

[config_opts] := --<string>
[command_opts] := --<string>

# command_opts can be interleaved with cmd_args
rjd15372 commented 7 years ago

Ideally we would have a structure to declare the commands and its possible options. Something like this:

commands = {
  'config': {
    'class': command.ConfigCommand
    'optionals': {
      'local': 'novalue',
      'global': 'novalue
    },
    'positionals': {
      'list': [],
      'get': [('config_opt', str)],
    }
  }
}
tvale commented 7 years ago

I'll do this.