Commit 1bb144ed authored by Sigmund Augdal's avatar Sigmund Augdal

Canonicalize cidrs before storing them in security group rules

parent 8317f37a
......@@ -145,7 +145,7 @@ def get_library_groups(etcd_client, cloudid=None):
def add_library_entry(etcd_client, group_id, cidr, comment, entryref=None):
entry_id = uuid.uuid4()
entry_key = library_group_entry_key(group_id, entry_id)
cidr = ipaddress.ip_network(cidr).with_prefixlen
etcd_client.set(entry_key + '/cidr', cidr)
etcd_client.set(entry_key + '/comment', comment)
if entryref:
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment