Commit Graph

59 Commits (bbf29137282769f6c96123fe92babe41ea64e625)

Author SHA1 Message Date
Limor Stotland 0b2b2e8d1a Expose create time in stack resource list:
* This will help with identified when the stack resource was created and when it was updated

   * Unity with the output of stack list

Change-Id: I48bc387ea7e5855fc37d94c0fee12496692a21c1
2015-05-06 05:17:07 +00:00
huangtianhua b44df7a1db Support to generate hot template based on resource type
Currently heat supports to create CFN template based on
the given resource type. And this patch adds an option
to allow user to specify template type to generate(support
HOT template at the same time).

blueprint support-to-generate-hot-templates

Change-Id: I55cfb9b0f87e638350f2f6367fb399d772fff7e1
2015-04-28 16:14:52 +08:00
Jason Dunsmore 3c30bf8727 Add ability to filter stacks by tag
blueprint stack-tags

Change-Id: I4b5bc741fc271cb08ec588ae962573c59286dae5
2015-04-16 12:59:40 -05:00
Jason Dunsmore 8a40be3bf6 Add a "show_hidden" parameter to stack-list API
Passing "show_hidden=True" will result in hidden stacks being shown in
the stack listing.

blueprint stack-tags

Change-Id: I3074282131443c8e3894f9ce9e363a4438f5a11e
2015-04-08 15:24:48 -05:00
Jason Dunsmore 9817ed77ef Database API and engine changes for stack tags
Allow tagging of stacks with simple string tags.

blueprint stack-tags

Change-Id: I65e1e8e87515595edae332c2ff7e0e82ded409ce
2015-04-08 15:23:50 -05:00
Angus Salkeld f19c54dd9a Fix the topic and server that the listener client uses
This was only working for one heat engine as it was sending
the listener messages to a topic of "engine_id".

Change-Id: Ib542d1ebb85b004f5a67213e678882c5a723dc0e
Closes-bug: 1433821
2015-03-24 12:17:40 +10:00
tengqm 69cee431cb Enforce integer API parameter checking
This patch is adding more checking to integer type parameters at the API
layer. It also adds a missing test case for the 'limit' parameter used in
event indexing.

Change-Id: If4588c9b9ded38db99b8727a1cfb5c88d6fa18de
2015-03-09 09:20:44 +08:00
tengqm 157a11550f Utility function for int param checking
This patch adds a utility function for checking the int type parameters
passed to the API layer. A test case is included for this utility
function. To exemplify how to use it, the events controller is revised
to make use of this function. The plan is to add this checking to all
int type parameters at API layer.

Change-Id: If4a1e2e5e7adbc272e2cfa5b1918cdf733926013
2015-03-03 12:55:43 +08:00
Jenkins 3dcfb64244 Merge "Tweaking 'global_tenant' parameter parsing" 2015-02-25 20:27:23 +00:00
tengqm 8eff538a09 Tweaking 'global_tenant' parameter parsing
This patch attempts to make the parsing of 'global_tenant' parameter
align with other parameter parsing, i.e. use param_utils module.

Change-Id: I368b8ced32f0204e5d0f170c8565d6b328d53325
2015-02-25 21:39:16 +08:00
Steve Baker ea349ea48b Move deployment handle_signal to rpc call
This allows deployments which haven't been created by a heat
resource to be signalled, which is required for
blueprint software-config-trigger.

This was reverted due to tripleo regression bug #1423126.
Calling timeutils.normalize_time before saving the date should
prevent the database error which caused the regression.

Partial-Blueprint: software-config-trigger

Change-Id: I6038090ef1e9aff5908dd21e08ba403748f10424
2015-02-25 13:45:20 +13:00
Derek Higgins b387a9f27a Revert "Move deployment handle_signal to rpc call"
This reverts commit a63f634bfb.

This commit caused a regression in tripleo-ci whith a database
"Incorrect datetime value" error.

Change-Id: I55f9be8ffb319edb56371d8d370d58d02bdf3867
Closes-Bug: #1423126
2015-02-18 14:57:40 +00:00
Steve Baker a63f634bfb Move deployment handle_signal to rpc call
This allows deployments which haven't been created by a heat
resource to be signalled, which is required for
Partial-Blueprint: software-config-trigger

