Commit Graph

468 Commits (ee7ad5f106191323e04a7b861de385c8ee4bfdca)

Author SHA1 Message Date
huangtianhua 0ba3206b40 Use EntityNotFound instead of ImageNotFound
There are too many **NotFound exception classes defined
in This patch will define a general notfound
exception: EntityNotFound. And will use it instead of
ImageNotFound exception.

Change-Id: I2a09637be97905548b29673273e8579c69d42d52
Closes-Bug: #1461343
8 years ago
huangtianhua 767696fc47 Raise HTTPBadRequest instead of ValueError for API validation
Raise HTTPBadRequest exception instead of ValueError for
parameters validation.

Change-Id: I468181930299353908a53a3a940ff843d8547bde
Closes-Bug: #1449349
8 years ago
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
8 years ago
Jenkins 8a3aac038b Merge "Update xrange and lambda for python3" 8 years ago
Jenkins 4ee794c495 Merge "Update urllib/httplib/cStringIO to use six.moves" 8 years ago
Tetiana Lashchova 4ace95ad47 Use six.iterkeys(x) instead of x.keys()
Implements: partial blueprint heat-python34-support
Change-Id: I6f1c3091ca65dbef0f36bd6ba7f7fcbf77ff2e40
8 years ago
Sirushti Murugesan 63ef40f1be Update xrange and lambda for python3
partial blueprint heat-python34-support

Change-Id: I0b4ebf640083e63d6d1d461bf0c97778d19d770e
8 years ago
Sirushti Murugesan 19ce39d101 Update urllib/httplib/cStringIO to use six.moves
partial blueprint heat-python34-support

Change-Id: I00a7064560a95a33dcb1e621961765822d4e94d4
8 years ago
Oleksii Chuprykov 73d4f62b5c Add filtering for stack-list by stack_id
Add an ability to filter stacks by multiple IDs

Change-Id: Ic1aa3413490d4045002c645a093bd3f4faa49315
8 years ago
Jason Dunsmore 3c30bf8727 Add ability to filter stacks by tag
blueprint stack-tags

Change-Id: I4b5bc741fc271cb08ec588ae962573c59286dae5
8 years ago
huangtianhua af6b0db444 Make sure snapshot belongs to stack for actions
Check the snapshot belongs to stack when deleting and showing
stack's snapshot, and restoring from snapshot.

Change-Id: I8ce170b40b05ae17669524d75f80e06e39986673
Closes-Bug: #1437602
8 years ago
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
8 years ago
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
8 years ago
Jenkins 99d25ec8a2 Merge "Enable SSL for EC2Tokens." 8 years ago
tengqm 2ad1345639 Fix some new PEP8 errors found at gate
This patch removes the 'author' tag which now fails to pass PEP8 tests
and also adds some missing newlines in source files. These newly found
PEP8 errors are blocking us from merging code.

Change-Id: Ib5c4c043c1df5cd980e09d26d130150b2e6d64c2
8 years ago
Drago Rosson a2124b8c7e Separate message and traceback even if not a remote error
Faultwrap exposes tracebacks in error messages when Oslo.messaging
cannot add a _remote suffix to the exception generated by the Heat

Change-Id: Iaf91dafacce1abe94fb10aa2ba380cafb6fc4a84
closes-bug: #1432726
8 years ago
Michal Jastrzebski dea0897f45 First objects - stack and raw template
Implementation of oslo.versionedobjects.
This commit consists basic mechanism and first objects.
This should be base of implementation versoning to other objects

Implements: blueprint versioned-objects

Co-Authored-By: ShaoHe Feng <>
Co-Authored-By: Grzegorz Grasza <>

Change-Id: I554162cf3681fe559c75f54c61c6f32c91f5c2f8
8 years ago
Jenkins 515f682daa Merge "Enforce integer API parameter checking" 8 years ago
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
8 years ago
Jenkins 3650719ab3 Merge "Convert all non-test imports of json to jsonutils" 8 years ago
Angus Salkeld ac536c6114 Convert all non-test imports of json to jsonutils
As requested in:

