Skip to content
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

Add keyword to find cluster type based on cluster infrastructure #2154

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ChughShilpa
Copy link
Contributor

@ChughShilpa ChughShilpa commented Jan 3, 2025

This PR

  • Removes keyword "Is Cluster Type Self-Managed" as it was suggested not to rely on console url to find cluster type
  • In all self-managed clusters, there is no common key in "oc get infrastructure cluster" output which can be used to
    identify the cluster-type
  • There is one common key in all managed clusters which i found useful to identify the cluster-type
    {
                         "key": "red-hat-managed",
                         "value": "true"
                     }
    

- Adds a keyword "Is Cluster Type Managed" to find the cluster type based on cluster infrastructure

 

Copy link

sonarqubecloud bot commented Jan 3, 2025

... Returns ${TRUE} if cluster type is Managed
... Returns ${FALSE} if cluster type is Self-Managed
${rc} ${output}= Run And Return Rc And Output
... oc get infrastructure cluster -o jsonpath='{.status.platformStatus.*.resourceTags[?(@.key=="red-hat-managed")].value}'

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (129/120)
Copy link
Contributor

github-actions bot commented Jan 3, 2025

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass %
589 0 0 589 100

@@ -333,17 +333,15 @@ Wait For Namespace To Be Active
Log ${value}
Should Be Equal As Integers ${rc} 0

Is Cluster Type Self-Managed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you maintain this keyword returning a negation of Is Cluster Type Managed ?

Something like:

    ${is_managed}=    Is Cluster Type Managed
    RETURN    not ${is_nanaged}

Copy link
Contributor Author

@ChughShilpa ChughShilpa Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is Cluster Type Managed keyword covers both the cases for cluster type (managed and self-managed) in one single keyword, which is sufficient in my opinion.

Copy link
Contributor Author

@ChughShilpa ChughShilpa Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can keep it Is Cluster Type Self-Managed also if you have a strong preference
@jgarciao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants