-
Notifications
You must be signed in to change notification settings - Fork 180
Conversation
b015917
to
401a745
Compare
This one is ready for review. |
Ok, great! I'll review and test tomorrow morning. |
TenantID string | ||
Name string | ||
Description string | ||
AdminStateUp *bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll probably want to create types for the *bool
. For instance, here maybe variables named Up
and Down
:
type AdminState *bool
var (
up bool = true
Up AdminState = &up
down bool = false
Down AdminState = &down
)
Then users could supply them like:
opts := firewalls.CreateOpts{ Name: "fwName", AdminStateUp: firewalls.Up}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in b2a5a9f
Hmm, I hit a snag: my devstack implementation doesn't support the FWaaS extension. Is there anyone else who can verify that the acceptance tests are passing? Aside from that, this is looking really good; There are just some minor consistency things to fix. |
Can you provide a link to the FWaaS documentation that you're working off of? I found this one, but it doesn't really describe the parameters (e.g. data type, required vs optional). I usually work off of this site, but it doesn't even mention FWaaS (which is largely why it isn't already in Gophercloud). |
@jrperritt Any update about the tests check of this PR ? If you don't have an OpenStack with FWaaS you can easily bootstrap a devstack with FWaaS up and running using this script on a fresh Ubuntu 14.04. @julienvey @haklop Maybe you can run and validate acceptance tests ? |
@ggiamarchi No, I can't run the tests; hopefully someone else can. Maybe @jtopjian has FWaaS available? |
// | ||
// Default policy settings return only those firewall rules that are owned by the | ||
// tenant who submits the request, unless an admin user submits the request. | ||
func List(c *gophercloud.ServiceClient, opts ListOpts) pagination.Pager { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't notice these the first time I reviewed this, but can we change all the Opts
parameters to interfaces named OptsBuilder
? Most the other packages should have examples of this (for an example, see here) .This will let other providers user theses functions with different Opts
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually forgot it because my first implementation was inspired by the LBaaS code that do not use OptsBuilder
.
Done in 0059767.
Unfortunately I don't have FWaaS available. I'll check to see how difficult it would be to set it up on my Neutron test cloud later this week. |
@jtopjian @jrperritt I just ran the acceptance tests successfully on an OpenStack Cloud with FWaaS
|
@julienvey Nice - thank you 😄 |
@julienvey Great, thank you. |
The old way does not allow to handle updates correctly. When a nullable field is set and we want to remove the value we need to be able to set a null value in the json request body. For instance this happen in firewall rules for field source_ip_address (among others).
@jrperritt I have just pushed fixes for your comments. |
Great, I'll have a look. |
I think this is ready for merge. Great job, @ggiamarchi , and thank you for your patience :) |
OpenStack Firewall as a Service
🎉 ✌️ 😸 |
To-do list