Openstack Tenants
Operations Summary
Core CRUD
List Openstack Tenants
Retrieve
Create
HTTPie Python TypeScript Request Body (required) Responses
http \
POST \
https://api.example.com/api/openstack-tenants/ \
Authorization:"Token YOUR_API_TOKEN" \
name = "my-awesome-openstack-tenant" \
service_settings = "https://api.example.com/api/service-settings/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" \
project = "https://api.example.com/api/project/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.open_stack_tenant_request import OpenStackTenantRequest # (1)
from waldur_api_client.api.openstack_tenants import openstack_tenants_create # (2)
client = AuthenticatedClient (
base_url = "https://api.example.com" , token = "YOUR_API_TOKEN"
)
body_data = OpenStackTenantRequest (
name = "my-awesome-openstack-tenant" ,
service_settings = "https://api.example.com/api/service-settings/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" ,
project = "https://api.example.com/api/project/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
)
response = openstack_tenants_create . sync (
client = client ,
body = body_data
)
print ( response )
Model Source: OpenStackTenantRequest
API Source: openstack_tenants_create
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 import { openstackTenantsCreate } from 'waldur-js-client' ;
try {
const response = await openstackTenantsCreate ({
auth : "Token YOUR_API_TOKEN" ,
body : {
"name" : "my-awesome-openstack-tenant" ,
"service_settings" : "https://api.example.com/api/service-settings/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" ,
"project" : "https://api.example.com/api/project/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
}
});
console . log ( 'Success:' , response );
} catch ( error ) {
console . error ( 'Error:' , error );
}
Field
Type
Required
Description
name
string
✓
description
string
service_settings
string (uri)
✓
project
string (uri)
✓
availability_zone
string
Optional availability group. Will be used for all instances provisioned in this tenant
user_username
string
Username of the tenant user
user_password
string
Password of the tenant user
subnet_cidr
string
Constraints: write-only, default: 192.168.42.0/24
default_volume_type_name
string
Volume type name to use when creating volumes.
201 -
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
ID of tenant in the OpenStack backend
access_url
string
availability_zone
string
Optional availability group. Will be used for all instances provisioned in this tenant
internal_network_id
string
ID of internal network in OpenStack tenant
external_network_id
string
ID of external network connected to OpenStack tenant
user_username
string
Username of the tenant user
user_password
string
Password of the tenant user
quotas
array of objects
quotas.name
string
quotas.usage
integer
quotas.limit
integer
default_volume_type_name
string
Volume type name to use when creating volumes.
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.
Unlink resource
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.
Update
HTTPie Python TypeScript Path Parameters Request Body (required) Responses
http \
PUT \
https://api.example.com/api/openstack-tenants/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
Authorization:"Token YOUR_API_TOKEN" \
name = "my-awesome-openstack-tenant" \
service_settings = "https://api.example.com/api/service-settings/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" \
project = "https://api.example.com/api/project/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.open_stack_tenant_request import OpenStackTenantRequest # (1)
from waldur_api_client.api.openstack_tenants import openstack_tenants_update # (2)
client = AuthenticatedClient (
base_url = "https://api.example.com" , token = "YOUR_API_TOKEN"
)
body_data = OpenStackTenantRequest (
name = "my-awesome-openstack-tenant" ,
service_settings = "https://api.example.com/api/service-settings/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" ,
project = "https://api.example.com/api/project/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
)
response = openstack_tenants_update . sync (
uuid = "a1b2c3d4-e5f6-7890-abcd-ef1234567890" ,
client = client ,
body = body_data
)
print ( response )
Model Source: OpenStackTenantRequest
API Source: openstack_tenants_update
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 import { openstackTenantsUpdate } from 'waldur-js-client' ;
try {
const response = await openstackTenantsUpdate ({
auth : "Token YOUR_API_TOKEN" ,
path : {
"uuid" : "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
body : {
"name" : "my-awesome-openstack-tenant" ,
"service_settings" : "https://api.example.com/api/service-settings/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" ,
"project" : "https://api.example.com/api/project/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
name
string
✓
description
string
service_settings
string (uri)
✓
project
string (uri)
✓
availability_zone
string
Optional availability group. Will be used for all instances provisioned in this tenant
user_username
string
Username of the tenant user
user_password
string
Password of the tenant user
subnet_cidr
string
Constraints: write-only, default: 192.168.42.0/24
default_volume_type_name
string
Volume type name to use when creating volumes.
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
ID of tenant in the OpenStack backend
access_url
string
availability_zone
string
Optional availability group. Will be used for all instances provisioned in this tenant
internal_network_id
string
ID of internal network in OpenStack tenant
external_network_id
string
ID of external network connected to OpenStack tenant
user_username
string
Username of the tenant user
user_password
string
Password of the tenant user
quotas
array of objects
quotas.name
string
quotas.usage
integer
quotas.limit
integer
default_volume_type_name
string
Volume type name to use when creating volumes.
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
Partial Update
Delete
Configuration & Updates
Change password for tenant user
Change password for tenant user
A quota can be set for a particular tenant. Only staff users can do that
A quota can be set for a particular tenant. Only staff users can do that.
In order to set quota submit POST request to /api/openstack-tenants//set_quotas/.
The quota values are propagated to the backend.
The following quotas are supported. All values are expected to be integers:
instances - maximal number of created instances.
ram - maximal size of ram for allocation. In MiB_.
storage - maximal size of storage for allocation. In MiB_.
vcpu - maximal number of virtual cores for allocation.
security_group_count - maximal number of created security groups.
security_group_rule_count - maximal number of created security groups rules.
volumes - maximal number of created volumes.
snapshots - maximal number of created snapshots.
It is possible to update quotas by one or by submitting all the fields in one request.
Waldur will attempt to update the provided quotas. Please note, that if provided quotas are
conflicting with the backend (e.g. requested number of instances is below of the already existing ones),
some quotas might not be applied.
.. _MiB: http://en.wikipedia.org/wiki/Mebibyte
Response code of a successful request is 202 ACCEPTED .
In case tenant is in a non-stable status, the response would be 409 CONFLICT .
In this case REST client is advised to repeat the request after some time.
On successful completion the task will synchronize quotas with the backend.
Sub-Resource Creation
Create floating IP for tenant
Create floating IP for tenant
Create network for tenant
Create network for tenant
HTTPie Python TypeScript Path Parameters Request Body (required) Responses
http \
POST \
https://api.example.com/api/openstack-tenants/a1b2c3d4-e5f6-7890-abcd-ef1234567890/create_network/ \
Authorization:"Token YOUR_API_TOKEN" \
name = "my-awesome-openstack-tenant"
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_network_request import OpenStackNetworkRequest # (1)
from waldur_api_client.api.openstack_tenants import openstack_tenants_create_network # (2)
client = AuthenticatedClient (
base_url = "https://api.example.com" , token = "YOUR_API_TOKEN"
)
body_data = OpenStackNetworkRequest (
name = "my-awesome-openstack-tenant"
)
response = openstack_tenants_create_network . sync (
uuid = "a1b2c3d4-e5f6-7890-abcd-ef1234567890" ,
client = client ,
body = body_data
)
print ( response )
Model Source: OpenStackNetworkRequest
API Source: openstack_tenants_create_network
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 import { openstackTenantsCreateNetwork } from 'waldur-js-client' ;
try {
const response = await openstackTenantsCreateNetwork ({
auth : "Token YOUR_API_TOKEN" ,
path : {
"uuid" : "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
body : {
"name" : "my-awesome-openstack-tenant"
}
});
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
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)
OpenStack tenant this network belongs to
tenant_name
string
tenant_uuid
string (uuid)
is_external
boolean
Defines whether this network is external (public) or internal (private)
type
string
Network type, such as local, flat, vlan, vxlan, or gre
segmentation_id
integer
VLAN ID for VLAN networks or tunnel ID for VXLAN/GRE networks
subnets
array of objects
subnets.uuid
string (uuid)
subnets.name
string
subnets.description
string
subnets.cidr
string
IPv4 network address in CIDR format (e.g. 192.168.0.0/24)
subnets.gateway_ip
any
IP address of the gateway for this subnet
subnets.allocation_pools
array of objects
subnets.allocation_pools.start
any
An IPv4 or IPv6 address.
subnets.allocation_pools.end
any
An IPv4 or IPv6 address.
subnets.ip_version
integer
IP protocol version (4 or 6)
subnets.enable_dhcp
boolean
If True, DHCP service will be enabled on this subnet
mtu
integer
The maximum transmission unit (MTU) value to address fragmentation.
rbac_policies
array of objects
rbac_policies.url
string (uri)
rbac_policies.uuid
string (uuid)
rbac_policies.network
string (uri)
rbac_policies.network_name
string
rbac_policies.target_tenant
string (uri)
rbac_policies.target_tenant_name
string
rbac_policies.backend_id
string
rbac_policies.policy_type
any
Type of access granted - either shared access or external network access
rbac_policies.created
string (date-time)
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
Create security group
HTTPie Python TypeScript Path Parameters Request Body (required) Responses
http \
POST \
https://api.example.com/api/openstack-tenants/a1b2c3d4-e5f6-7890-abcd-ef1234567890/create_security_group/ \
Authorization:"Token YOUR_API_TOKEN" \
name = "my-awesome-openstack-tenant" \
rules:= '[]'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.open_stack_security_group_request import OpenStackSecurityGroupRequest # (1)
from waldur_api_client.api.openstack_tenants import openstack_tenants_create_security_group # (2)
client = AuthenticatedClient (
base_url = "https://api.example.com" , token = "YOUR_API_TOKEN"
)
body_data = OpenStackSecurityGroupRequest (
name = "my-awesome-openstack-tenant" ,
rules = []
)
response = openstack_tenants_create_security_group . sync (
uuid = "a1b2c3d4-e5f6-7890-abcd-ef1234567890" ,
client = client ,
body = body_data
)
print ( response )
Model Source: OpenStackSecurityGroupRequest
API Source: openstack_tenants_create_security_group
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 import { openstackTenantsCreateSecurityGroup } from 'waldur-js-client' ;
try {
const response = await openstackTenantsCreateSecurityGroup ({
auth : "Token YOUR_API_TOKEN" ,
path : {
"uuid" : "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
body : {
"name" : "my-awesome-openstack-tenant" ,
"rules" : []
}
});
console . log ( 'Success:' , response );
} catch ( error ) {
console . error ( 'Error:' , error );
}
Name
Type
Required
uuid
string (uuid)
✓
Field
Type
Required
Description
name
string
✓
description
string
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
string (uri)
Remote security group that this rule references, if any
201 -
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
Create server group
Data & Reporting
Return a list of volumes from backend
Return a list of volumes from backend
Return a list of volumes from backend
Return a list of volumes from backend
Remote Actions & Sync
Trigger job to pull floating IPs from remote VPC
Trigger job to pull floating IPs from remote VPC
It triggers celery job to pull quotas from remote VPC
It triggers celery job to pull quotas from remote VPC
Trigger job to pull security groups from remote VPC
Trigger job to pull security groups from remote VPC
Trigger job to pull server groups from remote VPC
Trigger job to pull server groups from remote VPC