Skip to content

Openstack Routers

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/openstack-routers/ List Openstack Routers
GET /api/openstack-routers/{uuid}/ Retrieve
POST /api/openstack-routers/ Create
DELETE /api/openstack-routers/{uuid}/ Delete
Other Actions
POST /api/openstack-routers/{uuid}/add_router_interface/ Add interface to router. Either subnet or port must be provided
POST /api/openstack-routers/{uuid}/remove_router_interface/ Remove interface from router. Either subnet or port must be provided
POST /api/openstack-routers/{uuid}/set_routes/ Set routes

Core CRUD

List Openstack Routers

1
2
3
4
http \
  GET \
  https://api.example.com/api/openstack-routers/ \
  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_routers import openstack_routers_list # (1)

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

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

try {
  const response = await openstackRoutersList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
field array
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.
tenant string
tenant_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 Router ID in OpenStack
access_url string
tenant string (uri) OpenStack tenant this router belongs to
tenant_name string
tenant_uuid string (uuid)
routes array of objects
routes.destination string
routes.nexthop any An IPv4 or IPv6 address.
fixed_ips array of objects
fixed_ips.ip_address any IP address to assign to the port
fixed_ips.subnet_id string ID of the subnet in which to assign the IP address
ports array of objects
ports.url string (uri)
ports.fixed_ips array of objects
ports.fixed_ips.ip_address any IP address to assign to the port
ports.fixed_ips.subnet_id string ID of the subnet in which to assign the IP address
ports.mac_address string MAC address of the port
ports.subnet string (uri) Subnet to which this port belongs
ports.subnet_uuid string (uuid)
ports.subnet_name string
ports.subnet_description string
ports.subnet_cidr string IPv4 network address in CIDR format (e.g. 192.168.0.0/24)
ports.allowed_address_pairs array of objects
ports.allowed_address_pairs.mac_address string
ports.device_id string ID of device (instance, router etc) to which this port is connected
ports.device_owner string Entity that uses this port (e.g. network:router_interface)
ports.security_groups array of objects
ports.security_groups.url string (uri)
ports.security_groups.uuid string (uuid)
ports.security_groups.name string
ports.security_groups.description string
ports.security_groups.service_name string
ports.security_groups.service_settings string (uri)
ports.security_groups.service_settings_uuid string (uuid)
ports.security_groups.service_settings_state string
ports.security_groups.service_settings_error_message string
ports.security_groups.project string (uri)
ports.security_groups.project_name string
ports.security_groups.project_uuid string (uuid)
ports.security_groups.customer string (uri)
ports.security_groups.customer_uuid string (uuid)
ports.security_groups.customer_name string
ports.security_groups.customer_native_name string
ports.security_groups.customer_abbreviation string
ports.security_groups.error_message string
ports.security_groups.error_traceback string
ports.security_groups.resource_type string
ports.security_groups.state any
ports.security_groups.created string (date-time)
ports.security_groups.modified string (date-time)
ports.security_groups.backend_id string
ports.security_groups.access_url string
ports.security_groups.tenant string (uri)
ports.security_groups.tenant_name string
ports.security_groups.tenant_uuid string (uuid)
ports.security_groups.rules array of objects
ports.security_groups.rules.ethertype any IP protocol version - either 'IPv4' or 'IPv6'
ports.security_groups.rules.direction any Traffic direction - either 'ingress' (incoming) or 'egress' (outgoing)
ports.security_groups.rules.protocol any The network protocol (TCP, UDP, ICMP, or empty for any protocol)
ports.security_groups.rules.from_port integer Starting port number in the range (1-65535)
ports.security_groups.rules.to_port integer Ending port number in the range (1-65535)
ports.security_groups.rules.cidr string CIDR notation for the source/destination network address range
ports.security_groups.rules.description string
ports.security_groups.rules.remote_group_name string
ports.security_groups.rules.remote_group_uuid string (uuid)
ports.security_groups.rules.id integer
ports.security_groups.rules.remote_group string (uri) Remote security group that this rule references, if any
ports.security_groups.marketplace_offering_uuid string
ports.security_groups.marketplace_offering_name string
ports.security_groups.marketplace_offering_plugin_options object (free-form)
ports.security_groups.marketplace_category_uuid string
ports.security_groups.marketplace_category_name string
ports.security_groups.marketplace_resource_uuid string
ports.security_groups.marketplace_plan_uuid string
ports.security_groups.marketplace_resource_state string
ports.security_groups.is_usage_based boolean
ports.security_groups.is_limit_based boolean
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
offering_external_ips array of strings

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/openstack-routers/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_routers import openstack_routers_retrieve # (1)

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

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

try {
  const response = await openstackRoutersRetrieve({
  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 Router ID in OpenStack
access_url string
tenant string (uri) OpenStack tenant this router belongs to
tenant_name string
tenant_uuid string (uuid)
routes array of objects
routes.destination string
routes.nexthop any An IPv4 or IPv6 address.
fixed_ips array of objects
fixed_ips.ip_address any IP address to assign to the port
fixed_ips.subnet_id string ID of the subnet in which to assign the IP address
ports array of objects
ports.url string (uri)
ports.fixed_ips array of objects
ports.fixed_ips.ip_address any IP address to assign to the port
ports.fixed_ips.subnet_id string ID of the subnet in which to assign the IP address
ports.mac_address string MAC address of the port
ports.subnet string (uri) Subnet to which this port belongs
ports.subnet_uuid string (uuid)
ports.subnet_name string
ports.subnet_description string
ports.subnet_cidr string IPv4 network address in CIDR format (e.g. 192.168.0.0/24)
ports.allowed_address_pairs array of objects
ports.allowed_address_pairs.mac_address string
ports.device_id string ID of device (instance, router etc) to which this port is connected
ports.device_owner string Entity that uses this port (e.g. network:router_interface)
ports.security_groups array of objects
ports.security_groups.url string (uri)
ports.security_groups.uuid string (uuid)
ports.security_groups.name string
ports.security_groups.description string
ports.security_groups.service_name string
ports.security_groups.service_settings string (uri)
ports.security_groups.service_settings_uuid string (uuid)
ports.security_groups.service_settings_state string
ports.security_groups.service_settings_error_message string
ports.security_groups.project string (uri)
ports.security_groups.project_name string
ports.security_groups.project_uuid string (uuid)
ports.security_groups.customer string (uri)
ports.security_groups.customer_uuid string (uuid)
ports.security_groups.customer_name string
ports.security_groups.customer_native_name string
ports.security_groups.customer_abbreviation string
ports.security_groups.error_message string
ports.security_groups.error_traceback string
ports.security_groups.resource_type string
ports.security_groups.state any
ports.security_groups.created string (date-time)
ports.security_groups.modified string (date-time)
ports.security_groups.backend_id string
ports.security_groups.access_url string
ports.security_groups.tenant string (uri)
ports.security_groups.tenant_name string
ports.security_groups.tenant_uuid string (uuid)
ports.security_groups.rules array of objects
ports.security_groups.rules.ethertype any IP protocol version - either 'IPv4' or 'IPv6'
ports.security_groups.rules.direction any Traffic direction - either 'ingress' (incoming) or 'egress' (outgoing)
ports.security_groups.rules.protocol any The network protocol (TCP, UDP, ICMP, or empty for any protocol)
ports.security_groups.rules.from_port integer Starting port number in the range (1-65535)
ports.security_groups.rules.to_port integer Ending port number in the range (1-65535)
ports.security_groups.rules.cidr string CIDR notation for the source/destination network address range
ports.security_groups.rules.description string
ports.security_groups.rules.remote_group_name string
ports.security_groups.rules.remote_group_uuid string (uuid)
ports.security_groups.rules.id integer
ports.security_groups.rules.remote_group string (uri) Remote security group that this rule references, if any
ports.security_groups.marketplace_offering_uuid string
ports.security_groups.marketplace_offering_name string
ports.security_groups.marketplace_offering_plugin_options object (free-form)
ports.security_groups.marketplace_category_uuid string
ports.security_groups.marketplace_category_name string
ports.security_groups.marketplace_resource_uuid string
ports.security_groups.marketplace_plan_uuid string
ports.security_groups.marketplace_resource_state string
ports.security_groups.is_usage_based boolean
ports.security_groups.is_limit_based boolean
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
offering_external_ips array of strings

Create

1
2
3
4
5
6
http \
  POST \
  https://api.example.com/api/openstack-routers/ \
  Authorization:"Token YOUR_API_TOKEN" \
  tenant="https://api.example.com/api/tenant/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" \
  name="my-awesome-openstack-router"
 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.create_router_request import CreateRouterRequest # (1)
from waldur_api_client.api.openstack_routers import openstack_routers_create # (2)

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

body_data = CreateRouterRequest(
    tenant="https://api.example.com/api/tenant/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    name="my-awesome-openstack-router"
)
response = openstack_routers_create.sync(
    client=client,
    body=body_data
)

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

try {
  const response = await openstackRoutersCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "tenant": "https://api.example.com/api/tenant/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    "name": "my-awesome-openstack-router"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required Description
tenant string (uri) OpenStack tenant this router belongs to
name string

201 -

Field Type Description
url string (uri)
uuid string (uuid)
tenant string (uri) OpenStack tenant this router belongs to
name string
project string (uri)
service_settings string (uri)

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/openstack-routers/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_routers import openstack_routers_destroy # (1)

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

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

try {
  const response = await openstackRoutersDestroy({
  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

Add interface to router. Either subnet or port must be provided

Add interface to router. Either subnet or port must be provided.

1
2
3
4
http \
  POST \
  https://api.example.com/api/openstack-routers/a1b2c3d4-e5f6-7890-abcd-ef1234567890/add_router_interface/ \
  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_router_interface_request import OpenStackRouterInterfaceRequest # (1)
from waldur_api_client.api.openstack_routers import openstack_routers_add_router_interface # (2)

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

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

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

try {
  const response = await openstackRoutersAddRouterInterface({
  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
subnet string (uri) The subnet to connect to the router. Either subnet or port must be specified, but not both.
port string (uri) The port to connect to the router. Either subnet or port must be specified, but not both.

200 - No response body


Remove interface from router. Either subnet or port must be provided

Remove interface from router. Either subnet or port must be provided.

1
2
3
4
http \
  POST \
  https://api.example.com/api/openstack-routers/a1b2c3d4-e5f6-7890-abcd-ef1234567890/remove_router_interface/ \
  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_router_interface_request import OpenStackRouterInterfaceRequest # (1)
from waldur_api_client.api.openstack_routers import openstack_routers_remove_router_interface # (2)

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

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

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

try {
  const response = await openstackRoutersRemoveRouterInterface({
  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
subnet string (uri) The subnet to connect to the router. Either subnet or port must be specified, but not both.
port string (uri) The port to connect to the router. Either subnet or port must be specified, but not both.

200 - No response body


Set routes

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/openstack-routers/a1b2c3d4-e5f6-7890-abcd-ef1234567890/set_routes/ \
  Authorization:"Token YOUR_API_TOKEN" \
  routes:='[]'
 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_router_set_routes_request import OpenStackRouterSetRoutesRequest # (1)
from waldur_api_client.api.openstack_routers import openstack_routers_set_routes # (2)

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

body_data = OpenStackRouterSetRoutesRequest(
    routes=[]
)
response = openstack_routers_set_routes.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

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

try {
  const response = await openstackRoutersSetRoutes({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "routes": []
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required Description
routes array of objects
routes.destination string
routes.nexthop any An IPv4 or IPv6 address.

200 -

Field Type Description
routes array of objects
routes.destination string
routes.nexthop any An IPv4 or IPv6 address.