-
Notifications
You must be signed in to change notification settings - Fork 32
Addition of resource and data source for Custom QoS Policy under tenant policies (DCNE-283) #401
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?
Conversation
|
|
||
| # mso_custom_qos_policy # | ||
|
|
||
| Data source for Custom Quality of Service (QoS) Policy. This resource is supported in NDO v4.3 and higher. |
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.
here the abbreviation is the other way around, can you make it consistent? or other way around in the other lines
| Data source for Custom Quality of Service (QoS) Policy. This resource is supported in NDO v4.3 and higher. | |
| Data source for Custom QoS (Quality of Service) Policy. This resource is supported in NDO v4.3 and higher. |
…licy under tenant policies
| func convertCosValue(value string) string { | ||
| if mapped, ok := targetCosMap[value]; ok { | ||
| return mapped | ||
| } | ||
| return value | ||
| } | ||
|
|
||
| func convertDscpValue(value string) string { | ||
| if mapped, ok := targetDscpMap[value]; ok { | ||
| return mapped | ||
| } | ||
| return 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.
Shouldn't we combine these two functions into a more general function in utils.go that could be used in future resources?
| func reverseCosMap(value string) string { | ||
| for k, v := range targetCosMap { | ||
| if v == value { | ||
| return k | ||
| } | ||
| } | ||
| return value | ||
| } | ||
|
|
||
| func reverseDscpMap(value string) string { | ||
| for k, v := range targetDscpMap { | ||
| if v == value { | ||
| return k | ||
| } | ||
| } | ||
| return 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.
Shouldn't we combine these two functions into a more general function in utils.go that could be used in future resources?
…policy generic by moving them to utils.go
No description provided.