Skip to content

Commit

Permalink
Dev: cibconfig: 'crm configure show changed' include deleted objects
Browse files Browse the repository at this point in the history
  • Loading branch information
liangxin1300 committed Dec 10, 2019
1 parent 41d65be commit 1b6f4d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crmsh/cibconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -3223,14 +3223,16 @@ def filter_objects(self, filters):
obj_set = orderedset.oset([])
and_filter, and_set = False, None
for spec in filters:
if spec == "or":
if spec in ["or", "from_show"]:
continue
elif spec == "and":
and_filter, and_set = True, obj_set
obj_set = orderedset.oset([])
continue
if spec == "changed":
obj_set |= orderedset.oset(self.modified_elems())
if "from_show" in filters:
obj_set |= orderedset.oset(self.remove_queue)
elif spec.startswith("type:"):
obj_set |= orderedset.oset(self.get_elems_on_type(spec))
elif spec.startswith("tag:"):
Expand Down
2 changes: 2 additions & 0 deletions crmsh/ui_configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,8 @@ def do_show(self, context, *args):
from .utils import obscure
osargs = [arg[8:] for arg in args if arg.startswith('obscure:')]
args = [arg for arg in args if not arg.startswith('obscure:')]
if "changed" in args:
args.append("from_show")
with obscure(osargs):
set_obj = mkset_obj(*args)
return set_obj.show()
Expand Down

0 comments on commit 1b6f4d4

Please sign in to comment.