feat(networking): Neutron QoS family (policy + bandwidth-limit / DSCP / minimum-bandwidth rules) - #19
Merged
Merged
Conversation
Add the network QoS resources ported from terraform-provider-openstack: - pcd_networking_qos_policy (shared/is_default/tags) - pcd_networking_qos_bandwidth_limit_rule - pcd_networking_qos_dscp_marking_rule - pcd_networking_qos_minimum_bandwidth_rule - pcd_networking_qos_policy data source (lookup by id or name) Rules are nested under a policy (qos_policy_id is ForceNew) and imported by a composite <qos_policy_id>/<rule_id> ID. The family reuses the existing networking package's configureClient/replaceTags/NetworkV2Client, so it needs no new service client or docs subcategory. Policy tags use the "qos/policies" attributes-tags path (the QoS policy collection lives at /v2.0/qos/policies, not /v2.0/policies). Create and Update treat a 404 on the immediate read-back as an error rather than persisting unknown computed values. Includes a full-tree acceptance test (policy + all three rules + data source + import), examples, and CHANGELOG/DECISIONS entries.
PF9-pushkar
added a commit
that referenced
this pull request
Jul 14, 2026
feat(networking): Neutron QoS family (policy + bandwidth-limit / DSCP / minimum-bandwidth rules)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the Neutron QoS resource family (Phase 3), ported from
terraform-provider-openstackv3.4.0 and adapted to the terraform-plugin-framework:pcd_networking_qos_policyshared,is_default,tags)pcd_networking_qos_bandwidth_limit_rulemax_kbps/max_burst_kbps/directionpcd_networking_qos_dscp_marking_ruledscp_markpcd_networking_qos_minimum_bandwidth_rulemin_kbps/directionpcd_networking_qos_policy(data source)Design notes
internal/services/networkingpackage and reusesconfigureClient,replaceTags, andNetworkV2Client. Docs land under the existing Networking subcategory.qos_policy_idisRequired+ForceNew; rules import via a composite<qos_policy_id>/<rule_id>ID (helpersplitQoSRuleID). The policy imports by bare ID.UpdateOptsset pointer fields only when the planned value differs from state, so a boolean flipped tofalseis still sent (verified against gophercloudBuildRequestBody).Adversarial review — two real bugs found and fixed
Three review passes (state-consistency, gophercloud API usage, import/data-source/registration) ran before this PR. Two confirmed findings, both fixed in this branch:
policiesattributes-tags collection; the QoS policy collection isqos/policies(/v2.0/qos/policies/{id}/tags). Tag writes would have 404'd against a real cloud. Fixed at both call sites; confirmed against upstream terraform-provider-openstack and gophercloud'sresourcePath.notFoundafter create/update (correctness).Create/Updateignored thereadIntonot-found bool; a read-after-write 404 would persist unknown computed values → "Provider produced inconsistent result after apply". Now a post-write 404 is surfaced as an error in all four resources.The import/data-source/registration pass returned no findings.
Testing
go build,go vet,gofmt,golangci-lint— all clean (0 issues).terraform fmtclean on examples.TestAccNetworkingQoS_tree): policy + all three rule types + data source, an in-place rename/rate-change step, and policy import — not run live this session (CE lab credentials unavailable). QoS depends only on the Neutronqosextension (no compute/storage backend), so it should pass on the fresh CE lab; see DECISIONS.md.Docs / examples
import.sh) and the data source.docs/regenerated viamake generate(not committed — generated on demand).