Skip to content
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

Specify security group by name #167

Merged
merged 2 commits into from
Jan 15, 2018
Merged

Specify security group by name #167

merged 2 commits into from
Jan 15, 2018

Conversation

databus23
Copy link
Member

@databus23 databus23 commented Jan 12, 2018

Turns out specifying security groups by id doesn’t not work at all.
We have to specify it by name, as the official documentation demands it.

Fixes #152 fixes #172

@databus23 databus23 requested a review from BugRoger as a code owner January 12, 2018 12:21
}
securityGroups := make([]map[string]interface{}, len(opts.SecurityGroups))
for i, groupID := range opts.SecurityGroups {
securityGroups[i] = map[string]interface{}{"id": groupID}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a "vendored" bugfix for Gophercloud?

Copy link
Member Author

@databus23 databus23 Jan 12, 2018

Choose a reason for hiding this comment

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

This was my contrived way overriding gophercloud default behaviour expecting security group names (which turns out to be the only correct way). I just removed my override to change that into an id field.

Copy link
Member Author

@databus23 databus23 Jan 12, 2018

Choose a reason for hiding this comment

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

So no, its not a bugfix. Its just crap I wrote that doesn't work that we now remove again.

@databus23
Copy link
Member Author

@edda FYI: The spec field changes from securityGroupID to securityGroupName as soon as this is merged.

Turns out specifying security groups by id doesn’t not work at all.
We have to specify it by name, as the official documentation demands it.
@databus23
Copy link
Member Author

@edda Good to merge? Will this break the UI?

@edda
Copy link
Contributor

edda commented Jan 15, 2018

@databus23 Merge away. The UI is ready for the change.

@databus23 databus23 merged commit ff81967 into master Jan 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate that the securitygroup id exists Non-Default Security Group is Ignored
3 participants