Revision f3740b99 kamaki/clients/cyclades/__init__.py
b/kamaki/clients/cyclades/__init__.py | ||
---|---|---|
58 | 58 |
|
59 | 59 |
:param networks: (list of dicts) Networks to connect to, list this: |
60 | 60 |
"networks": [ |
61 |
{"network": <network_uuid>},
|
|
62 |
{"network": <network_uuid>, "fixed_ip": address},
|
|
61 |
{"uuid": <network_uuid>},
|
|
62 |
{"uuid": <network_uuid>, "fixed_ip": address},
|
|
63 | 63 |
{"port": <port_id>}, ...] |
64 | 64 |
ATTENTION: Empty list is different to None. None means ' do not |
65 | 65 |
mention it', empty list means 'automatically get an ip' |
... | ... | |
231 | 231 |
r = self.networks_post(json_data=req, success=201) |
232 | 232 |
return r.json['network'] |
233 | 233 |
|
234 |
def list_ports(self, detail=None): |
|
235 |
path = path4url('ports', 'detail' if detail else '') |
|
236 |
r = self.get(path, success=200) |
|
237 |
return r.json['ports'] |
|
238 |
|
|
234 | 239 |
def create_port( |
235 | 240 |
self, network_id, |
236 | 241 |
device_id=None, security_groups=None, name=None, fixed_ips=None): |
Also available in: Unified diff