Skip to content

Commit

Permalink
tools: remove qvm-ls tool and related integration in qubes.property
Browse files Browse the repository at this point in the history
qvm-ls tool (as all other tools) will be accessing properties through
API, so no need (nor sense) for this tool-specific attributes in
qubes.property. The only somehow used was ls_width, and in fact it made
the output unnecessary wide.

The tool itself is already moved to core-mgmt-client repository.

QubesOS/qubes-issues#853
  • Loading branch information
marmarek committed May 12, 2017
1 parent 654e64c commit 2aa0de3
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 747 deletions.
11 changes: 2 additions & 9 deletions qubes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def icon_path_dispvm(self):
self.icon_dispvm) + ".png"


class property(object): # pylint: disable=redefined-builtin,invalid-name
class property(object): # pylint: disable=redefined-builtin,invalid-name
'''Qubes property.
This class holds one property that can be saved to and loaded from
Expand All @@ -157,8 +157,6 @@ class property(object): # pylint: disable=redefined-builtin,invalid-name
:param int order: order of evaluation (bigger order values are later)
:param bool clone: :py:meth:`PropertyHolder.clone_properties` will not \
include this property by default if :py:obj:`False`
:param str ls_head: column head for :program:`qvm-ls`
:param int ls_width: column width in :program:`qvm-ls`
:param str doc: docstring; this should be one paragraph of plain RST, no \
sphinx-specific features
Expand Down Expand Up @@ -192,7 +190,7 @@ class property(object): # pylint: disable=redefined-builtin,invalid-name
def __init__(self, name, setter=None, saver=None, type=None,
default=_NO_DEFAULT, write_once=False, load_stage=2, order=0,
save_via_ref=False, clone=True,
ls_head=None, ls_width=None, doc=None):
doc=None):
# pylint: disable=redefined-builtin
self.__name__ = name
self._setter = setter
Expand All @@ -208,11 +206,6 @@ def __init__(self, name, setter=None, saver=None, type=None,
self.__doc__ = doc
self._attr_name = '_qubesprop_' + name

if ls_head is not None or ls_width is not None:
self.ls_head = ls_head or self.__name__.replace('_', '-').upper()
self.ls_width = max(ls_width or 0, len(self.ls_head) + 1)


def __get__(self, instance, owner):
if instance is None:
return self
Expand Down
1 change: 0 additions & 1 deletion qubes/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,6 @@ def load_tests(loader, tests, pattern): # pylint: disable=unused-argument
'qubes.tests.mgmt',
'qubes.tests.tools.qvm_device',
'qubes.tests.tools.qvm_firewall',
'qubes.tests.tools.qvm_ls',
'qubespolicy.tests',
):
tests.addTests(loader.loadTestsFromName(modname))
Expand Down
76 changes: 0 additions & 76 deletions qubes/tests/tools/qvm_ls.py

This file was deleted.

Loading

0 comments on commit 2aa0de3

Please sign in to comment.