-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add support for firewall rule handling using NSX-V edge gateway API #247
Conversation
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.
First scan :) nice work
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.
First pass.
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.
Preliminary review. More after testing
Acceptance tests passed on 9.5 and 10 |
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.
Getting close!
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.
LGTM now!
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.
LGTM
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.
LGTM, just function description needs improvement
// GetNsxvFirewallRuleById retrieves types.EdgeFirewallRule by firewall rule ID as shown in the UI using proxied | ||
// NSX-V API. | ||
// It returns and error `ErrorEntityNotFound` if the firewall rule is not found | ||
func (egw *EdgeGateway) GetNsxvFirewallRuleById(id string) (*types.EdgeFirewallRule, error) { |
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.
Get and delete use internal IDs or UI IDs. From comment I am not sure
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.
Thanks. Improved comments.
…re#253) * Deprecated find disk functions and added new get Disk functions * change getDisk to be getDisks * Improve tests * Updated to use parent - enforced implementation Signed-off-by: Vaidotas Bauzys <vbauzys@vmware.com> (cherry picked from commit 9f7abf2) Add support for firewall rule handling using NSX-V edge gateway API (vmware#247) * Added methods `CreateNsxvFirewallRule()`, `UpdateNsxvFirewallRule()`, `GetNsxvFirewallRuleById()`, `DeleteNsxvFirewallRuleById()` which use the proxied NSX-V API of advanced edge gateway for handling firewall rules * Added methods `GetFirewallParams()`, `UpdateFirewallParams()` for changing global firewall settings * Added method `GetAnyVnicIndexByNetworkName()` to for easier interface (vNic) lookup in edge gateway * Added method `ExecuteParamRequestWithCustomError()` which adds query parameter support on top of `ExecuteRequestWithCustomError()` (cherry picked from commit a6af6b4)
This PR adds:
CreateNsxvFirewall()
,UpdateNsxvFirewall()
,GetNsxvFirewallById()
,DeleteNsxvFirewallById()
andGetAllNsxvFirewallRules()
GetFwGeneralParams()
,UpdateFwGeneralParams()
GetAnyVnicIndexByNetworkName()
to for easier interface (vNic) lookup in edge gatewayExecuteParamRequestWithCustomError()
which adds query parameter support on top ofExecuteRequestWithCustomError()
EdgeFirewallRule
andFwGeneralParamsWithXml
for firewall manipulationNote Full test suite passed on vCD 9.5 and 10