vmware / go-vcloud-director

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

Add support for NSX-T Edge Gateway BGP Neighbor configuration #489

Closed Didainius closed 2 years ago

Didainius commented 2 years ago

This PR continues on the track of PRs #480 and #488 and completes coverage of NSX-T Edge Gateway BGP Configuration by adding Neighbor configuration support.

Add support for managing NSX-T Edge Gateway BGP Neighbor. It is done by adding types EdgeBgpNeighbor and types.EdgeBgpNeighbor with functions CreateBgpNeighbor, GetAllBgpNeighbors, GetBgpNeighborByIp, GetBgpNeighborById, Update and Delete

Note. VCD 10.2 versions have a problem - they do not return a new entity ID when it is created. Function CreateBgpNeighbor handles this internally by waiting for task completion and checking if ID was returned (it is returned in 10.3). If the ID is not returned - the function will lookup the entity Neighbor IP address. This should be safe (as opposed to lookup by name in CreateBgpIpPrefixList) as the uniqueness of this IP is enforced by API