Skip to content

Commit

Permalink
[crmsh-4.6] Fix: ui_context: crm cluster delete autocompletion #1403 #…
Browse files Browse the repository at this point in the history
…1460

backport #1469

If you type
  $ crm configure delete
of do it interactively
  $ crm configure
  crm(live/node1)configure# delete
and then double press tab it, should propose possible resource options.
And this commit makes it working again.
  • Loading branch information
Aleksei Burlakov committed Jul 1, 2024
1 parent b5d215f commit 8dc3979
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crmsh/ui_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from . import constants
from . import log
from . import main
from .service_manager import ServiceManager


logger = log.setup_logger(__name__)
Expand Down Expand Up @@ -255,6 +256,9 @@ def enter_level(self, level):
self._in_transit = True

entry = level()
if ServiceManager().service_is_active("pacemaker.service"):
if 'requires' in dir(entry) and not entry.requires():
self.fatal_error("Missing requirements")

Check warning on line 261 in crmsh/ui_context.py

View check run for this annotation

Codecov / codecov/patch

crmsh/ui_context.py#L261

Added line #L261 was not covered by tests
self.stack.append(entry)
self.clear_readline_cache()

Expand Down

0 comments on commit 8dc3979

Please sign in to comment.