On Tue, Mar 07, 2017 at 07:19:13AM +0530, [email protected] wrote:
> From: Numan Siddique <[email protected]>
> 
> If the CMS wants to make use of ovn ipam it can now provide a
> list of IPv4 addresses and a range of IPv4 addresses which
> will be excluded from the dynamic address assignment.
> To support this, a new option 'exclude_ips' is added in the
> Logical_switch.other_config column.
> 
> Eg. ovn-nbctl set Logical_switch sw0
> other_config:exclude_ips="10.0.0.2 10.0.0.30-10.0.0.40"
> 
> The present code, uses hash maps to store the assigned IP addresses.
> In order to support this option, this patch has refactored the IPAM
> assignment. It now uses a bitmap to manage the IP assignment with
> each bit in the bitmap representing an IPv4 address.
> 
> Signed-off-by: Numan Siddique <[email protected]>

It might be cleaner to use the OVN lexer instead of an ad hoc parser
here.  Also, OVN elsewhere uses .. for ranges, it might be best to stick
with that instead of using - here.

I find myself wondering whether this is the best way to specify address
assignments.  One could invent other ways, for example to allow "subnet"
to specify multiple subnets or ranges and, if necessary, adding an
"except" keyword to subtract subnets or ranges.

I wish we hadn't given "subnet" such a generic name, since it's just for
DHCP address assignment. 

Thank you for working on this!
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to