Change-Id: Icea97aa44d2a3461fdfa2324292fd3b2c2f000e1
8 years ago
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
8 years ago
kairat_kushaev 3082fbb884 Add 2to3 compatibility for functools.wraps
In order to support compatibility between functools.wraps
in version 2 and 3 (3.4 or later) functools.wraps was replaced
by six.wraps. The behaviour of sixdecorator is exaclty the same
but it also supports __wrapped__ attribute according to
3.4 specs.

Change-Id: Ib695629e69e517206e630fff026c08b7847402dc
8 years ago
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
8 years ago
Jens Rosenboom a99fe6a760 Make import of oslo libraries namespaceless

Closes-Bug: 1423174
Change-Id: I48680ce6e7ce91005c147ab4388203946171d433
8 years ago
Steven Hardy 70112c103a Move logging to use oslo_log library
The oslo-incubator log modlule has been removed, so port to the oslo_log
library.  Note this uses the new (non namespaced, e.g oslo.log) import
convention, we'll need to align other imports in a future commit.

Some import reordering was required due to pedantic H30[57] checks, and
the services have all been converted to initialize the oslo_log library
as this is done differently to the in incubator.

Change-Id: Ib5a97123fe1b287bc531e42d7887c13ba6205628
8 years ago
Anant Patil 11d04c8d6a Enable SSL for EC2Tokens.
When keystone is deployed behind SSL, the ec2_authtoken options doesn't
have a way to include the same SSL options that the various clients use,
so it's not possible to authenticate tokens.

Capability to handle SSL options is added. ec2token makes use of HTTP
request object from httplib. Config options to specify CA file, client
side certificate, key file and "verify server certificate option" will
be listed under "ec2authtoken" group in conf file.

Change-Id: Ibede73a17ae951cff00a7d9629a4c08f82208139
Closes-Bug: #1415223
8 years ago
Kanagaraj Manickam 65134b8d99 heat-manage service list
Adds required REST API, Db model and engine service
changes for reporting the heat engine service status.

Change-Id: I3ef29c1efd2015d62eec1033ed3a8c9f42e7a6e2
Implements: blueprint heat-manage-service-list
8 years ago
Jenkins a465f4ba4e Merge "Expose stack_user_project_id in stack-show" 8 years ago
Jenkins 51a831f2cb Merge "proper handling of unsupported request methods" 8 years ago
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
8 years ago
Jenkins 37b01d38b9 Merge "Enable resource signals be handled asynchronously" 9 years ago
tengqm 37ef669705 Enable resource signals be handled asynchronously
This is an attempt to fix bug #1394095 which reported that alarm_url can
be signaled only in a blocked way. The reason is that the resource_signal
API was a synchronous call. To avoid breakng CFN/OpenStack WaitCondition
behavior, a new 'sync_call' argument is added which default to False.

A not-so-related fix to (L2161-2163) was included
in this patch because without that fix, I was not able to pass the test
cases. It was so trivial, so I don't think it deserves a separate patch.

Closes-Bug: 1394095
Change-Id: I45e094630ef01b34d09248dbac17ac477933ef53
9 years ago
Miguel Grinberg 8a2e0aff98 proper handling of unsupported request methods
This change adds support for responding to unsupported methods for all
routes. Invoking a route with an unsupported request method returns a 405
status code, and the response includes the 'Allow' header listing the
request methods supported by the requested URL. The OPTIONS request method
is also automatically supported for all URLs, with the response
returning the 'Allow' header. The way routes are registered has been
changed so that unsupported methods can be detected automatically.

Change-Id: I2de28e0fc6cd35ed060395405aa3770b1dc73376
Closes-Bug: 1367057
9 years ago
Jenkins 7d4c4030c5 Merge "Enable E265 style check" 9 years ago
Pavlo Shchelokovskyy 8415baf6cc Enable E265 style check
block comment should start with '# '

Change-Id: Iffae1b10e81b12ca8455139eae609ddca5e8dd09
9 years ago
Thomas Herve ec6ff6f670 Use oslo.config generator
Replace usage of old incubator configuration generator by the
oslo.config tool.