Change-Id: Icbf5966426482121ceb726582c85cb88d0200b12
2015-02-12 14:48:42 +13:00
Steve Baker 32f6e8fd5c Expose deployment/config updated_at/created_at
This is useful information for the user, and is also useful to
expose to support blueprint software-config-trigger.


Change-Id: I7ba58f83793fe993b5791cb2011afb9e81462df6
2015-02-12 14:48:42 +13:00
Steve Baker 007ce91c55 Expose stack_user_project_id in stack-show
stack_user_project_id is currently never exposed by heat, so the user
has no way of discovering what it is.

This has a couple of implications:
- The user can't call the REST API create_software_deployment unless
  they know the stack_user_project_id of the stack that the server
  resource belongs to
- user can't do manual cleanup of stack_user_project_id when necessary

This change adds stack_user_project_id to the formatted output of
the stack-show REST API call.

Change-Id: I0a2d337401c164eb58dbce63e01f68f98f8d467e
Closes-Bug: #1413398
2015-01-22 12:29:06 +13:00
huangtianhua c26201c856 Show the creation time for stack snapshots
Creation time for snapshots is an important attribute,
we should return the creation time when doing stack
snapshot actions.

Change-Id: Ieaedaf79bf073737ec41fba2d0252d3f4ddc0fcf
Closes-Bug: #1398307
2014-12-04 15:56:18 +08:00
Ton Ngo b8ba69e05f Pass list of parameters to engine service to reset
For stack-update, a new argument named clear-parameters with
a list is passed in from the CLI and the new PATCH ReST API
to delete the indicated parameters from the existing parameters
in the DB, allowing the default parameters in the template to
be used.  A new method in environment handles the reset.

Partially-implements: blueprint troubleshooting-low-level-control
Partial-Bug: 1224828
Change-Id: Ia1270b679f27e264e6977c590d676b947c74c5da
2014-09-15 17:51:32 -07:00
Ton Ngo b98c19fbbf Pass flag to engine service to patch parameters
For stack-update, add a new PATCH ReST API and a new CLI
argument named existing-parameters to indicate that the set
of parameters should be patched over the existing parameter
from the DB.  A new method in environment handles
the patching.

Partially-implements: blueprint troubleshooting-low-level-control
Partial-Bug: 1224828
Change-Id: I802e0dca44926be3a3f45fcaa995c866a4abf998
2014-09-15 17:47:40 -07:00
Pavlo Shchelokovskyy a75f055caf Add RPC API for cancel update stack
Implements cancelling of stack update in progress, for any stack
regardless of disable_rollback status.

As a side-effect, a framework for sending arbitrary one-time signals from
outside into a task running as greenthread is added. ThreadgroupManager
holds references of greenlet events associated with a given stack now.

Implements blueprint cancel-update-stack (partial)

Change-Id: Ic929d42946cf28eeb2a7caea8bf908f492693c09
2014-09-13 16:53:04 +03:00
Jenkins aeb2b40fb1 Merge "Add "parent" key to list stacks output" 2014-09-02 00:34:06 +00:00
Jenkins a7678807d8 Merge "Add show_nested to list_stacks RPC interface" 2014-08-30 11:16:35 +00:00
Miguel Grinberg 146a154b79 boolean parameter type is not recognized in the API
The boolean type that was added to Heat templates is not recognized
in the API layer. Because of this, the API passes the schema type
(which is lowercase 'boolean') directly to the client, while all
other recognized types are passed with camel case.

Change-Id: I0d31401456c0f5cd0bb81e29323e40b4de66f331
Closes-Bug: 1361448
2014-08-26 22:14:55 +00:00
Steven Hardy f6561ae15d Add "parent" key to list stacks output
Pass back the stack owner_id (parent stack ID) via the RPC API, then
expose it via the "parent" key when listing stacks.  This will be
None for all top-level (non nested) stacks, so can be ignored when
show_nested is not passed.

blueprint: list-nested
Change-Id: I5ad7f867bc7eb138bf2d7d17b4a3bf810d341393
2014-08-21 11:05:05 +01:00
Steven Hardy b4fb37e16b Add show_nested to list_stacks RPC interface
Add a show_nested argument, defaulted to False

blueprint: list-nested
Change-Id: I3468325b3b383bf671391989d91ed384ea158472
2014-08-21 10:15:01 +01:00
Richard Lee 25788a13c2 Display stack owner when formatting stacks
Stacks are launched by users but scoped to tenants, so users in the same
tenant currently have no way to know owns each stack.  The same is
especially true to unscoped stack lists.  Since humans are much better
with names than they are with numbers, this adds the stack owner
username to the data returned with each stack.

