tools: drop --delete and --unset aliases for --default option

This may be confiusing, for example one may think that
`qvm-prefs --unset vmname netvm` will make vmname network-disconnected.
This type of mistakes may have severe security consequence, so better
drop those option names.

QubesOS/qubes-issues#3002

cc @rootkovska
This commit is contained in:
Marek Marczykowski-Górecki 2017-08-12 22:33:36 +02:00
parent 5b7947b51a
commit a260685bd1
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
4 changed files with 8 additions and 10 deletions

View File

@ -6,7 +6,7 @@
Synopsis
--------
:command:`qubes-prefs` [-h] [--verbose] [--quiet] [--force-root] [--help-properties] [*PROPERTY* [*VALUE*\|--delete]]
:command:`qubes-prefs` [-h] [--verbose] [--quiet] [--force-root] [--help-properties] [*PROPERTY* [*VALUE*\|--default]]
Options
-------
@ -27,9 +27,9 @@ Options
Decrease verbosity.
.. option:: --unset, --default, --delete, -D
.. option:: --default, -D
Unset the property. If is has default value, it will be used instead.
Reset propety to default value.
.. option:: --get, -g

View File

@ -6,7 +6,7 @@
Synopsis
--------
:command:`qvm-prefs` qvm-prefs [-h] [--verbose] [--quiet] [--force-root] [--help-properties] *VMNAME* [*PROPERTY* [*VALUE* \| --delete \| --default ]]
:command:`qvm-prefs` qvm-prefs [-h] [--verbose] [--quiet] [--force-root] [--help-properties] *VMNAME* [*PROPERTY* [*VALUE* \| --default ]]
Options
-------
@ -27,9 +27,9 @@ Options
Decrease verbosity.
.. option:: --unset, --default, --delete, -D
.. option:: --default, -D
Unset the property. If is has default value, it will be used instead.
Reset property to its default value.
.. option:: --get, -g

View File

@ -20,7 +20,6 @@
''' Manipulate global properties.'''
# TODO merge printing with qvm-prefs
# TODO list only non-default properties
from __future__ import print_function

View File

@ -59,11 +59,10 @@ def get_parser(vmname_nargs=1):
nargs='?',
help='new value of the property')
parser.add_argument('--unset', '--default', '--delete', '-D',
parser.add_argument('--default', '-D',
dest='delete',
action='store_true',
help='unset the property; '
'if property has default value, it will be used instead')
help='reset property to its default value')
return parser