heat.engine.service
Module¶heat.engine.service.
EngineListener
(host, engine_id, thread_group_mgr)[source]¶Bases: object
Listen on an AMQP queue named for the engine.
Allows individual engines to communicate with each other for multi-engine support.
ACTIONS
= ('stop_stack', 'send')¶SEND
= 'send'¶STOP_STACK
= 'stop_stack'¶heat.engine.service.
EngineService
(host, topic)[source]¶Bases: oslo_service.service.ServiceBase
Manages the running instances from creation to destruction.
All the methods in here are called from the RPC backend. This is all done dynamically so if a call is made via RPC that does not have a corresponding method here, an exception will be thrown when it attempts to call into this class. Arguments to these methods are also dynamically added and will be named as keyword arguments by the RPC caller.
RPC_API_VERSION
= '1.35'¶abandon_stack
(*args, **kwargs)[source]¶Abandon a given stack.
Parameters: |
|
---|
authenticated_to_backend
(*args, **kwargs)[source]¶Validate the credentials in the RPC context.
Verify that the credentials in the RPC context are valid for the current cloud backend.
count_stacks
(*args, **kwargs)[source]¶Return the number of stacks that match the given filters.
Parameters: |
|
---|---|
Returns: | an integer representing the number of matched stacks |
create_stack
(*args, **kwargs)[source]¶Create 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: |
|
---|
create_watch_data
(*args, **kwargs)[source]¶Creates data for CloudWatch and WaitConditions.
This could be used by CloudWatch and WaitConditions and treat HA service events like any other CloudWatch.
delete_stack
(*args, **kwargs)[source]¶Delete a given stack.
Parameters: |
|
---|
export_stack
(*args, **kwargs)[source]¶Exports the stack data json.
Intended to be used to safely retrieve the stack data before performing the abandon action.
Parameters: |
|
---|
find_physical_resource
(*args, **kwargs)[source]¶Return an identifier for the specified resource.
Parameters: |
|
---|
generate_template
(*args, **kwargs)[source]¶Generate a template based on the specified type.
Parameters: |
|
---|
get_environment
(*args, **kwargs)[source]¶Returns the environment for an existing stack.
Parameters: |
|
---|---|
Return type: | dict |
get_files
(*args, **kwargs)[source]¶Returns the files for an existing stack.
Parameters: |
|
---|---|
Return type: | dict |
get_template
(*args, **kwargs)[source]¶Get the template.
Parameters: |
|
---|
identify_stack
(*args, **kwargs)[source]¶The full stack identifier for a single, live stack with stack_name.
Parameters: |
|
---|
list_events
(*args, **kwargs)[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_outputs
(*args, **kwargs)[source]¶Get a list of stack outputs.
Parameters: |
|
---|---|
Returns: | list of stack outputs in defined format. |
list_resource_types
(*args, **kwargs)[source]¶Get a list of supported resource types.
Parameters: |
|
---|
list_stacks
(*args, **kwargs)[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 formatted stacks |
preview_stack
(*args, **kwargs)[source]¶Simulate 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
(*args, **kwargs)[source]¶Shows the resources that would be updated.
The preview_update_stack method shows the resources that would be changed with an update to an existing stack based on the provided template and parameters. See update_stack for description of parameters.
This method cannot guarantee that an update will have the actions specified because resource plugins can influence changes/replacements at runtime.
Note that at this stage the template has already been fetched from the heat-api process if using a template-url.
resource_mark_unhealthy
(*args, **kwargs)[source]¶Mark the resource as healthy or unhealthy.
Put the resource in CHECK_FAILED state if ‘mark_unhealthy’ is true. Put the resource in CHECK_COMPLETE if ‘mark_unhealthy’ is false and the resource is in CHECK_FAILED state. Otherwise, make no change.
Parameters: |
|
---|
resource_schema
(*args, **kwargs)[source]¶Return the schema of the specified type.
Parameters: |
|
---|
resource_signal
(*args, **kwargs)[source]¶Calls resource’s signal for the specified resource.
Parameters: | sync_call – indicates whether a synchronized call behavior is expected. This is reserved for CFN WaitCondition implementation. |
---|
set_watch_state
(*args, **kwargs)[source]¶Temporarily set the state of a given watch.
Parameters: |
|
---|
show_output
(*args, **kwargs)[source]¶Returns dict with specified output key, value and description.
Parameters: |
|
---|---|
Returns: | dict with output key, value and description in defined format. |
show_stack
(*args, **kwargs)[source]¶Return detailed information about one or all stacks.
Parameters: |
|
---|
show_watch
(*args, **kwargs)[source]¶Return the attributes of one watch/alarm.
Parameters: |
|
---|
show_watch_metric
(*args, **kwargs)[source]¶Return the datapoints for a metric.
Parameters: |
|
---|
stack_cancel_update
(*args, **kwargs)[source]¶Cancel currently running stack update.
Parameters: |
|
---|
update_stack
(*args, **kwargs)[source]¶Update 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
(*args, **kwargs)[source]¶Check the validity of a template.
Checks, so far as we can, that a template is valid, and returns information about the parameters suitable for producing a user interface through which to specify the parameter values.
Parameters: |
|
---|
validation
heat.engine.service.
ThreadGroupManager
[source]¶Bases: object
add_timer
(stack_id, func, *args, **kwargs)[source]¶Define a periodic task in the stack threadgroups.
The task is run in a separate greenthread.
Periodicity is cfg.CONF.periodic_interval
start_with_acquired_lock
(stack, lock, func, *args, **kwargs)[source]¶Run the given method in a sub-thread with an existing stack lock.
Release the provided lock when the thread finishes.
Parameters: |
|
---|
start_with_lock
(cnxt, stack, engine_id, func, *args, **kwargs)[source]¶Run the method in sub-thread after acquiring the stack lock.
Release the lock when the thread finishes.
Parameters: |
|
---|
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.