-
Notifications
You must be signed in to change notification settings - Fork 92
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
Drop deprecated codes #1723
base: master
Are you sure you want to change the base?
Drop deprecated codes #1723
Conversation
01b721c
to
9ea6be2
Compare
9ea6be2
to
328d9b3
Compare
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.
Pull Request Overview
This PR removes deprecated code related to node types and legacy RA ("Resource Agent") handling. Key changes include:
- Dropping support for "normal" and "ping" node types in favor of "member" and "remote".
- Removing legacy code involving "rhcs" terminology and fallback logic for metadata retrieval.
- Eliminating unused functions such as os_types_list to clean up the codebase.
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
test/unittests/test_parse.py | Updated tests to use "remote" instead of deprecated "ping". |
crmsh/xmlutil.py | Removed "normal" type check; only "member" is now considered valid. |
crmsh/utils.py | Removed unused os_types_list function. |
crmsh/rsctest.py | Removed legacy "rhcs" handling and adjusted error messages. |
crmsh/ra.py | Dropped legacy logic for RA metadata retrieval and fallback functions. |
crmsh/parse.py | Updated regex and documentation to restrict node types to "member" and "remote". |
crmsh/constants.py | Changed default node type from "normal" to "member". |
Files not reviewed (1)
- doc/crm.8.adoc: Language not supported
Comments suppressed due to low confidence (2)
crmsh/xmlutil.py:328
- [nitpick] The function name is_normal_node is now misleading since it no longer considers the 'normal' node type; consider renaming the function or updating its documentation to reflect that it only checks for 'member' nodes.
return n.tag == "node" and (n.get("type") in (None, "member", ""))
crmsh/ra.py:107
- The removal of the fallback branch in the ra_meta function may lead to missing metadata if crm_resource fails; verify that crm_resource reliably returns valid metadata in all environments or consider retaining a fallback mechanism.
return crm_resource("--show-metadata %s:%s" % (ra_class, ra_type))
According to the nodes-4.0.rng schema, only supports node type "member" and "remote"
bedc5d9
to
5128a33
Compare
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.
Pull Request Overview
This PR removes deprecated code related to obsolete node types and legacy resource agent handling. The changes update tests, XML utility functions, error messages, and regular expressions to support only the modern node types "member" and "remote", while also removing legacy references to "rhcs" and related fallback code.
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
test/unittests/test_parse.py | Updated test strings and assertions to use only "member" and "remote". |
crmsh/xmlutil.py | Renamed the node type check function to reflect the supported types. |
crmsh/utils.py | Removed the obsolete os_types_list function. |
crmsh/ui_configure.py | Updated the function call to use the new is_member_node check. |
crmsh/rsctest.py | Removed legacy checks for 'rhcs/' and updated error messages. |
crmsh/ra.py | Removed legacy fetching logic and fallback methods for resource agents. |
crmsh/parse.py | Updated regex and documentation to limit valid node types. |
crmsh/constants.py | Changed default node type from "normal" to "member". |
Files not reviewed (1)
- doc/crm.8.adoc: Language not supported
According to the nodes-4.0.rng schema, only supports node type "member" and "remote"