Revision d1bced10 kamaki/clients/network/__init__.py
b/kamaki/clients/network/__init__.py | ||
---|---|---|
321 | 321 |
r = self.ports_put(port_id, json_data=dict(port=port), success=201) |
322 | 322 |
return r.json['port'] |
323 | 323 |
|
324 |
def list_floatingip(self): |
|
324 |
def list_floatingips(self):
|
|
325 | 325 |
r = self.floatingips_get(success=200) |
326 | 326 |
return r['floatingips'] |
327 | 327 |
|
... | ... | |
333 | 333 |
self, floating_network_id, |
334 | 334 |
floating_ip_address='', port_id='', fixed_ip_address=''): |
335 | 335 |
floatingip = dict(floating_network_id=floating_network_id) |
336 |
if floating_ip_address != '':
|
|
336 |
if floating_ip_address: |
|
337 | 337 |
floatingip['floating_ip_address'] = floating_ip_address |
338 |
if port_id != '':
|
|
338 |
if port_id: |
|
339 | 339 |
floatingip['port_id'] = port_id |
340 |
if fixed_ip_address != '':
|
|
340 |
if fixed_ip_address: |
|
341 | 341 |
floatingip['fixed_ip_address'] = fixed_ip_address |
342 | 342 |
r = self.floatingips_post( |
343 | 343 |
json_data=dict(floatingip=floatingip), success=201) |
Also available in: Unified diff