rackspace / gophercloud

A Go SDK for OpenStack. IN FEATURE FREEZE. See Issue #592
http://gophercloud.io
Other
456 stars 181 forks source link

[rfr] Allow subnets to have no gateway #553

Closed jtopjian closed 8 years ago

jtopjian commented 8 years ago

If the gateway_ip parameter is omitted, Neutron assigns a default gateway of .1. However, if gateway_ip exists, but is null, then no gateway is assigned.

This patch is trying to emulate the --no-gateway command-line option of the python-neutronclient app:

https://github.com/openstack/python-neutronclient/blob/master/neutronclient/neutron/v2_0/subnet.py#L120-L123

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.005%) to 80.057% when pulling f92ae6c762ef68e7fbe914f793d14356805a0a50 on jtopjian:subnet-no-gateway into 1270499c0f662b06202ebc9bfe31acf2bbda290f on rackspace:master.

jtopjian commented 8 years ago

@jrperritt Invalid gateway config checks added.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.01%) to 80.065% when pulling 705cd9dfb287081379cecd450074c2391743fe01 on jtopjian:subnet-no-gateway into 1270499c0f662b06202ebc9bfe31acf2bbda290f on rackspace:master.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.01%) to 80.065% when pulling 705cd9dfb287081379cecd450074c2391743fe01 on jtopjian:subnet-no-gateway into 1270499c0f662b06202ebc9bfe31acf2bbda290f on rackspace:master.

jtopjian commented 8 years ago

@jrperritt err.. just noticed my commit message was incorrect (s/can/cannot/g). Just fixed that and forced the push.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.01%) to 80.065% when pulling 2524d119150604a229a40cd7b7b2c902034134fd on jtopjian:subnet-no-gateway into 1270499c0f662b06202ebc9bfe31acf2bbda290f on rackspace:master.

jrperritt commented 8 years ago

+2

jtopjian commented 8 years ago

Thank you!