vmware / go-vcloud-director

Golang SDK for VMware Cloud Director
Other
80 stars 76 forks source link

Add support for standalone Distributed Firewall Rule management #587

Closed Didainius closed 1 year ago

Didainius commented 1 year ago

This PR improves NSX-T Distributed Firewall Rule management. VCD APIs do not provide a mechanism to create a single firewall rule, only all of them at once. This PR introduces types and methods for managing Distributed Firewall Rules one by one.

The main thing to note is that VdcGroup.CreateDistributedFirewallRule still leverages the API endpoint for "update all", but does the work of merging rules, preserving their order, using json.RawMessage instead of exact types to prevent altering rules in any way now and in future.