Skip to content

Openstack Floating Ips

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/openstack-floating-ips/ List Openstack Floating Ips
GET /api/openstack-floating-ips/{uuid}/ Retrieve
POST /api/openstack-floating-ips/{uuid}/pull/ Synchronize resource state
POST /api/openstack-floating-ips/{uuid}/unlink/ Unlink resource
POST /api/openstack-floating-ips/{uuid}/update_description/ Update description of the floating IP
DELETE /api/openstack-floating-ips/{uuid}/ Delete
Other Actions
POST /api/openstack-floating-ips/{uuid}/attach_to_port/ Attach floating IP to port
POST /api/openstack-floating-ips/{uuid}/detach_from_port/ Detach floating IP from port

Core CRUD

List Openstack Floating Ips

Status DOWN means that floating IP is not linked to a VM, status ACTIVE means that it is in use.

1
2
3
4
http \
  GET \
  https://api.example.com/api/openstack-floating-ips/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.openstack_floating_ips import openstack_floating_ips_list # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = openstack_floating_ips_list.sync(client=client)

for item in response:
    print(item)
  1. API Source: openstack_floating_ips_list
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { openstackFloatingIpsList } from 'waldur-js-client';

try {
  const response = await openstackFloatingIpsList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
address string
backend_id string
can_manage boolean Can manage
customer string (uuid)
customer_abbreviation string
customer_name string
customer_native_name string
customer_uuid string (uuid)
description string
external_ip string
field array
free boolean
name string
name_exact string
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
project string (uuid)
project_name string
project_uuid string (uuid)
runtime_state string
service_settings_name string
service_settings_uuid string (uuid)
state array
tenant string
tenant_uuid string (uuid)
uuid string (uuid)

200 -

The response body is an array of objects, where each object has the following structure:

Field Type Description
url string (uri)
uuid string (uuid)
name string
description string
service_name string
service_settings string (uri)
service_settings_uuid string (uuid)
service_settings_state string
service_settings_error_message string
project string (uri)
project_name string
project_uuid string (uuid)
customer string (uri)
customer_uuid string (uuid)
customer_name string
customer_native_name string
customer_abbreviation string
error_message string
error_traceback string
resource_type string
state any
created string (date-time)
modified string (date-time)
backend_id string
access_url string
runtime_state string
address any The public IPv4 address of the floating IP
backend_network_id string ID of network in OpenStack where this floating IP is allocated
tenant string (uri) OpenStack tenant this floating IP belongs to
tenant_name string
tenant_uuid string (uuid)
port string (uri)
external_address any Optional address that maps to floating IP's address in external networks
port_fixed_ips array of objects
port_fixed_ips.ip_address any IP address to assign to the port
port_fixed_ips.subnet_id string ID of the subnet in which to assign the IP address
instance_uuid string
instance_name string
instance_url string
marketplace_offering_uuid string
marketplace_offering_name string
marketplace_offering_plugin_options object (free-form)
marketplace_category_uuid string
marketplace_category_name string
marketplace_resource_uuid string
marketplace_plan_uuid string
marketplace_resource_state string
is_usage_based boolean
is_limit_based boolean

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/openstack-floating-ips/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.openstack_floating_ips import openstack_floating_ips_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = openstack_floating_ips_retrieve.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: openstack_floating_ips_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { openstackFloatingIpsRetrieve } from 'waldur-js-client';

try {
  const response = await openstackFloatingIpsRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Name Type
field array

200 -

Field Type Description
url string (uri)
uuid string (uuid)
name string
description string
service_name string
service_settings string (uri)
service_settings_uuid string (uuid)
service_settings_state string
service_settings_error_message string
project string (uri)
project_name string
project_uuid string (uuid)
customer string (uri)
customer_uuid string (uuid)
customer_name string
customer_native_name string
customer_abbreviation string
error_message string
error_traceback string
resource_type string
state any
created string (date-time)
modified string (date-time)
backend_id string
access_url string
runtime_state string
address any The public IPv4 address of the floating IP
backend_network_id string ID of network in OpenStack where this floating IP is allocated
tenant string (uri) OpenStack tenant this floating IP belongs to
tenant_name string
tenant_uuid string (uuid)
port string (uri)
external_address any Optional address that maps to floating IP's address in external networks
port_fixed_ips array of objects
port_fixed_ips.ip_address any IP address to assign to the port
port_fixed_ips.subnet_id string ID of the subnet in which to assign the IP address
instance_uuid string
instance_name string
instance_url string
marketplace_offering_uuid string
marketplace_offering_name string
marketplace_offering_plugin_options object (free-form)
marketplace_category_uuid string
marketplace_category_name string
marketplace_resource_uuid string
marketplace_plan_uuid string
marketplace_resource_state string
is_usage_based boolean
is_limit_based boolean

Synchronize resource state

Schedule an asynchronous pull operation to synchronize resource state from the backend. Returns 202 if the pull was scheduled successfully, or 409 if the pull operation is not implemented for this resource type.

1
2
3
4
http \
  POST \
  https://api.example.com/api/openstack-floating-ips/a1b2c3d4-e5f6-7890-abcd-ef1234567890/pull/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.openstack_floating_ips import openstack_floating_ips_pull # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = openstack_floating_ips_pull.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: openstack_floating_ips_pull
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { openstackFloatingIpsPull } from 'waldur-js-client';

try {
  const response = await openstackFloatingIpsPull({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

202 - No response body


409 - No response body


Delete resource from the database without scheduling operations on backend and without checking current state of the resource. It is intended to be used for removing resource stuck in transitioning state.

1
2
3
4
http \
  POST \
  https://api.example.com/api/openstack-floating-ips/a1b2c3d4-e5f6-7890-abcd-ef1234567890/unlink/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.openstack_floating_ips import openstack_floating_ips_unlink # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = openstack_floating_ips_unlink.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: openstack_floating_ips_unlink
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { openstackFloatingIpsUnlink } from 'waldur-js-client';

try {
  const response = await openstackFloatingIpsUnlink({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

204 - No response body


Update description of the floating IP

Update description of the floating IP

1
2
3
4
http \
  POST \
  https://api.example.com/api/openstack-floating-ips/a1b2c3d4-e5f6-7890-abcd-ef1234567890/update_description/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.open_stack_floating_ip_description_update_request import OpenStackFloatingIPDescriptionUpdateRequest # (1)
from waldur_api_client.api.openstack_floating_ips import openstack_floating_ips_update_description # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = OpenStackFloatingIPDescriptionUpdateRequest()
response = openstack_floating_ips_update_description.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: OpenStackFloatingIPDescriptionUpdateRequest
  2. API Source: openstack_floating_ips_update_description
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { openstackFloatingIpsUpdateDescription } from 'waldur-js-client';

try {
  const response = await openstackFloatingIpsUpdateDescription({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required Description
description string New floating IP description.

200 - No response body


Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/openstack-floating-ips/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.openstack_floating_ips import openstack_floating_ips_destroy # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = openstack_floating_ips_destroy.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: openstack_floating_ips_destroy
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { openstackFloatingIpsDestroy } from 'waldur-js-client';

try {
  const response = await openstackFloatingIpsDestroy({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

204 - No response body


Other Actions

Attach floating IP to port

Attach floating IP to port

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/openstack-floating-ips/a1b2c3d4-e5f6-7890-abcd-ef1234567890/attach_to_port/ \
  Authorization:"Token YOUR_API_TOKEN" \
  port="https://api.example.com/api/port/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.open_stack_floating_ip_attach_request import OpenStackFloatingIPAttachRequest # (1)
from waldur_api_client.api.openstack_floating_ips import openstack_floating_ips_attach_to_port # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = OpenStackFloatingIPAttachRequest(
    port="https://api.example.com/api/port/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
)
response = openstack_floating_ips_attach_to_port.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: OpenStackFloatingIPAttachRequest
  2. API Source: openstack_floating_ips_attach_to_port
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
import { openstackFloatingIpsAttachToPort } from 'waldur-js-client';

try {
  const response = await openstackFloatingIpsAttachToPort({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "port": "https://api.example.com/api/port/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
port string (uri)

200 - No response body


Detach floating IP from port

Detach floating IP from port

1
2
3
4
http \
  POST \
  https://api.example.com/api/openstack-floating-ips/a1b2c3d4-e5f6-7890-abcd-ef1234567890/detach_from_port/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.openstack_floating_ips import openstack_floating_ips_detach_from_port # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = openstack_floating_ips_detach_from_port.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: openstack_floating_ips_detach_from_port
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { openstackFloatingIpsDetachFromPort } from 'waldur-js-client';

try {
  const response = await openstackFloatingIpsDetachFromPort({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 - No response body