Revision 77d1b504 kamaki/clients/compute/rest_api.py

b/kamaki/clients/compute/rest_api.py
241 241
    def floating_ip_pools_get(self, tenant_id, success=200, **kwargs):
242 242
        path = path4url(tenant_id, 'os-floating-ip-pools')
243 243
        return self.get(path, success=success, **kwargs)
244

  
245
    def floating_ips_get(self, tenant_id, success=200, **kwargs):
246
        path = path4url(tenant_id, 'os-floating-ips')
247
        return self.get(path, success=success, **kwargs)
248

  
249
    def floating_ips_post(self, tenant_id, json_data, success=201, **kwargs):
250
        path = path4url(tenant_id, 'os-floating-ips')
251
        if json_data is not None:
252
            json_data = json.dumps(json_data)
253
            self.set_header('Content-Type', 'application/json')
254
            self.set_header('Content-Length', len(json_data))
255
        return self.post(path, data=json_data, success=success, **kwargs)
256

  
257
    def floating_ip_get(self, tenant_id, success=200, **kwargs):
258
        path = path4url(tenant_id, 'os-floating-ip')
259
        return self.get(path, success=success, **kwargs)
260

  
261
    def floating_ip_delete(self, tenant_id, success=204, **kwargs):
262
        path = path4url(tenant_id, 'os-floating-ip')
263
        return self.delete(path, success=success, **kwargs)

Also available in: Unified diff