Skip to content

Commit

Permalink
Fix: ui_context: crm cluster delete autocompletion ClusterLabs#1403 C…
Browse files Browse the repository at this point in the history
…lusterLabs#1460

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 Jun 27, 2024
1 parent fe4d011 commit 3812503
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 3812503

Please sign in to comment.