12263 Commits

Author SHA1 Message Date
rabi
5b0fe81270 Improve deep merge for parameters
This allows for merging lists and deep merging maps.
This does not support comma_delimited_lists and is
implemented by using parameter schema in the subsequent
patches.

Change-Id: I89df95eca713a7125cc53ed8bf352274f28bf6d9
Blueprint: environment_merging
2016-08-22 17:35:01 +05:30
rabi
59b2a559ec Move merge_environment to environment_util module
This moves the merge_environment utility function
from service.py to environment_util.py.

Change-Id: Ia005cf47d5e655e60359f8da397a712e749ce13c
Blueprint: environment-merging
2016-08-22 13:46:34 +05:30
rabi
36a0ad29e5 Add valid merge strategies
This adds three merge startegies(overwrite, merge, deep-merge).
There can be a default merge startegy for an env or parameter
specific merge strategy. if none of the above is specified
then it defaults to 'overwrite'.

Change-Id: I05f56887d762342981e3cb9885872ef58ecd0ad8
Blueprint: environment-merging
2016-08-22 13:46:34 +05:30
Jenkins
110cf140b1 Merge "api-ref - build/resource-type/versions" 2016-08-22 06:53:56 +00:00
Jenkins
cdea379a11 Merge "Updated from global requirements" 2016-08-22 06:41:54 +00:00
Jenkins
c0ec8501a1 Merge "Don't manipulate config for admin creds" 2016-08-22 06:41:47 +00:00
Jenkins
fd03d3d3aa Merge "Register heat tempest plugin" 2016-08-22 06:41:38 +00:00
Jenkins
d1cb214a1c Merge "Depend on tempest in test-requirements.txt" 2016-08-22 06:41:29 +00:00
tengqm
84b1d89a80 api-ref - build/resource-type/versions
This patch fixes the format and content of the api-ref documentation for
the build-info, resource-type-{list|template|schema}, versions APIs.
Major changes include:
- use status code table to show response codes
- add missing response parameters such as request id
- fixed cases where the response format was not clearly/correctly
  documented.

Change-Id: Id7ac58ff19d3f7a0feb4d872efa7b46c01fa8f4b
2016-08-22 02:24:59 -04:00
Jenkins
ca5bece4aa Merge "Override client() for RoleAssignment resources" 2016-08-22 06:02:37 +00:00
Jenkins
7c702887e3 Merge "Remove tenant_safe flag from rpc and db api" 2016-08-22 03:43:14 +00:00
OpenStack Proposal Bot
c3fd83aa18 Updated from global requirements
Change-Id: Idd6ce3247b26b005c2e1679ab7bc1f9bb649b129
2016-08-22 03:07:43 +00:00
Jenkins
d02c77ce40 Merge "Add new environment section for merge strategies" 2016-08-21 16:56:50 +00:00
Jenkins
ef12e03a24 Merge "Get ready for os-api-ref sphinx theme change" 2016-08-20 02:46:15 +00:00
Jenkins
6455b0a453 Merge "Begin move of UpdateReplace back to its rightful location" 2016-08-19 22:46:56 +00:00
Graham Hayes
3202da7b93 Get ready for os-api-ref sphinx theme change
Change-Id: Ic8cc1d1d7388391c13bf2354f7f4f7fdc237a10e
2016-08-19 16:44:01 +01:00
Jenkins
4eee944e9b Merge "api-ref doc for stack (5)" 2016-08-19 05:32:29 +00:00
Jenkins
bfc1d11990 Merge "api-ref doc for stack (4)" 2016-08-19 05:31:26 +00:00
Jenkins
2673dbdeff Merge "api-ref doc for stack (3)" 2016-08-19 05:31:19 +00:00
Jenkins
222d70cc9b Merge "api-ref doc for stack (2)" 2016-08-19 05:29:00 +00:00
Jenkins
82572a387f Merge "api-ref doc for stack (1)" 2016-08-19 05:28:54 +00:00
Jenkins
15c1926006 Merge "Split stack api-ref doc into three files" 2016-08-19 05:28:46 +00:00
Jenkins
fb0d9c90ed Merge "Fix api-ref doc for software deployment." 2016-08-19 05:13:05 +00:00
Jenkins
570511850b Merge "Add a replace_on_change option to the SW Config input schema" 2016-08-19 04:12:02 +00:00
tengqm
959b5694df api-ref doc for stack (5)
This is the last patch concerning api-ref docs for stack resources. The
major changes are about stack-abandon, stack-adopt, template-show APIs.

