Revision 56d84a4e kamaki/clients/cyclades/__init__.py
b/kamaki/clients/cyclades/__init__.py | ||
---|---|---|
534 | 534 |
port['security_groups'] = security_groups |
535 | 535 |
if name: |
536 | 536 |
port['name'] = name |
537 |
if fixed_ips:
|
|
538 |
diff = set(['subnet_id', 'ip_address']).difference(fixed_ips)
|
|
537 |
for fixed_ip in fixed_ips:
|
|
538 |
diff = set(['subnet_id', 'ip_address']).difference(fixed_ip) |
|
539 | 539 |
if diff: |
540 | 540 |
raise ValueError( |
541 | 541 |
'Invalid format for "fixed_ips", %s missing' % diff) |
542 |
if fixed_ips: |
|
542 | 543 |
port['fixed_ips'] = fixed_ips |
543 | 544 |
r = self.ports_post(json_data=dict(port=port), success=201) |
544 | 545 |
return r.json['port'] |
Also available in: Unified diff