Revision 0d1f9117 snf-cyclades-app/synnefo/api/management/commands/subnet-create.py
b/snf-cyclades-app/synnefo/api/management/commands/subnet-create.py | ||
---|---|---|
110 | 110 |
dns = options["dns"] |
111 | 111 |
host_routes = options["host_routes"] |
112 | 112 |
|
113 |
#Parsing allocation pools |
|
114 |
alloc = list() |
|
115 |
for pool in allocation_pools: |
|
116 |
try: |
|
117 |
start, end = pool.split(',') |
|
118 |
alloc.append([ipaddr.IPv4Address(start), |
|
119 |
ipaddr.IPv4Address(end)]) |
|
120 |
except ValueError: |
|
121 |
raise CommandError("Malformed IPv4 address") |
|
113 |
alloc = subnets.parse_allocation_pools(allocation_pools) |
|
122 | 114 |
|
123 | 115 |
sub = subnets.create_subnet(name=name, |
124 | 116 |
network_id=network_id, |
Also available in: Unified diff