Visitar URL original
networking/v2/qos: add minimum packet rate and packet rate limit rules by elajkat · Pull Request #4030 · gophercloud/gophercloud · GitHub
Skip to content

networking/v2/qos: add minimum packet rate and packet rate limit rules - #4030

Open
elajkat wants to merge 4 commits into
gophercloud:mainfrom
elajkat:qos_pps
Open

elajkat wants to merge 4 commits into
gophercloud:mainfrom
elajkat:qos_pps

Conversation

@elajkat

@elajkat elajkat commented Sep 23, 2026 •

Copy link
Copy Markdown

Add support for the two remaining Neutron QoS rule types that were not covered by gophercloud:

  • minimum packet rate rules (min_kpps), which additionally support the "any" traffic direction
  • packet rate limit rules (max_kpps, max_burst_kpps)

Each type gets List/Get/Create/Update/Delete support.

Closes: #4029

Fixes #4029

Links to the line numbers/files in the OpenStack source code that support the
code in this PR:
API-refs links:
QoS minimum packet rate rules: https://docs.openstack.org/api-ref/network/v2/index.html#qos-minimum-packet-rate-rules
QoS packet rate limit rules: https://docs.openstack.org/api-ref/network/v2/index.html#qos-packet-rate-limit-rules

@github-actions github-actions Bot added edit:networking This PR updates networking code semver:minor Backwards-compatible change backport-v2 This PR will be backported to v2 labels Sep 23, 2026
@coveralls

coveralls commented Sep 29, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 64.053% (+0.05%) from 64.002% — elajkat:qos_pps into gophercloud:main

@mandre mandre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Really nice. Just a small suggestion for checking for the needed extensions.

winiciusallan
winiciusallan previously approved these changes Oct 9, 2026

// MinimumPacketRateRulePage stores a single page of MinimumPacketRateRules from a List() API call.
type MinimumPacketRateRulePage struct {
pagination.LinkedPageBase

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The new page types inherit LinkedPageBase.NextPageURL which look for links.next. This is wrong, because neutron returns minimum_packet_rate_rules_links and packet_rate_limit_rules_links pagination links. We should have dedicated NextPageURL methods. While looking into this, I notices other resources had the same problem, I'm highlighting the issue with #4063 and will fix them globally.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Should I wait for #4063 ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That's OK, I'll include the fix in my PR.

Add support for the two remaining Neutron QoS rule types that were not
covered by gophercloud:
* minimum packet rate rules (min_kpps), which additionally support the
"any" traffic direction
* packet rate limit rules (max_kpps, max_burst_kpps)

Each type gets List/Get/Create/Update/Delete support.

Closes: gophercloud#4029
Signed-off-by: lajoskatona <lajos.katona@est.tech>
MinimumPacketRateRules and PacketRateLimitRules minkpps, maxkpps and
maxburstkpps values can be 0 on Neutron API.
@github-actions github-actions Bot added semver:major Breaking change semver:minor Backwards-compatible change backport-v2 This PR will be backported to v2 and removed semver:minor Backwards-compatible change backport-v2 This PR will be backported to v2 semver:major Breaking change labels Nov 9, 2026

@mandre mandre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One more int field that should be a pointer to allow for 0 value, otherwise, it's good to merge from my point of view.

// CreateMinimumPacketRateRuleOpts specifies parameters of a new MinimumPacketRateRule.
type CreateMinimumPacketRateRuleOpts struct {
// MinKPps is a minimum kilopackets per second. It's a required parameter.
MinKPps int `json:"min_kpps" required:"true"`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be a pointer as well to allow 0 value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-v2 This PR will be backported to v2 edit:networking This PR updates networking code semver:minor Backwards-compatible change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Openstack Neutron QoS Min PPS and PPS rate limit rules are missing

4 participants