<div dir="ltr">If we feel a need for specifying the relative position of gateway address and allocation pools when creating a subnet from a pool which will pick a CIDR from its prefixes, then the integer value solution is probably marginally better than the "fake IP" one (eg.: 0.0.0.1 to say the gateway is the first IP). Technically they're equivalent - and one could claim that the address-like notation is nothing bug and octet based representation of a number. <div><br></div><div>I wonder why a user would ask for a random CIDR with a given prefix, and then mandate that gateway IP and allocation pools are in precise locations within this randomly chosen CIDR. I guess there are good reasons I cannot figure out by myself. In my opinion all that counts here is that the semantics of a resource attribute should be the same in the request and the response. For instance, one should not have gateway_ip as a relative "counter-like" IP in the request body and then as an actual IP address in the response object. </div><div><br></div><div>Salvatore</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 21 March 2015 at 00:08, Tidwell, Ryan <span dir="ltr"><<a href="mailto:ryan.tidwell@hp.com" target="_blank">ryan.tidwell@hp.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Great suggestion Kevin. Passing 0.0.0.1 as gateway_ip_template (or whatever you call it) is essentially passing an address index, so when you OR 0.0.0.1 with
the CIDR you get your gateway set as the first usable IP in the subnet. The intent of the user is to allocate the first usable IP address in the subnet to the gateway. The wildcard notation for gateway IP is really a more convoluted way of expressing this
intent. Something like address_index is a little more explicit in my mind. I think Kevin is on to something.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">-Ryan<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Kevin Benton [mailto:<a href="mailto:blak111@gmail.com" target="_blank">blak111@gmail.com</a>]
<br>
<b>Sent:</b> Friday, March 20, 2015 2:34 PM<br>
<b>To:</b> OpenStack Development Mailing List (not for usage questions)<span class=""><br>
<b>Subject:</b> Re: [openstack-dev] [api][neutron] Best API for generating subnets from pool<u></u><u></u></span></span></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">What if we just call it 'address_index' and make it an integer representing the offset from the network start address?<u></u><u></u></p>
</div><div><div class="h5">
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Fri, Mar 20, 2015 at 12:39 PM, Carl Baldwin <<a href="mailto:carl@ecbaldwin.net" target="_blank">carl@ecbaldwin.net</a>> wrote:<u></u><u></u></p>
<p class="MsoNormal">On Fri, Mar 20, 2015 at 1:34 PM, Jay Pipes <<a href="mailto:jaypipes@gmail.com" target="_blank">jaypipes@gmail.com</a>> wrote:<br>
> How is 0.0.0.1 a host address? That isn't a valid IP address, AFAIK.<br>
<br>
It isn't a valid *IP* address without the network part. However, it<br>
can be referred to as the "host address on the network" or the host<br>
part of the IP address.<br>
<span style="color:#888888"><br>
<span>Carl</span></span><u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">Kevin Benton<u></u><u></u></p>
</div>
</div>
</div>
</div></div></div>
</div>
<br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>