Revision ccdd1b82 kamaki/clients/cyclades/__init__.py
b/kamaki/clients/cyclades/__init__.py | ||
---|---|---|
525 | 525 |
req['network']['shared'] = bool(shared) |
526 | 526 |
r = self.networks_post(json_data=req, success=201) |
527 | 527 |
return r.json['network'] |
528 |
|
|
529 |
def create_port(self, network_id, device_id, security_groups=None): |
|
530 |
port = dict(network_id=network_id, device_id=device_id) |
|
531 |
if security_groups: |
|
532 |
port['security_groups'] = security_groups |
|
533 |
r = self.ports_post(json_data=dict(port=port), success=201) |
|
534 |
return r.json['port'] |
Also available in: Unified diff