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 (#1480)

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
liangxin1300 authored Jul 1, 2024
2 parents b5d215f + 8dc3979 commit 10f6f91
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")
self.stack.append(entry)
self.clear_readline_cache()

Expand Down

0 comments on commit 10f6f91

Please sign in to comment.