Change-Id: I2af6e5ba653ac2dfa6a81478a17367bf4f661944
2016-08-18 23:52:38 -04:00
rabi
b65b38db5c Add new environment section for merge strategies
This adds a new evironment section 'parameter_merge_strategies'.
These strategies would subsequently be used to merge parameters
and parameter_defaults from environment files.

Change-Id: Ib2b84ecdb2a1516ea0c5ced25a1fed408b954694
Blueprint: environment-merging
2016-08-19 08:54:30 +05:30
Jenkins
2f412dee7e Merge "Add reno note on volumes.backups_enabled option" 2016-08-18 19:46:50 +00:00
Jenkins
34a5d15ff6 Merge "Deal with cinder-backup service absent" 2016-08-18 17:32:03 +00:00
Jenkins
8f77421ad9 Merge "Parse JSON as JSON when converting to YAML" 2016-08-18 17:01:30 +00:00
Zane Bitter
c5ebe66ce9 Begin move of UpdateReplace back to its rightful location
A deeply misguided effort to move all exceptions out of the
heat.engine.resource module, where they belong, and into the
heat.common.exception module, where they largely do not, broke the API for
third-party resource plugins. Unfortunately this happened a couple of
releases back already, so we can't simply put UpdateReplace back where it
belongs as that would also break the de-facto third-party API.

This change adds an alias in the correct location and a comment indicating
that it will move back at some time in the future. It also switches all of
the in-tree uses back to heat.engine.resource.UpdateReplace, in the hope
that third-party developers will be more inclined to copy from that.

This reverts commit 4e2cfb991ada853023cd0994db2bf9a39126c538.

Change-Id: Iedd5d07d6c0c07e39e51a0fb810665b3e9c61f87
Closes-Bug: #1611104
2016-08-18 12:57:54 -04:00
Zane Bitter
285802bdd5 Add a replace_on_change option to the SW Config input schema
Change-Id: Idf39e48f801de21e63fcceb8dd779f266a07199f
Co-Authored-By: Steve Baker <sbaker@redhat.com>
Closes-Bug: #1595040
2016-08-18 12:57:54 -04:00
Pavlo Shchelokovskyy
60e90c09ef Add reno note on volumes.backups_enabled option
Change-Id: I911db6d7dab7d0a3b6e420bd7e12672ec39e6af9
Related-Bug: #1595159
2016-08-18 19:03:12 +03:00
rabi
cba109872b Override client() for RoleAssignment resources
It seems we've missed to override client() methods for some
keystone resource plugins.

This also fixes the tests for all keystone resources.

Change-Id: I97e4d4f0bbc9575109d9c8f59fe4795313d2f525
Closes-Bug: #1614400
2016-08-18 15:57:26 +00:00
Jenkins
f238a6e1d5 Merge "Clean imports in code" 2016-08-18 14:06:51 +00:00
tengqm
772ef5ef89 api-ref doc for stack (4)
This patch fixes the api-ref documentation for stack resources. More
specifically, this patch fixes the documentation for the 'stack-update',
'stack-update-preview', 'stack-delete', 'stack-find-delete' calls.

Change-Id: Ie8987c49a758a161015d111a8cfa50b0fbda88f8
2016-08-18 09:50:16 -04:00
tengqm
a2a028be90 api-ref doc for stack (3)
Fix docs for stack-find, stack-show, stack-list APIs.
Major changes include:

- Revise stack query parameters to differentiate them from stack
  object body fields.
- Added 'resolve_outputs' to stack-find interface.
- Added response sample and documentation for stack-find API.
  We should faithfully document the 302 status code and body.
- Added missing parameter 'stacks' for stack-list call.
- Added missing 'X-Openstack-Request-Id' parameter in responses.

Change-Id: Ifc4937a254ff766ae83c80c009047d926eebf72f
2016-08-18 09:40:52 -04:00
tengqm
d130a726cd api-ref doc for stack (2)
This patch continues the fix to the api-ref doc for stack resource. To
ensure upcoming patches are not messing up the parameter defintions,
this patch is cleansing up the parameters that appear both in URLs and
request/response bodies: 'stack_id', 'stack_name', 'resource_name',
'event_id', 'snapshot_id', etc. These parameters sometimes are playing
different roles although the name is the same.
Other fixes included in this patch:

- added back the stack-outputs and stack-snapshots into index
- split resource-types out of stack-templates and add reference to it
  into index (git misunderstood this as a renaming, :))

