-
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 NSX-T Firewall Group Support (Security Groups and IP Sets) #368
Conversation
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
92f3a2b
to
858d5a0
Compare
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
govcd/nsxt_firewall_group.go
Outdated
} | ||
|
||
if firewallGroup.NsxtFirewallGroup.ID == "" { | ||
return nil, fmt.Errorf("cannot retrieve associated VMs for NSX-T Firewall Group without ID") |
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.
return nil, fmt.Errorf("cannot retrieve associated VMs for NSX-T Firewall Group without ID") | |
return nil, fmt.Errorf("cannot retrieve associated VMs for NSX-T Firewall Group without ID") |
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.
Fixed.
CHANGELOG.md
Outdated
@@ -2,7 +2,27 @@ | |||
|
|||
* Added method `vdc.QueryEdgeGateway` [#364](https://github.com/vmware/go-vcloud-director/pull/364) | |||
* Deprecated `vdc.GetEdgeGatewayRecordsType` [#364](https://github.com/vmware/go-vcloud-director/pull/364) | |||
* Added NSX-T Firewall Group (Security Groups and IP Set) support by using structures |
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.
Suggesting below just because I got puzzled by the meaning of it all the way until I reached the very last file in the PR 😄
* Added NSX-T Firewall Group (Security Groups and IP Set) support by using structures | |
* Added NSX-T Firewall Group type (which represents a Security Group or an IP Set) support by using structures |
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.
Changed
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
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.
One typo and LGTM!
CHANGELOG.md
Outdated
@@ -2,7 +2,27 @@ | |||
|
|||
* Added method `vdc.QueryEdgeGateway` [#364](https://github.com/vmware/go-vcloud-director/pull/364) | |||
* Deprecated `vdc.GetEdgeGatewayRecordsType` [#364](https://github.com/vmware/go-vcloud-director/pull/364) | |||
* Added NSX-T Firewall Group type (which represents a Security Group or an IP Set) support by using | |||
structures `NsxtFirewallGroup` and `NsxtFirewallGroupMemberVms`. The following methods are | |||
introduced for managing Security Groups and IpP Sets: `Vdc.CreateNsxtFirewallGroup`, |
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.
introduced for managing Security Groups and IpP Sets: `Vdc.CreateNsxtFirewallGroup`, | |
introduced for managing Security Groups and IP Sets: `Vdc.CreateNsxtFirewallGroup`, |
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
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
This PR adds NSX-T Firewall Group support (this endpoint supports setting both - Security Groups and IP Sets).
It does so by introducing the following new types:
NsxtFirewallGroup
NsxtFirewallGroupMemberVms
And such methods for managing them:
Vdc.CreateNsxtFirewallGroup
,NsxtEdgeGateway.CreateNsxtFirewallGroup
Org.GetAllNsxtFirewallGroups
Vdc.GetAllNsxtFirewallGroups
Org.GetNsxtFirewallGroupByName
,Vdc.GetNsxtFirewallGroupByName
NsxtEdgeGateway.GetNsxtFirewallGroupByName
,Org.GetNsxtFirewallGroupById
Vdc.GetNsxtFirewallGroupById
,NsxtEdgeGateway.GetNsxtFirewallGroupById
NsxtFirewallGroup.Update
,NsxtFirewallGroup.Delete
NsxtFirewallGroup.GetAssociatedVms
,NsxtFirewallGroup.IsSecurityGroup
NsxtFirewallGroup.IsIpSet
Additionally it adds the following new methods to improve test cleanup framework (add support for VM cleanup when they are spread in multiple VDCs)
Org.QueryVmList
andOrg.QueryVmById
to find VM by ID in an OrgIMPROVEMENTS: