Re: [openstack-dev] [Neutron] netaddr and abbreviated CIDR format

2015-08-23 Thread Sean M. Collins
On Sun, Aug 23, 2015 at 10:10:39AM EDT, Kevin Benton wrote: While waiting for the upstream netaddr feedback, we should be able to block this pretty easily on the Neutron side by just checking that str(netaddr.IPNetwork(input)) == input. Good call - I totally missed the easy way to fix. --

Re: [openstack-dev] [Neutron] netaddr and abbreviated CIDR format

2015-08-23 Thread Kevin Benton
While waiting for the upstream netaddr feedback, we should be able to block this pretty easily on the Neutron side by just checking that str(netaddr.IPNetwork(input)) == input. On Sat, Aug 22, 2015 at 12:31 PM, Sean M. Collins s...@coreitpro.com wrote: On August 22, 2015 11:58:03 AM EDT, Monty

Re: [openstack-dev] [Neutron] netaddr and abbreviated CIDR format

2015-08-22 Thread shihanzhang
there was another patch [1] fix the invalid CIDR for subnet. thanks, hanzhang, shi [1] https://review.openstack.org/#/c/201942/ At 2015-08-22 03:33:26, Jay Pipes jaypi...@gmail.com wrote: On 08/21/2015 02:34 PM, Sean M. Collins wrote: So - the tl;dr is that I don't think that we should

Re: [openstack-dev] [Neutron] netaddr and abbreviated CIDR format

2015-08-22 Thread Sean M. Collins
On August 22, 2015 11:58:03 AM EDT, Monty Taylor mord...@inaugust.com wrote: On 08/21/2015 03:33 PM, Jay Pipes wrote: On 08/21/2015 02:34 PM, Sean M. Collins wrote: So - the tl;dr is that I don't think that we should accept inputs like the following: x - 192 x/y - 10/8 x.x/y -

Re: [openstack-dev] [Neutron] netaddr and abbreviated CIDR format

2015-08-22 Thread Monty Taylor
On 08/21/2015 03:33 PM, Jay Pipes wrote: On 08/21/2015 02:34 PM, Sean M. Collins wrote: So - the tl;dr is that I don't think that we should accept inputs like the following: x - 192 x/y - 10/8 x.x/y - 192.168/16 x.x.x/y - 192.168.0/24 which are equivalent to:: x.0.0.0/y -

Re: [openstack-dev] [Neutron] netaddr and abbreviated CIDR format

2015-08-21 Thread Jay Pipes
On 08/21/2015 02:34 PM, Sean M. Collins wrote: So - the tl;dr is that I don't think that we should accept inputs like the following: x - 192 x/y - 10/8 x.x/y - 192.168/16 x.x.x/y - 192.168.0/24 which are equivalent to:: x.0.0.0/y - 192.0.0.0/24 x.0.0.0/y - 10.0.0.0/8 x.x.0.0/y

[openstack-dev] [Neutron] netaddr and abbreviated CIDR format

2015-08-21 Thread Sean M. Collins
[Resending - since I don't think my mail client actually sent this the first time] While reviewing https://review.openstack.org/#/c/204459/ - I noticed that one of the unit tests is passing an IP address 1/32 - so I went and looked up the constructor for netaddr.IPNetwork, which has a feature

Re: [openstack-dev] [Neutron] netaddr and abbreviated CIDR format

2015-08-21 Thread Sean M. Collins
Here's what the implicit_prefix arg for the IPNetwork constructor does. Python 2.7.6 (default, Sep 9 2014, 15:04:36) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin Type help, copyright, credits or license for more information. import netaddr a =