Change-Id: I2b486a9b85d23d3225a5701c2265ecea2f4712f7
2016-08-18 05:58:24 -04:00
tengqm
fa39e4b1fd api-ref doc for stack (1)
This patch, as a first step, fixes inaccuracies/bugs in api-ref
documentation for stacks. The major changes in this patch include:

- Added missing 'location' and 'X-OpenStack-Request-Id' parameters
  which both appear in some response headers.
- Deleted some descriptions about parameters that are never
  referenced in any APIs.
- Added missing 'deletion_time' parameter.
- Added missing 'environment_files' parameter.
- Added missing sample JSON file for stack-create-response.json.
- Fixed errors in stack-preview-response.json.
- Added tabular description of response codes.
- Added a status.yaml file for response code description (shared).

Change-Id: I826ed899f925812df9b44144469700453789e087
2016-08-18 05:11:01 -04:00
tengqm
77927765a9 Split stack api-ref doc into three files
This patch splits the stacks.inc file into three files so that we can
patch them separately. The original file contains API calls about
stacks, stack snapshots and stack outputs, however, the latter two
have every right to be documented separately.

Change-Id: I3e3b71c914046939cd816c79359601e91791cf82
2016-08-18 03:23:05 -04:00
Jenkins
0a8d40d909 Merge "Handle case where the Nova AZ extension is disabled" 2016-08-18 06:23:48 +00:00
Jenkins
d016928efd Merge "Validate the input/output configs in Software Config" 2016-08-18 04:42:48 +00:00
Jason Dunsmore
e7e13ca4d0 Handle case where the Nova AZ extension is disabled
..in the AWS::EC2::Instance's availability_zone attribute resolution.

Change-Id: I4ef3ff3498255f589182e1f736a3d17eafaf1a00
Closes-Bug: #1592110
2016-08-17 09:01:39 -05:00
Jenkins
7d95c96508 Merge "Don't use config option sqlite_db" 2016-08-17 08:43:35 +00:00
ChangBo Guo(gcb)
c283f8bf50 Don't use config option sqlite_db
Config option sqlite_db is deprecated in
0a1bae9859079fb21a03716be947c5f1da6db0a2, and we test database
with sqlite in memory mode [1] as below:

CONF.set_default('connection', "sqlite://", group='database')

and never use config option sqlite_db, so don't need override its
default value.

[1]http://docs.sqlalchemy.org/en/rel_1_0/core/engines.html#sqlite

Change-Id: Ic1363f7464e9b81d65d74fc30b525d0bd06103ed
2016-08-17 13:29:43 +08:00
Zane Bitter
eb8b9b86df Parse JSON as JSON when converting to YAML
The convert_json_to_yaml function is a horror of almost Lovecraftian
propportions, designed to convert from JSON to YAML without changing the
order of keys in the file.

The fix for bug 1286380 (which appears to be resolved in the latest
versions of PyYaml anyway) means that, if this was not corrupting data
before, then it certainly can now.

This patch takes advantage of the fact that we no longer support Python 2.6
to just parse the JSON data as JSON (instead of YAML) using the
object_pairs_hook to ensure that the output order does not change.

Change-Id: I4b09b4c913ec6f8d9c4b7017e3a7a5b7166cf78e
Related-Bug: #1286380
Closes-Bug: #1613881
2016-08-16 17:44:36 -04:00
Jason Dunsmore
bd1ea9e874 Log missing clients as WARNING instead of ERROR
This will prevent tracebacks from being logged if every client is not
installed when the engine is started.

Change-Id: I53c90f98689070a0b18e49ca7988e4176a8987ac
Closes-Bug: #1597593
2016-08-16 16:27:55 -05:00
Peter Razumovsky
9811510a9d Nova::HostAggregate observe reality implement
Add override parse_live_resource_data implementation for
Nova::HostAggregate resource.

implements bp get-reality-for-resources

Change-Id: I086288e26c635e5b710232bbba9291c7288837f1
2016-08-16 09:31:38 +00:00
Jenkins
9f69b3feef Merge "Add validate for external resources." 2016-08-16 08:54:22 +00:00
rabi
1f88c675c4 Remove tenant_safe flag from rpc and db api
We can use admin_context to have access to stacks
and software configs across projects. This removes
the tenant_safe flag from rpc and db api. This is
backward compatible with older rpc clients.

We still support use of global_tenant flag for listing
stacks and software configs. However, by default
an admin(user with admin role in admin_project)
would not need that.

Change-Id: I12303dbf30fb80290f95baba0c67cdf684f5f409
2016-08-16 12:38:33 +05:30
Jenkins
b412c2793a Merge "Always eager load the raw_template for a stack" 2016-08-16 06:36:17 +00:00