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 forCreateEdgeGateway
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)