tools/config/ has been replaced by tox -egenconfig.

heat_integrationtests/ has been replaced by

Change-Id: I6d95df203b556c8ec2088d40a446427f7087b9a7
9 years ago
Peter Razumovsky d50aca8d21 Add PropertyUnspecifiedError exception
If we have situation, when we must specify at
least one of two conflicted resources, and there
is no specified resource, we get StackValidationFailed
with error msg looks like 'Either resource_1 or
resource_2 must be specified'. There are a few places,
where this situation appears. So it will be reasonable
to add special exception for these situations.

Change-Id: Ib107eff4fe8030fdbb40aa267b9e2b394ff7a186
9 years ago
Sergey Kraynev a4ecd1ed33 Use kwargs for ResourcePropertyConflict exception
Current approach works correct when error raised in heat-engine,
but when oslo-messaging try to send this error to heat-api it calls
this Exception again without any arguments. So it leads to empty output
in message.
This patch adds kwargs properties for directly sending parameters to
parent class and storing them for substitution during re-call in

Change-Id: I4e823206c3a88d27241532d9f393c07208af8b73
Closes-Bug: #1397002
9 years ago
Jenkins ce5bee0b8d Merge "Expose resource attributes in the API" 9 years ago
Peter Razumovsky 9b3d94e666 Convert unicode to six.text_type in heat/api
This patch convert unicode to six.text_type in
heat/api for python 3.x compatibility.

Change-Id: I8a1f88ebaac64daa2ba074407fa682dff00f2371
9 years ago
Anderson Mesquita e9c24bbd85 Expose resource attributes in the API
This adds the necessary API changes to allow the user to view
resource's attributes when making calls to resource show.

Implements: blueprint detailed-resource-show
Change-Id: Id203478dbd067743d36623e99332ac32c6f96d42
9 years ago
Jason Dunsmore f0cbd93447 Always import heat.rpc.api as rpc_api
heat.rpc.api was being imported as rpc_api in some modules and engine_api
in other modules.  Always import heat.rpc.api as rpc_api for consistency.

Change-Id: Ic84ca7fbac7a95eace7f2019c08ee20fa1bc8e5e
9 years ago
Jenkins bd243e8e64 Merge "Add snapshot restore HTTP API" 9 years ago
Peter Razumovsky ddcdd1f77f Fix [H302] errors in heat/api
Change-Id: I1eee89a1ff1b011031cde89c5daa660735bf1eb1
9 years ago
Thomas Herve e16036cd2d Add snapshot restore HTTP API
This adds the external HTTP API and the RPC methods to invoke stack

blueprint stack-snapshot

Change-Id: Id1ec0c11c9f12c23b3eec12a853db6ee4ff90277
9 years ago
Ziad Sawalha b14d12987b Update api docstrings to match guidelines

Change-Id: I33f03d784996e298ebd94aabec93e5083b5df840
9 years ago
Ethan Lynn 11c1b62052 Remove deprecated function i18n.install('heat')
Since i18n.install() is deprecated, remove it from heat codes and
import i18n._() to where it needed.

blueprint oslo-i18n
Change-Id: Icefada18b5a33112b425cd90d31d3a6a5f06188a
9 years ago
Brant Knudson 91ca44fe36 Update references to auth_token middleware
There's references to the auth_token middleware in keystoncelient.
The auth_token middleware has been moved to keystonemiddleware and
the version in keystoneclient shouldn't be used anymore.

If these references aren't updated, then when options are changed in
keystonemiddleware.auth_token the heat-api will fail to start because
there's duplicate options in keystoneclient.middleware.auth_token.

Change-Id: I04573aa5ff967afe3e00329f797fcc71b779e7b3
Closes-Bug: #1379082
9 years ago
Anderson Mesquita 5ff4489314 Refactor template simple_parse
The places that use simple_parse all have to check if the returned value
is a dict, so that logic can be safely moved into simple_parse itself to
avoid duplication.

Co-Authored-By: Asif Choudhury <>
Change-Id: I973f97fa5ce46e7492611555759d20131b98ab07
9 years ago