Revision 0d1f9117 snf-cyclades-app/synnefo/logic/subnets.py
b/snf-cyclades-app/synnefo/logic/subnets.py | ||
---|---|---|
283 | 283 |
raise faults.BadRequest("Invalid network IPv6 gateway") |
284 | 284 |
if not gateway6 in network6: |
285 | 285 |
raise faults.BadRequest("Invalid network IPv6 gateway") |
286 |
|
|
287 |
|
|
288 |
def parse_allocation_pools(allocation_pools): |
|
289 |
alloc = list() |
|
290 |
for pool in allocation_pools: |
|
291 |
try: |
|
292 |
start, end = pool.split(',') |
|
293 |
alloc.append([ipaddr.IPv4Address(start), |
|
294 |
ipaddr.IPv4Address(end)]) |
|
295 |
except ValueError: |
|
296 |
raise CommandError("Malformed IPv4 address") |
|
297 |
|
|
298 |
return alloc |
Also available in: Unified diff