vmware/go-vcloud-director

Add update functionality to edge gateway

Open

#202 opened on Jun 12, 2019

 (4 comments) (0 reactions) (1 assignee)Go (75 forks)auto 404
enhancementhelp wanted

Repository metrics

Stars
 (82 stars)
PR merge metrics
 (PR metrics pending)

Description

As defined in PR #195, we support edge gateway creation and deletion.

To complete the set of functionalities, we should also support updates.

While the API for updates is conceptually simple, as it requires passing the same structure used for creation, determining what can be updated and how is more complicated.

For example, when we change the dependency from an external network as default gateway, we need to change the elements that we know (gateway IP and netmask) but also elements that we don't know directly (the external IP allocated or whether there is an available IP). Also, changing the external network will influence how the depending routed networks will respond.

Moreover, we need to understand which parts of the configuration can be altered without side effects (or with manageable side effects) and which should be considered non-alterable, meaning that we will need to re-deploy the edge gateway to change them.

Given the complexity of the matter, we need to decide between two approaches:

  • Create an Update function, with a structure similar to the one used for CreateEdgeGateway and handle all the possibilities in there.
  • Create a separate function for each element that can be changed (such as UnlinkNetwork, RemoveDefaultGateway, ChangeDefaultGateway, and so on)

Contributor guide