diff --git a/pyvcloud/vcd/gateway.py b/pyvcloud/vcd/gateway.py index cc659f66d..b3a98150d 100644 --- a/pyvcloud/vcd/gateway.py +++ b/pyvcloud/vcd/gateway.py @@ -369,7 +369,7 @@ def remove_external_network(self, network_name): self.resource, RelationType.GATEWAY_UPDATE_PROPERTIES, EntityType.EDGE_GATEWAY.value, gateway) - def edit_gateway(self, newname=None, desc=None, ha=None): + def edit_gateway(self, newname=None, desc=None, ha=None, gateway_backing_config=None): """It changes the old name of the gateway to the new name. :param str newname: new name of the gateway @@ -383,7 +383,7 @@ def edit_gateway(self, newname=None, desc=None, ha=None): :raises: ValueError: if the values are not provided. """ - if newname is None and desc is None and ha is None: + if newname is None and desc is None and ha is None and gateway_backing_config is None: raise ValueError('Invalid input, please provide at least one ' 'parameter') @@ -398,6 +398,11 @@ def edit_gateway(self, newname=None, desc=None, ha=None): if ha: gateway.Configuration.HaEnabled = E.HaEnabled(ha) + if gateway_backing_config: + gateway.Configuration.GatewayBackingConfig = E.GatewayBackingConfig( + gateway_backing_config + ) + return self.client.put_linked_resource( self.resource, RelationType.EDIT, EntityType.EDGE_GATEWAY.value, gateway)