summaryrefslogtreecommitdiff
path: root/openstackclient/common/parseractions.py
Commit message (Collapse)AuthorAgeFilesLines
* remove assert in favor an if/elseMichael McCune2016-05-021-3/+2
| | | | | | | | | | | | | | the assert usage in the NonNegativeAction has the potential to allow unexpected behavior when the python is byte-compiled with optimization turned on. Changes * remove assert in favor of if/else in NonNegativeAction class * add type specifier to parser arguments for non-negative actions * correct tests for new int based values Change-Id: I093e7440b8beff4f179e2c4ed81daff82704c40e Closes-Bug: #1576375
* fix: Exception message includes unnecessary class argsJas2016-02-291-2/+2
| | | | | | | | | Fix misusages of ArgumentTypeError which causes a tuple of class instance and error message string to be printed rather than just the error message string itsself. Change-Id: I0e997f86bb6603930cc92e90efcb48155f62ffb5 Closes-bug: #1551426
* Add MultiKeyValueAction to custom parser actionTang Chen2016-02-271-0/+81
| | | | | | | | | | | | | | Class MultiKeyValueAction will be used to parse arguments like this: --route destination=xxx,gateway=xxx --route destination=yyy,gateway=yyy The result is a list like this: [{destination:xxx, gateway:xxx}, {destination:yyy, gateway:yyy}] This action also contain validation of the parameters. Change-Id: Ie3aa8635c6a13fc2e429fe6922acd681dc7244cf
* Fix the bug of "openstack console log show"xiexs2015-11-091-0/+15
| | | | | | | | The behaviors are inconsistent while different negative line numbers specified. Change-Id: I2573f3e789f5603c896758971830ffc0b94c5e2b Closes-Bug: #1512263
* Fix PEP8 H405 errorsDean Troyer2014-06-271-3/+12
| | | | Change-Id: Id9ea03e7d88148f84bffe1b18b5b4315e6123012
* Add security group commandsDean Troyer2013-07-291-0/+24
| | | | | | | | | | | | | | * Add security group: create, delete, list, set, show * Add server: add secgroup, remove secgroup * Add security group rule: create, delete, list * Add Oslo's strutils and gettextutils * Adds parseractions.RangeAction() to handle option arguments of either a single number or a range of numbers: '--port 25' or '--port 1024:65535' Blueprint: nova-client Change-Id: Iad2de1b273ba29197709fc4c6a1036b4ae99725f
* Tweak volume commands and add k=v argparse actionDean Troyer2013-05-241-0/+34
Basic cleanups: * change metadata to property * add new KeyValueAction to parse the property options * multiple properties can be set using multiple --property args * consistent formatting * do lookups for volume args Change-Id: Ib6c43f01ad46b395aee8c61e886f42e2a5f5573e