Client side of the heat engine RPC API.
heat.rpc.client.EngineClient[source]¶Bases: object
Client side of the heat engine rpc API.
API version history:
1.0 - Initial version.
1.1 - Add support_status argument to list_resource_types()
1.4 - Add support for service list
1.9 - Add template_type option to generate_template()
1.10 - Add support for software config list
1.11 - Add support for template versions list
1.12 - Add with_detail option for stack resources list
1.13 - Add support for template functions list
1.14 - Add cancel_with_rollback option to stack_cancel_update
1.15 - Add preview_update_stack() call
1.16 - Adds version, type_name to list_resource_types()
1.17 - Add files to validate_template
1.18 - Add show_nested to validate_template
1.19 - Add show_output and list_outputs for returning stack outputs
1.20 - Add resolve_outputs to stack show
1.21 - Add deployment_id to create_software_deployment
1.22 - Add support for stack export
1.23 - Add environment_files to create/update/preview/validate
1.24 - Adds ignorable_errors to validate_template
1.25 - list_stack_resource filter update
1.26 - Add mark_unhealthy
1.27 - Add check_software_deployment
1.28 - Add get_environment call
1.29 - Add template_id to create_stack/update_stack
1.30 - Add possibility to resource_type_* return descriptions
1.31 - Add nested_depth to list_events, when nested_depth is specified
add root_stack_id to response
1.32 - Add get_files call
1.33 - Remove tenant_safe from list_stacks, count_stacks
and list_software_configs
1.34 - Add migrate_convergence_1 call
1.35 - Add with_condition to list_template_functions
1.36 - Add files_container to create/update/preview/validate
BASE_RPC_API_VERSION = '1.0'¶abandon_stack(ctxt, stack_identity)[source]¶Deletes a given stack but resources would not be deleted.
| Parameters: |
|
|---|
authenticated_to_backend(ctxt)[source]¶Validate the credentials in the RPC context.
Verify that the credentials in the RPC context are valid for the current cloud backend.
| Parameters: | ctxt – RPC context. |
|---|
count_stacks(ctxt, filters=None, show_deleted=False, show_nested=False, show_hidden=False, tags=None, tags_any=None, not_tags=None, not_tags_any=None)[source]¶Returns the number of stacks that match the given filters.
| Parameters: |
|
|---|---|
| Returns: | an integer representing the number of matched stacks |
create_software_deployment(cnxt, server_id, config_id=None, input_values=None, action='INIT', status='COMPLETE', status_reason='', stack_user_project_id=None, deployment_id=None)[source]¶create_stack(ctxt, stack_name, template, params, files, args, environment_files=None, files_container=None)[source]¶Creates a new stack using the template provided.
Note that at this stage the template has already been fetched from the heat-api process if using a template-url.
| Parameters: |
|
|---|
delete_stack(ctxt, stack_identity, cast=False)[source]¶Deletes a given stack.
| Parameters: |
|
|---|
You probably never want to use cast(). If you do, you’ll never hear about any exceptions the call might raise.
describe_stack_resource(ctxt, stack_identity, resource_name, with_attr=False)[source]¶Get detailed resource information about a particular resource.
| Parameters: |
|
|---|
describe_stack_resources(ctxt, stack_identity, resource_name)[source]¶Get detailed resource information about one or more resources.
| Parameters: |
|
|---|
export_stack(ctxt, stack_identity)[source]¶Exports the stack data in JSON format.
| Parameters: |
|
|---|
find_physical_resource(ctxt, physical_resource_id)[source]¶Return an identifier for the resource.
| Parameters: |
|
|---|
generate_template(ctxt, type_name, template_type='cfn')[source]¶Generate a template based on the specified type.
| Parameters: |
|
|---|
get_environment(context, stack_identity)[source]¶Returns the environment for an existing stack.
| Parameters: |
|
|---|---|
| Return type: | dict |
get_files(context, stack_identity)[source]¶Returns the files for an existing stack.
| Parameters: |
|
|---|---|
| Return type: | dict |
get_template(ctxt, stack_identity)[source]¶Get the template.
| Parameters: |
|
|---|
identify_stack(ctxt, stack_name)[source]¶Returns the full stack identifier for a single, live stack.
| Parameters: |
|
|---|
ignore_error_by_name(name)[source]¶Returns a context manager that filters exceptions with a given name.
| Parameters: | name – Name to compare the local exception name to. |
|---|
ignore_error_named(error, name)[source]¶Raises the error unless its local name matches the supplied name.
| Parameters: |
|
|---|
list_events(ctxt, stack_identity, filters=None, limit=None, marker=None, sort_keys=None, sort_dir=None, nested_depth=None)[source]¶Lists all events associated with a given stack.
It supports pagination (limit and marker),
sorting (sort_keys and sort_dir) and filtering(filters)
of the results.
| Parameters: |
|
|---|
list_resource_types(ctxt, support_status=None, type_name=None, heat_version=None, with_description=False)[source]¶Get a list of valid resource types.
| Parameters: |
|
|---|
list_stack_resources(ctxt, stack_identity, nested_depth=0, with_detail=False, filters=None)[source]¶List the resources belonging to a stack.
| Parameters: |
|
|---|
list_stacks(ctxt, limit=None, marker=None, sort_keys=None, sort_dir=None, filters=None, show_deleted=False, show_nested=False, show_hidden=False, tags=None, tags_any=None, not_tags=None, not_tags_any=None)[source]¶Returns attributes of all stacks.
It supports pagination (limit and marker), sorting
(sort_keys and sort_dir) and filtering (filters) of the
results.
| Parameters: |
|
|---|---|
| Returns: | a list of stacks |
list_template_functions(ctxt, template_version, with_condition=False)[source]¶Get a list of available functions in a given template type.
| Parameters: |
|
|---|
list_template_versions(ctxt)[source]¶Get a list of available template versions.
| Parameters: | ctxt – RPC context. |
|---|
local_error_name(error)[source]¶Returns the name of the error with any _Remote postfix removed.
| Parameters: | error – Remote raised error to derive the name from. |
|---|
migrate_convergence_1(ctxt, stack_id)[source]¶Migrate the stack to convergence engine
| Parameters: |
|
|---|
preview_stack(ctxt, stack_name, template, params, files, args, environment_files=None, files_container=None)[source]¶Simulates a new stack using the provided template.
Note that at this stage the template has already been fetched from the heat-api process if using a template-url.
| Parameters: |
|
|---|
preview_update_stack(ctxt, stack_identity, template, params, files, args, environment_files=None, files_container=None)[source]¶Returns the resources that would be changed in an update.
Based on the provided template and parameters.
Requires RPC version 1.15 or above.
| Parameters: |
|
|---|
resource_mark_unhealthy(ctxt, stack_identity, resource_name, mark_unhealthy, resource_status_reason=None)[source]¶Mark the resource as unhealthy or healthy.
| Parameters: |
|
|---|
resource_schema(ctxt, type_name, with_description=False)[source]¶Get the schema for a resource type.
| Parameters: |
|
|---|
resource_signal(ctxt, stack_identity, resource_name, details, sync_call=False)[source]¶Generate an alarm on the resource.
| Parameters: |
|
|---|
show_stack(ctxt, stack_identity, resolve_outputs=True)[source]¶Returns detailed information about one or all stacks.
| Parameters: |
|
|---|
update_software_deployment(cnxt, deployment_id, config_id=None, input_values=None, output_values=None, action=None, status=None, status_reason=None, updated_at=None)[source]¶update_stack(ctxt, stack_identity, template, params, files, args, environment_files=None, files_container=None)[source]¶Updates an existing stack based on the provided template and params.
Note that at this stage the template has already been fetched from the heat-api process if using a template-url.
| Parameters: |
|
|---|
validate_template(ctxt, template, params=None, files=None, environment_files=None, files_container=None, show_nested=False, ignorable_errors=None)[source]¶Uses the stack parser to check the validity of a template.
| Parameters: |
|
|---|
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.