generate_config: Move filters to external library 03/51403/12
authorGuillermo Herrero <guillermo.herrero@enea.com>
Wed, 31 Jan 2018 15:39:02 +0000 (16:39 +0100)
committerGuillermo Herrero <guillermo.herrero@enea.com>
Tue, 20 Feb 2018 14:54:18 +0000 (15:54 +0100)
commitd085c0ec73dfd804f226fb383509f6592c36236b
tree13603be1a062d50e20f3613e1c8f4121d3a9f2f7
parentacc1f95670a18e50cb1d6c47432cc5badea212c7
generate_config: Move filters to external library

Clean and isolate main script logic from custom filters by moving
all them to a external library file.
Library has a function to load all the existing filters at once.

New enhanced IP handling custom filters:
 - ipnet_hostaddr
 - ipnet_hostmin
 - ipnet_hostmax
 - ipnet_broadcast
 - ipnet_netmask
 - ipnet_contains_ip
 - ipnet_contains_iprange
 - ipnet_range_size

ipnet filters work with proper IP network with prefixlen mask,
ensuring consistent IP calculations and error handling.

Previous IP handling filters should be deprecated.

Change-Id: I83c41d7ad3c6bd1d9df1deca6cc5b9d2481ecf52
Signed-off-by: Guillermo Herrero <guillermo.herrero@enea.com>
config/utils/gen_config_lib.py [new file with mode: 0644]
config/utils/generate_config.py