Skip to content

Add the Security Group for Virtual IP #3497

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nguyenhuukhoi
Copy link

@github-actions github-actions bot added edit:loadbalancer This PR updates loadbalancer code semver:minor Backwards-compatible change backport-v2 This PR will be backported to v2 labels Aug 15, 2025
@coveralls
Copy link

Coverage Status

coverage: 63.81%. remained the same
when pulling 2656d91 on nguyenhuukhoi:securitygroupforvip
into 7c53a81 on gophercloud:main.

Copy link
Contributor

@mandre mandre left a comment

Choose a reason for hiding this comment

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

This needs modification of the acceptance tests to show this feature is working as intended.
You would have to ensure the vip_sg_ids parameter is set only in newer versions of OpenStack as this is a new feature of the 2025.1 release.

@@ -112,6 +112,9 @@ type CreateOpts struct {
// The ID of the QoS Policy which will apply to the Virtual IP
VipQosPolicyID string `json:"vip_qos_policy_id,omitempty"`

// The ID of the Security Group which will apply to the Virtual IP
VipSecGroupID string `json:"vip_sg_id,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Both the linked spec and the docs say the parameter is called vip_sg_ids in plural form. A look at the code also confirms this needs to be plural.

@@ -112,6 +112,9 @@ type CreateOpts struct {
// The ID of the QoS Policy which will apply to the Virtual IP
VipQosPolicyID string `json:"vip_qos_policy_id,omitempty"`

// The ID of the Security Group which will apply to the Virtual IP
Copy link
Contributor

Choose a reason for hiding this comment

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

Please document the minimum API version for this parameter (2.29 according to the docs), that came with OpenStack 2025.1.

@@ -197,6 +200,9 @@ type UpdateOpts struct {
// The ID of the QoS Policy which will apply to the Virtual IP
VipQosPolicyID *string `json:"vip_qos_policy_id,omitempty"`

// The ID of the Security Group which will apply to the Virtual IP
VipSecGroupID string `json:"vip_sg_id,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Please also add acceptance tests showing that you can clear existing VIP security groups with the Update call.

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:loadbalancer This PR updates loadbalancer code semver:minor Backwards-compatible change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants