Skip to content

Openstack Migrations

Operations Summary

Method Endpoint Description
GET /api/openstack-migrations/ List Openstack Migrations
GET /api/openstack-migrations/{uuid}/ Retrieve
POST /api/openstack-migrations/ Create
PUT /api/openstack-migrations/{uuid}/ Update
PATCH /api/openstack-migrations/{uuid}/ Partial Update
DELETE /api/openstack-migrations/{uuid}/ Delete

List Openstack Migrations

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

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

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

try {
  const response = await openstackMigrationsList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
dst_resource_uuid string (uuid)
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
src_resource_uuid string (uuid)

200 -

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

Field Type
uuid string (uuid)
created string (date-time)
modified string (date-time)
mappings object
mappings.volume_types array of objects
mappings.volume_types.src_type_uuid string (uuid)
mappings.volume_types.dst_type_uuid string (uuid)
mappings.subnets array of objects
mappings.subnets.src_cidr string
mappings.subnets.dst_cidr string
mappings.skip_connection_extnet boolean
mappings.sync_instance_ports boolean
mappings.networks array of string (uuid)s
created_by_uuid string (uuid)
created_by_full_name string
src_offering_uuid string (uuid)
src_offering_name string
dst_offering_uuid string (uuid)
dst_offering_name string
src_resource_uuid string (uuid)
src_resource_name string
dst_resource_uuid string (uuid)
dst_resource_name string
dst_resource_state string
state string
error_message string
error_traceback string

Retrieve

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

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

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

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

Field Type
uuid string (uuid)
created string (date-time)
modified string (date-time)
mappings object
mappings.volume_types array of objects
mappings.volume_types.src_type_uuid string (uuid)
mappings.volume_types.dst_type_uuid string (uuid)
mappings.subnets array of objects
mappings.subnets.src_cidr string
mappings.subnets.dst_cidr string
mappings.skip_connection_extnet boolean
mappings.sync_instance_ports boolean
mappings.networks array of string (uuid)s
created_by_uuid string (uuid)
created_by_full_name string
src_offering_uuid string (uuid)
src_offering_name string
dst_offering_uuid string (uuid)
dst_offering_name string
src_resource_uuid string (uuid)
src_resource_name string
dst_resource_uuid string (uuid)
dst_resource_name string
dst_resource_state string
state string
error_message string
error_traceback string

Create

1
2
3
4
5
6
7
http \
  POST \
  https://api.example.com/api/openstack-migrations/ \
  Authorization:"Token YOUR_API_TOKEN" \
  src_resource="a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  dst_offering="a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  dst_plan="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.migration_create_request import MigrationCreateRequest # (1)
from waldur_api_client.api.openstack_migrations import openstack_migrations_create # (2)

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

body_data = MigrationCreateRequest(
    src_resource="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    dst_offering="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    dst_plan="a1b2c3d4-e5f6-7890-abcd-ef1234567890"
)
response = openstack_migrations_create.sync(
    client=client,
    body=body_data
)

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

try {
  const response = await openstackMigrationsCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "src_resource": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "dst_offering": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "dst_plan": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
name string
description string
mappings object
mappings.volume_types array of objects
mappings.volume_types.src_type_uuid string (uuid)
mappings.volume_types.dst_type_uuid string (uuid)
mappings.subnets array of objects
mappings.subnets.src_cidr string
mappings.subnets.dst_cidr string
mappings.skip_connection_extnet boolean
mappings.sync_instance_ports boolean
mappings.networks array of string (uuid)s
src_resource string (uuid)
dst_offering string (uuid)
dst_plan string (uuid)

201 -

Field Type
mappings object
mappings.volume_types array of objects
mappings.volume_types.src_type_uuid string (uuid)
mappings.volume_types.dst_type_uuid string (uuid)
mappings.subnets array of objects
mappings.subnets.src_cidr string
mappings.subnets.dst_cidr string
mappings.skip_connection_extnet boolean
mappings.sync_instance_ports boolean
mappings.networks array of string (uuid)s
src_resource string (uuid)

Update

1
2
3
4
5
http \
  PUT \
  https://api.example.com/api/openstack-migrations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  mappings:='{}'
 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.migration_details_request import MigrationDetailsRequest # (1)
from waldur_api_client.api.openstack_migrations import openstack_migrations_update # (2)

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

body_data = MigrationDetailsRequest(
    mappings={}
)
response = openstack_migrations_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

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

try {
  const response = await openstackMigrationsUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "mappings": {}
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
mappings object
mappings.volume_types array of objects
mappings.volume_types.src_type_uuid string (uuid)
mappings.volume_types.dst_type_uuid string (uuid)
mappings.subnets array of objects
mappings.subnets.src_cidr string
mappings.subnets.dst_cidr string
mappings.skip_connection_extnet boolean
mappings.sync_instance_ports boolean
mappings.networks array of string (uuid)s
error_message string
error_traceback string

200 -

Field Type
uuid string (uuid)
created string (date-time)
modified string (date-time)
mappings object
mappings.volume_types array of objects
mappings.volume_types.src_type_uuid string (uuid)
mappings.volume_types.dst_type_uuid string (uuid)
mappings.subnets array of objects
mappings.subnets.src_cidr string
mappings.subnets.dst_cidr string
mappings.skip_connection_extnet boolean
mappings.sync_instance_ports boolean
mappings.networks array of string (uuid)s
created_by_uuid string (uuid)
created_by_full_name string
src_offering_uuid string (uuid)
src_offering_name string
dst_offering_uuid string (uuid)
dst_offering_name string
src_resource_uuid string (uuid)
src_resource_name string
dst_resource_uuid string (uuid)
dst_resource_name string
dst_resource_state string
state string
error_message string
error_traceback string

Partial Update

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/openstack-migrations/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_migration_details_request import PatchedMigrationDetailsRequest # (1)
from waldur_api_client.api.openstack_migrations import openstack_migrations_partial_update # (2)

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

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

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

try {
  const response = await openstackMigrationsPartialUpdate({
  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
mappings object
mappings.volume_types array of objects
mappings.volume_types.src_type_uuid string (uuid)
mappings.volume_types.dst_type_uuid string (uuid)
mappings.subnets array of objects
mappings.subnets.src_cidr string
mappings.subnets.dst_cidr string
mappings.skip_connection_extnet boolean
mappings.sync_instance_ports boolean
mappings.networks array of string (uuid)s
error_message string
error_traceback string

200 -

Field Type
uuid string (uuid)
created string (date-time)
modified string (date-time)
mappings object
mappings.volume_types array of objects
mappings.volume_types.src_type_uuid string (uuid)
mappings.volume_types.dst_type_uuid string (uuid)
mappings.subnets array of objects
mappings.subnets.src_cidr string
mappings.subnets.dst_cidr string
mappings.skip_connection_extnet boolean
mappings.sync_instance_ports boolean
mappings.networks array of string (uuid)s
created_by_uuid string (uuid)
created_by_full_name string
src_offering_uuid string (uuid)
src_offering_name string
dst_offering_uuid string (uuid)
dst_offering_name string
src_resource_uuid string (uuid)
src_resource_name string
dst_resource_uuid string (uuid)
dst_resource_name string
dst_resource_state string
state string
error_message string
error_traceback string

Delete

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

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

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

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