Skip to content

fix: use mapped lowercase values in ACL table#1292

Merged
craicoverflow merged 2 commits intoredhat-developer:mainfrom
craicoverflow:mapped-table
Nov 5, 2021
Merged

fix: use mapped lowercase values in ACL table#1292
craicoverflow merged 2 commits intoredhat-developer:mainfrom
craicoverflow:mapped-table

Conversation

@craicoverflow
Copy link
Contributor

Closes #1247

Verification Steps

Run rhoas kafka acl list:

$ rhoas kafka acl list

  PRINCIPAL (5)                                    PERMISSION   OPERATION   DESCRIPTION                    
 ------------------------------------------------ ------------ ----------- ------------------------------- 
  All accounts                                     allow        describe    group is "*"                   
  All accounts                                     allow        describe    cluster is "*"                 
  All accounts                                     allow        describe    topic is "*"                   
  srvc-acct-17601ff7-89f8-48c6-af99-e3e925cc433c   allow        all         topic starts with "RedHat"     
  srvc-acct-17601ff7-89f8-48c6-af99-e3e925cc433c   allow        all         topic starts with "ACL-topic"  

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation change
  • Other (please specify)

Checklist

  • Documentation added for the feature
  • CI and all relevant tests are passing
  • Code Review completed
  • Verified independently by reviewer

@craicoverflow
Copy link
Contributor Author

Guides updated: #1247

@craicoverflow craicoverflow requested a review from wtrocki November 5, 2021 13:02

// get the SDK => CLI key mappings
operationMap := GetOperationMap()
flippedOperationMap := make(map[kafkainstanceclient.AclOperation]string)
Copy link
Collaborator

Choose a reason for hiding this comment

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

What flipped means? I see we deep copy map

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reversed, will change.

@wtrocki
Copy link
Collaborator

wtrocki commented Nov 5, 2021

Opinionated take:

  All accounts  =>   All Accounts  

@craicoverflow craicoverflow merged commit c7b5127 into redhat-developer:main Nov 5, 2021
@craicoverflow craicoverflow deleted the mapped-table branch November 5, 2021 15:39
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.

Kafka ACL table should print the mapped values instead of directly printing the enums from the backend

2 participants