Co-Authored-By: Anderson Mesquita <>
Implements: blueprint stack-display-fields
Change-Id: Ia1386531025096e0eeaf9e98b478c4453fc8cb01
2014-08-12 11:06:44 -04:00
Thomas Herve 413fc0b3a6 Add RPC method to snapshot stacks
This adds new methods to snapshot a stack and manipulates snapshots.

blueprint stack-snapshot

Change-Id: Id3dafef3c2c04cd43c3094283dceece26834a5e1
2014-07-31 12:38:13 +02:00
Anderson Mesquita f8e75d072a Allow listing of resources and nested resources
This allows the engine to optionally include resources from nested
stacks in a resource-list up to `depth` levels below.  This number is
limited by `max_nested_stack_depth`.

Implements: blueprint explode-nested-resources
Change-Id: I43a5af25e74c7bfb32260f1616d36b311e0f2631
2014-07-10 18:59:47 -04:00
Jenkins f170f11590 Merge "Adding error message for output description" 2014-06-10 12:00:59 +00:00
George Peristerakis ccb5eebbf1 Added field parameter identifying the custom validation
In the template file a field with custom constrain should
return in the parameter arguments a custom constrain value.

Change-Id: I7df56a840eabb2f8093ea82eb822a764e9267b40
Closes-bug: #1313835
2014-06-03 11:50:49 -04:00
Sergey Kraynev 8530ec7362 Adding error message for output description
All caught exceptions should be displayed in output section.

Change-Id: I217bb52e33c3f0d20c3d01e75326687cc713d90a
Related-Bug: #1273490
2014-06-03 08:01:34 +00:00
Jenkins f671d4e3a6 Merge "API changes for param to show soft-deleted stacks" 2014-05-08 23:15:18 +00:00
Jason Dunsmore ffb918188f API changes for param to show soft-deleted stacks
blueprint stack-list-soft-deleted

Change-Id: I9b56ee877746c25c6acefb91fc3eae63701aedd6
2014-05-01 16:47:13 -05:00
Anderson Mesquita 8844d4413a Add link to a resource's nested stack
When viewing a resource, it's valuable to know whether the resource is a
nested stack with additional resources attached to it.  This change
provides a new 'nested' link in the links section of a resource, which
points to the nested stack.

Co-Authored-By: Richard Lee <>
Implements: blueprint nested-stack-link
Change-Id: Ibc8768d2be8f1dae9a60d3818ae9f56c27bbdc9b
2014-04-07 14:21:46 -05:00
Steve Baker 56b4e61f0c Remove signal_id from deployments API and model
The same information is now available from the deployment's
derived config deploy_signal_id input value.

Other deployment signal transports might not have a single ID
to put in this field so it is better at this stage to remove
it from the deployments model and do anything that is required
using derived config inputs.

partial blueprint hot-software-config

Change-Id: I90c85d0ceb9fd67eed640c84348ef4175a6194b6
2014-03-11 08:21:49 +13:00
Jenkins 8262971810 Merge "Revert "Showing member list for nested resources"" 2014-03-06 17:28:21 +00:00
Sergey Kraynev b57401e502 Revert "Showing member list for nested resources"
This reverts commit 5e883e94d7.

Reverted patch not fully resolve problem that was mentioned in bug
description, since presented in resource show ids are owned nested stack
and it doesn't allow use only resource-show command for displaying
information of these resources.
Also this code affects not only resource group resource, but other
nested resources too. So it leads to displaying some unwanted



Closes-bug: #1280391
Change-Id: Id965e1f872ebf63a510242c7c76a4f105dcb4a17
2014-03-05 14:31:38 -05:00
Jenkins 60caa26e1d Merge "Remove vim header from files." 2014-03-05 16:54:16 +00:00
Jason Dunsmore 97135cbfc0 Remove vim header from files.
Change-Id: Ia6131f8fcac6902c80c80aa805c8cd7a2a41f280
Closes-Bug: #1229324
2014-03-04 08:51:56 -06:00
Tim Schnell 03a8f0e313 Adds Parameter Label to template validate call
This change will add the ability to return the parameter label
with the parameter in the template validate call.

