Skip to content

Conversation

@shrsr
Copy link
Collaborator

@shrsr shrsr commented Nov 20, 2025

No description provided.

@shrsr shrsr self-assigned this Nov 20, 2025
@github-actions github-actions bot changed the title Addition of resource and data source for Custom QoS Policy under tenant policies Addition of resource and data source for Custom QoS Policy under tenant policies (DCNE-283) Nov 20, 2025

# mso_custom_qos_policy #

Data source for Custom Quality of Service (QoS) Policy. This resource is supported in NDO v4.3 and higher.
Copy link
Collaborator

Choose a reason for hiding this comment

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

https://github.com/CiscoDevNet/terraform-provider-mso/pull/401/files#diff-bf8f29c49a792b9c5b1180935283c6450c16e24ace369ebafcda9bc447a9fa8dR36

here the abbreviation is the other way around, can you make it consistent? or other way around in the other lines

Suggested change
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.

Comment on lines 216 to 228
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
}
Copy link
Collaborator

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?

Comment on lines 230 to 246
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
}
Copy link
Collaborator

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?

@shrsr shrsr requested a review from gmicol November 25, 2025 19:18
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.

Create a resource and data source for "Custom QoS Policy" object under Tenant Policies (DCNE-283)

3 participants