Skip to content

Openstack Security Groups

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/openstack-security-groups/ List Openstack Security Groups
GET /api/openstack-security-groups/{uuid}/ Retrieve
POST /api/openstack-security-groups/{uuid}/pull/ Synchronize resource state
POST /api/openstack-security-groups/{uuid}/unlink/ Unlink resource
PUT /api/openstack-security-groups/{uuid}/ Update
PATCH /api/openstack-security-groups/{uuid}/ Partial Update
DELETE /api/openstack-security-groups/{uuid}/ Delete
Other Actions
POST /api/openstack-security-groups/{uuid}/set_rules/ Update security group rules

Core CRUD

List Openstack Security Groups

1
2
3
4
http \
  GET \
  https://api.example.com/api/openstack-security-groups/ \
  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_security_groups import openstack_security_groups_list # (1)

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

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

try {
  const response = await openstackSecurityGroupsList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
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
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)
query string Search by name or description
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
tenant string (uri)
tenant_name string
tenant_uuid string (uuid)
rules array of objects
rules.ethertype any IP protocol version - either 'IPv4' or 'IPv6'
rules.direction any Traffic direction - either 'ingress' (incoming) or 'egress' (outgoing)
rules.protocol any The network protocol (TCP, UDP, ICMP, or empty for any protocol)
rules.from_port integer Starting port number in the range (1-65535)
rules.to_port integer Ending port number in the range (1-65535)
rules.cidr string CIDR notation for the source/destination network address range
rules.description string
rules.remote_group_name string
rules.remote_group_uuid string (uuid)
rules.id integer
rules.remote_group string (uri) Remote security group that this rule references, if any
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-security-groups/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_security_groups import openstack_security_groups_retrieve # (1)

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

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

try {
  const response = await openstackSecurityGroupsRetrieve({
  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
tenant string (uri)
tenant_name string
tenant_uuid string (uuid)
rules array of objects
rules.ethertype any IP protocol version - either 'IPv4' or 'IPv6'
rules.direction any Traffic direction - either 'ingress' (incoming) or 'egress' (outgoing)
rules.protocol any The network protocol (TCP, UDP, ICMP, or empty for any protocol)
rules.from_port integer Starting port number in the range (1-65535)
rules.to_port integer Ending port number in the range (1-65535)
rules.cidr string CIDR notation for the source/destination network address range
rules.description string
rules.remote_group_name string
rules.remote_group_uuid string (uuid)
rules.id integer
rules.remote_group string (uri) Remote security group that this rule references, if any
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-security-groups/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_security_groups import openstack_security_groups_pull # (1)

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

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

try {
  const response = await openstackSecurityGroupsPull({
  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-security-groups/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_security_groups import openstack_security_groups_unlink # (1)

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

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

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

1
2
3
4
5
http \
  PUT \
  https://api.example.com/api/openstack-security-groups/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-openstack-security-group"
 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_security_group_update_request import OpenStackSecurityGroupUpdateRequest # (1)
from waldur_api_client.api.openstack_security_groups import openstack_security_groups_update # (2)

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

body_data = OpenStackSecurityGroupUpdateRequest(
    name="my-awesome-openstack-security-group"
)
response = openstack_security_groups_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

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

try {
  const response = await openstackSecurityGroupsUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "name": "my-awesome-openstack-security-group"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
name string
description string

200 -

Field Type
name string
description string

Partial Update

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/openstack-security-groups/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  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.patched_open_stack_security_group_update_request import PatchedOpenStackSecurityGroupUpdateRequest # (1)
from waldur_api_client.api.openstack_security_groups import openstack_security_groups_partial_update # (2)

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

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

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

try {
  const response = await openstackSecurityGroupsPartialUpdate({
  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
name string
description string

200 -

Field Type
name string
description string

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/openstack-security-groups/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_security_groups import openstack_security_groups_destroy # (1)

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

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

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

Update security group rules

Update security group rules

1
2
3
4
echo '[{"ethertype": null, "direction": null, "protocol": null, "from_port": 8080, "to_port": 8080, "cidr": "192.168.1.0/24", "description": "A sample description.", "remote_group": "https://api.example.com/api/remote-group/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"}]' | http \
  POST \
  https://api.example.com/api/openstack-security-groups/a1b2c3d4-e5f6-7890-abcd-ef1234567890/set_rules/ \
  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_security_groups import openstack_security_groups_set_rules # (1)

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

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

try {
  const response = await openstackSecurityGroupsSetRules({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: [{"ethertype": null, "direction": null, "protocol": null, "from_port": 8080, "to_port": 8080, "cidr": "192.168.1.0/24", "description": "A sample description.", "remote_group": "https://api.example.com/api/remote-group/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"}]
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

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

Field Type Required Description
ethertype any IP protocol version - either 'IPv4' or 'IPv6'
Constraints: default: IPv4
direction any Traffic direction - either 'ingress' (incoming) or 'egress' (outgoing)
Constraints: default: ingress
protocol any The network protocol (TCP, UDP, ICMP, or empty for any protocol)
from_port integer Starting port number in the range (1-65535)
to_port integer Ending port number in the range (1-65535)
cidr string CIDR notation for the source/destination network address range
description string
remote_group string (uri) Remote security group that this rule references, if any

200 - No response body