-
Notifications
You must be signed in to change notification settings - Fork 94
Dev: ui_node: Enable standby and maintenance on pacemaker remote node #1855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Dev: ui_node: Enable standby and maintenance on pacemaker remote node #1855
Conversation
72969e2
to
fd88dd3
Compare
And refactor xmlutil.CrmMonXmlParser.get_node_list function
d2f4985
to
0563566
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
0563566
to
966aae2
Compare
It's enough to check the node type is remote, since the remote node's id and uname might be different with the value of RA parameter "server".
It's enough to get the online list of pacemaker remote nodes
a7770f6
to
6667f6d
Compare
""" | ||
instance = cls(peer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you change this to a classmethod and create new instance in the method? This does not make sense.
crmsh/xmlutil.py
Outdated
conditions.append(f'@online="{online_value}"') | ||
if standby is not None: | ||
standby_value = 'true' if standby else 'false' | ||
conditions.append(f'@standby="{standby_value}"') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to complex. online
vs standby
, and only_member
vs only_remote
is mutually exclusive. Please use enum or str instead of bool.
@@ -3249,7 +3250,8 @@ def __bool__(self): | |||
|
|||
def validate_and_get_reachable_nodes( | |||
nodes: typing.List[str] = [], | |||
all_nodes: bool = False | |||
all_nodes: bool = False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not test all_nodes
at the very beginning in this function? If all_node
is true, you don't need to do the other complex logic.
Problems
Might have problem:
Changes:
crm_mon --output-as=xml
looks more accurately