provider/openstack: gophercloud migration: Only set 'gateway_ip' to "" if 'no_gateway' == true.

This commit is contained in:
Gavin Williams 2016-10-07 17:19:53 +01:00 committed by Joe Topjian
parent 8405a9f118
commit 28466f50a5

View File

@ -245,9 +245,9 @@ func resourceNetworkingSubnetV2Update(d *schema.ResourceData, meta interface{})
} }
if d.HasChange("no_gateway") { if d.HasChange("no_gateway") {
noGateway := d.Get("no_gateway").(bool) if d.Get("no_gateway").(bool) {
if noGateway { gatewayIP := ""
updateOpts.GatewayIP = nil updateOpts.GatewayIP = &gatewayIP
} }
} }