Change-Id: If48db3bf7f25396485f5bc8bb1cc8aeed4f8e7b0
Implements: blueprint add-parameter-label-to-template
2014-03-03 17:02:48 +00:00
Steve Baker 99a8fa9064 RPC method to fetch deployments metadata
This method returns a list of software configs which are currently
deployed to a given server. Each config has the deployment input values
and current action inserted into it. This means that each config is
ephemeral and derived from the canonical config specified in the deployment
resource. The list of configs is sorted by config name. This allows the
template to control what order the configs are returned by setting the
'name' attribute of each deployment resource.

Having a separate RPC (and REST) method for deployment metadata also means
that servers will eventually be able to poll for deployment metadata directly,
avoiding the need to parse the stack for every poll.

partial blueprint hot-software-config-rest

Change-Id: I374f1e15d5255a3ad1264859fd845265cc60f218
2014-02-27 18:54:30 +13:00
Pablo Andres Fuente ee5b3363db New Event uuid column and autoincremental id
Re added the autoincremental id column for the Event table, and added a
new column to store the event uuid. The uuid will be exposed to the user
as the id of the event, but internally the event will be handled using
the value of the id column.

Change-Id: I43464c6079bf7631fda0c4ab112b8f874c6190a3
Closes-Bug: #1261883
2014-02-05 11:15:42 -03:00
Steve Baker d5cb8b461c RPC service for software config/deployment
These RPC service methods are wrappers over the DB API.

Implements: blueprint hot-software-config-rest
Change-Id: I2c2e53f633cca30533b9190ebccc0d6eddcfb21f
2014-02-05 10:30:33 +08:00
Jenkins 04342caaf4 Merge "Showing member list for nested resources" 2014-01-31 08:35:17 +00:00
Thomas Spatzier 009c2a2141 Refactor Parameters Schema based on common Schema
This patch is last in a series of patches to unify the code for
property and parameter validation based on a common Schema class.

The current patch refactors the implementation of the Parameters
Schema to be a sub-class of the common Schema class in
so that most of the schema validation code can be shared for property
and parameter validation and no two different code paths for mostly
indentical functionality exist.

Change-Id: I4a1dc2e65e7b118347933bdf18aba49c058aa28b
Closes-Bug: #1230229
Implements: blueprint schema-code-consolidation
2014-01-27 11:18:52 +01:00
Sergey Kraynev 5e883e94d7 Showing member list for nested resources
New section 'members' was added for nested resource description. This section
contain physical_resource_id of nested stack resources.

Closes-bug: #1249484
Change-Id: Iff5647b92abcd9d6fc3b6e3f3e7379c3f5f95e79
2014-01-24 08:50:03 -05:00
Vijendar Komalla 6ce61eee30 Implement adopt-stack
Create a stack using user specified, already existing external
resources. The user specifies what resources to adopt using the
same serialization format as the one produced by abandon-stack.

Change-Id: I87b6d94780651143cd61fe95ee083e4310ad59c8
Implements: blueprint adopt-stack
2014-01-22 03:28:23 +00:00
Angus Salkeld 4a42070fee Send usage notifications on major stack events
These notifications can then be used for usage/billing/alarming purposes.

Some of the base fields are based on the existing nova fields:

This patch just has the minimum fields needed we can add more as users

We can also add more notifications as we need:
- automated actions (autoscaling, restart)
- time based .exists notifications

implements blueprint send-notification
Change-Id: I63ad5402037799842643eb642af15b54ef8d7483
2013-11-01 14:29:09 +11:00
Liang Chen bef420b980 Rename event logical_resource_id to resource_name
This is to address an unimplemented comment at
Bascically, there is a logical_resource_id/resource_name mismatch to
address, and this patch is trying to resolve that.

Change-Id: Idac696259af30f8db7816499474057c354d73800
2013-08-23 09:27:07 +08:00
Zane Bitter ea83af8836 RPC: Add an RPC call to get a resource type schema
blueprint resource-properties-schema

Change-Id: Id316393d84b6f1112b80caf14ffb98c937597f40
2013-08-12 09:51:45 +02:00
Zane Bitter 53842f7b5c Tidy up RPC API definitions
Ensure that the layouts of names and values match.

Change-Id: I8cea3dc7ea1fd2a1b722ddd7058564d5195b738b
2013-08-09 20:19:50 +02:00