Skip to content

Commit

Permalink
provider/openstack: gophercloud migration: fixing dhcp and gateway co…
Browse files Browse the repository at this point in the history
…nfiguration
  • Loading branch information
jtopjian committed Oct 23, 2016
1 parent 1c6b69e commit 17b1787
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,14 @@ func resourceNetworkingSubnetV2Create(d *schema.ResourceData, meta interface{})
createOpts.GatewayIP = &gatewayIP
}

if v, ok := d.GetOk("enable_dhcp"); ok {
enableDHCP := v.(bool)
createOpts.EnableDHCP = &enableDHCP
if noGateway {
disableGateway := ""
createOpts.GatewayIP = &disableGateway
}

enableDHCP := d.Get("enable_dhcp").(bool)
createOpts.EnableDHCP = &enableDHCP

if v, ok := d.GetOk("ip_version"); ok {
ipVersion := resourceNetworkingSubnetV2DetermineIPVersion(v.(int))
createOpts.IPVersion = ipVersion
Expand Down

0 comments on commit 17b1787

Please sign in to comment.