summaryrefslogtreecommitdiffstats
path: root/openstack/common/plugin
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2012-11-12 16:25:59 -0500
committerMark McLoughlin <markmc@redhat.com>2012-11-15 15:01:14 -0500
commit5b9cb4148c2c16c910cb7eae9e7875a9fc06d3da (patch)
tree5ec357d1099d30148605d40be449eedd91479be6 /openstack/common/plugin
parentdbc72a6ef9a784c1bf5820a9750061d76529d571 (diff)
downloadoslo-5b9cb4148c2c16c910cb7eae9e7875a9fc06d3da.tar.gz
oslo-5b9cb4148c2c16c910cb7eae9e7875a9fc06d3da.tar.xz
oslo-5b9cb4148c2c16c910cb7eae9e7875a9fc06d3da.zip
Add support for positional arguments
argparse makes it awkward to implement the current cfg API where we simply return the leftover arguments to the caller. Very few cfg users actually rely on this functionality and for those cases it probably makes more sense for them to explicitly register positional arguments or sub-parsers. Add support for positional arguments via a 'required' Opt attribute: opt = StrOpt('foo', positional=True) conf.register_cli_opt(opt) conf(['bar']) conf.foo == 'bar' Change-Id: Iea746d710237e1ea26c1ef4871643941d1df09bd
Diffstat (limited to 'openstack/common/plugin')
0 files changed, 0 insertions, 0 deletions