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.36'¶abandon_stack
(**kwargs)[source]¶Abandon a given stack.
Parameters: |
|
---|
authenticated_to_backend
(**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
(**kwargs)[source]¶Return the number of stacks that match the given filters.
Parameters: |
|
---|---|
Returns: | an integer representing the number of matched stacks |
create_stack
(**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: |
|
---|
delete_stack
(**kwargs)[source]¶Delete a given stack.
Parameters: |
|
---|
export_stack
(**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
(**kwargs)[source]¶Return an identifier for the specified resource.
Parameters: |
|
---|
generate_template
(**kwargs)[source]¶Generate a template based on the specified type.
Parameters: |
|
---|
get_environment
(**kwargs)[source]¶Returns the environment for an existing stack.
Parameters: |
|
---|---|
Return type: | dict |
get_files
(**kwargs)[source]¶Returns the files for an existing stack.
Parameters: |
|
---|---|
Return type: | dict |
get_template
(**kwargs)[source]¶Get the template.
Parameters: |
|
---|
identify_stack
(**kwargs)[source]¶The full stack identifier for a single, live stack with stack_name.
Parameters: |
|
---|
list_events
(**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
(**kwargs)[source]¶Get a list of stack outputs.
Parameters: |
|
---|---|
Returns: | list of stack outputs in defined format. |
list_resource_types
(**kwargs)[source]¶Get a list of supported resource types.
Parameters: |
|
---|
list_stacks
(**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
(**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
(**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.
reset
(**kwargs)[source]¶Reset service.
Called in case service running in daemon mode receives SIGHUP.
resource_mark_unhealthy
(**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
(**kwargs)[source]¶Return the schema of the specified type.
Parameters: |
|
---|
resource_signal
(**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. |
---|
show_output
(**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
(**kwargs)[source]¶Return detailed information about one or all stacks.
Parameters: |
|
---|
stack_cancel_update
(**kwargs)[source]¶Cancel currently running stack update.
Parameters: |
|
---|
update_stack
(**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
(**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: |
|
---|
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.