Commit Graph

14 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
d3439694c8
tools: fix get_parser_for_command 2017-05-11 21:13:56 +02:00
Marek Marczykowski-Górecki
4113651f01
tools: fix default for SinglePropertyAction
For positional arguments default is sent to __call__ even when not
provided on command line. Exclude it in SinglePropertyAction, since
"default" value is really meant for 'properties' attribute, not
individual property.
2017-04-29 01:18:34 +02:00
Marek Marczykowski-Górecki
984ea09cef
tools: fix PropertyAction
self.default={} is mutable, so instead of modifying value derived from
that default, retrieve value, copy it and store again. Otherwise tests
(where the same parser is used multiple times) fails badly.
The same approach is used in argparse._AppendAction.
2017-04-29 01:18:34 +02:00
Marek Marczykowski-Górecki
275a53e545
Make pylint happy 2017-04-29 01:18:31 +02:00
Marek Marczykowski-Górecki
21c65d7ea8
tools: improve --all switch
Don't check VM 'qid' (which require mgmt call), but VM class instead
2017-04-29 01:18:28 +02:00
Marek Marczykowski-Górecki
36d8ee9b32
Add qvm-pool and qvm-volume tool 2017-04-07 18:48:05 +02:00
Marek Marczykowski-Górecki
ad570ec027
tools: make print_table compatible with python2 and python3 tests
StringIO expect 'str' object, but on python2 it's different from
'unicode' (returned by decode() method). Convert it explicitly back to
str.
2017-03-13 04:37:31 +01:00
Marek Marczykowski-Górecki
795909bc05
tools/qvm-prefs: re-add --help-properties action
Specific VM object is required to get list of properties and help on
them, so convert HelpPropertiesAction into normal action (like --get or
--set).
2017-03-13 04:37:29 +01:00
Marek Marczykowski-Górecki
435a465d70
tools/qvm-ls: kill fixed column width
Calculate column width dynamically, besed on actual contents.
2017-03-13 04:37:28 +01:00
Marek Marczykowski-Górecki
a575bc3422
tools: allow supplying app object to main function
This is mostly for tests, which use dummy app instance.
2017-03-09 02:39:52 +01:00
Marek Marczykowski-Górecki
61731a9490
tools: kill --force-root and --qubesxml arguments
Those are no longer useful, as all actions are delegated to qubesd. Keep
--force-root argument (but ignore it and hide from help) for backward
compatibility with various scripts.

Fixes QubesOS/qubes-issues#2684
2017-03-09 02:39:51 +01:00
Marek Marczykowski-Górecki
32bd75da77
Update license headers
Update GPL->LGPL for tools moved from core-admin repository.
While at it, change mailing address to www link, as suggested by FSF.

Cc: @woju
Cc: @rootkovska
2017-03-09 02:39:51 +01:00
Marek Marczykowski-Górecki
a813d50267
tools: adjust for qubesmgmt module
For now comment out HelpPropertiesAction, as we don't have VM classes
here and accessing properties help require VM instances.
This needs some better idea...
2017-03-08 15:55:52 +01:00
Marek Marczykowski-Górecki
2e2ce8454b
tools: copy unmodified file from core-admin 2017-03-08 15:55:51 +01:00