14341 Commits

Author SHA1 Message Date
Zuul
d3614902dd Merge "Ensure the whole ResourceDefinition is validated" 2018-01-08 18:17:23 +00:00
Zuul
ea2805ee6c Merge "Use appropriate exception in StackResource.get_output()" 2018-01-08 17:04:02 +00:00
Zuul
57297a832f Merge "Define resource/output definition sections with constants" 2018-01-08 08:07:51 +00:00
Zuul
624968ea47 Merge "Allow paths as lists in function.validate()" 2018-01-08 08:07:49 +00:00
Zuul
6e0c1717d2 Merge "Use correct raw string format" 2018-01-05 16:05:57 +00:00
Zuul
c1351c2494 Merge "Match on subnet update_networks_matching_iface_port" 2018-01-04 21:04:44 +00:00
Zuul
a88029ef13 Merge "Add removal_policies_mode to ResourceGroup" 2018-01-04 17:30:32 +00:00
Zuul
d618c0aaa1 Merge "Downgrade WARNING-level log" 2018-01-04 17:30:30 +00:00
Zuul
a453b3fd9e Merge "Don't try resource-level locks when stack locked" 2018-01-04 17:24:31 +00:00
Zuul
4daa84dc33 Merge "Re-factor and improve update_networks_matching_iface_port" 2018-01-04 10:37:31 +00:00
Zuul
9762cdf205 Merge "Add octavia client plugin and constraints" 2018-01-04 10:03:23 +00:00
Steven Hardy
7a42ec8657 Add removal_policies_mode to ResourceGroup
This enables choice over the current behavior which is to always append
to the resource data blacklist, or overwrite it (which is sometimes needed
e.g if you decide you want to reuse that group index)

The default behavior is unchanged, but the new behavior can be selected
via the "update" value.

Change-Id: I1157627b07d98dd079657c320ad783a3ba5bce81
Closes-Bug: #1741053
2018-01-04 09:41:15 +00:00
Luis Tomas Bolivar
bd8df9a8b9 Fix bypass list length check when all values are None
The patch https://review.openstack.org/#/c/527001/ bypassed the None
list but did not consider the case where all the for_each lists are
getting their values from attributes and therefore are None.

This patch set fix it by also skipping the check if all the values
are None -- as len(value_lens) would be 0 in that case.

Closes-bug: #1732934
Change-Id: Iba574bbd3877f9ca1ca755c384b3ddb47aec711c
2018-01-03 16:46:05 +01:00
Zuul
5aa603bb2b Merge "Refactor unit tests for server network" 2018-01-02 14:59:46 +00:00
Zuul
5eb4f8225d Merge "Imported Translations from Zanata" 2017-12-26 16:53:17 +00:00
rabi
4107b52123 Remove policy.json from setup.cfg
Change-Id: Iec915afdc290f87f74597353c7e4a455bc28e791
2017-12-26 17:55:56 +05:30
Zuul
eeb65c75b7 Merge "Bypass list length check for None values in repeat function" 2017-12-26 11:43:02 +00:00
Zuul
0ed83b9b44 Merge "[policy in code] part 7 add sample and releasenote" 2017-12-26 11:00:46 +00:00
Zuul
4d95b8dd15 Merge "[policy in code] part 6(cfn, cloudwatch)" 2017-12-26 10:56:31 +00:00
OpenStack Proposal Bot
b636dc1e69 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I75180b26ee4450828330755baebbfaf5dfefaa44
2017-12-25 06:59:32 +00:00
OpenStack Proposal Bot
64b866ec0b Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I684319eae9c06e666f266bce8cfdc00229fa7894
2017-12-24 06:27:31 +00:00
rabi
d0787393ce Add octavia client plugin and constraints
Change-Id: I0fa34d19781c49ede8743defe72bbdc63f375896
Partial-Bug: #1737567
2017-12-23 12:37:33 +05:30
Harald Jensas
8b71c583ad Match on subnet update_networks_matching_iface_port
* Add subnet to interface managed keys when updating nets matching
  interface port
* Add tests to verify that matching on "poor" nets with only
  subnet works.

Change-Id: I3c2a251088fafef78c69aa4a758137907f414a60
Related-Bug: #1696483
Related-Bug: #1702279
2017-12-22 13:46:58 +01:00
Harald Jensas
07b9b1a033 Re-factor and improve update_networks_matching_iface_port
* Implement _find_best_match() using subset intersection.
* Reduce number of expensive external neutron calls to get net_id by
  moving this outside the inner loop.

Unit test updated, we now do a better job at matching and populate more
data when updating.

Partial-Bug: #1696483
Partial-Bug: #1702279
Change-Id: I2157d35e1c58f3960d5b6aa86199d93bb5b88401
2017-12-22 13:29:05 +01:00
Harald Jensas
c874d9d5d6 Refactor unit tests for server network
* Consolidate unit test fake_interface to one global.
   Instead of three implementations of the fake_interface. Use
   one shared globally defined implementation.
* Use create_old_net() instead of just writing the dict.
* Adds the subnet_id property in fixed_ips of fake interfaces.
* Use 'network' instead of deprecated 'uuid'

Related-Bug: #1696483
Change-Id: Ifa7728402e1189348b1c4fcc0bbbd1eec8c0deaf
2017-12-22 12:14:48 +01:00
Harald Jensas
9699553a96 Fix a typo in tests
s/mult_subnet_template/multi_subnet_template/

Change-Id: I15392f335da728b2080368ff63bda8b21dc0639b
2017-12-21 09:27:51 +01:00
Zane Bitter
2e4a6e237c Use appropriate exception in StackResource.get_output()
Don't raise InvalidTemplateAttribute in StackResource.get_output() when an
output does not exist - it's not the case that get_output() is only used
for fetching attributes. Instead, raise NotFound from get_output(), and
translate that to InvalidTemplateAttribute in the caller when we are
actually fetching an attribute.

Change-Id: I4f883e4b583a965785d0a595c8c33b47dc94118c
Related-Bug: #1719333
2017-12-19 16:36:43 -05:00
OpenStack Proposal Bot
622af9952b Updated from global requirements
Change-Id: I5b5b16189d6618759f7caef8e7bd61213a45f2e3
2017-12-19 01:16:36 +00:00
Zuul
f2b4007837 Merge "ForceDelete Instance" 2017-12-18 05:46:11 +00:00
Zuul
a96b876764 Merge "Enable to specify network for Trove Cluster" 2017-12-18 05:41:41 +00:00
Zuul
7eecc4d831 Merge "Avoid RPC call in TemplateResource.get_reference_id()" 2017-12-16 18:44:22 +00:00
chestack
2441a02c1c Enable to specify network for Trove Cluster
we should enable heat to specify network for trove cluster
after [1] merged

[1] https://review.openstack.org/#/c/179443/

Change-Id: I161b7cc1c4824f6aa4a4667bf2d909a2ead81cb4
2017-12-15 11:52:49 +00:00
OpenStack Proposal Bot
2572705698 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I9149a09b534c33f52b2073318e2a3bafdc05e65a
2017-12-14 07:37:10 +00:00
Zuul
ee8da54dbc Merge "Remove setting of version/release from releasenotes" 2017-12-13 15:28:31 +00:00
ricolin
b53f8e472d Remove setting of version/release from releasenotes
Release notes are version independent, so remove version/release
values. We've found that projects now require the service package
to be installed in order to build release notes, and this is entirely
due to the current convention of pulling in the version information.

Release notes should not need installation in order to build, so this
unnecessary version setting needs to be removed.

This is needed for new release notes publishing, see
I56909152975f731a9d2c21b2825b972195e48ee8 and the discussion starting
at
http://lists.openstack.org/pipermail/openstack-dev/2017-November/124480.html
.
Closes-Bug: #1737955

Change-Id: I981c5a6476b40bf9f7fcd35ae0c638e77912f060
2017-12-13 15:01:23 +00:00
Khaled Qarout
89643db005 Bypass list length check for None values in repeat function
Attributes may return "None" before the resource is created,
so the length check for for_each lists in repeat function will fail.
Bybass the length check for the None list

Change-Id: Ida81060e62340b3ea37ba0fdd7443dc88ba6c5aa
Closes-bug: #1732934
2017-12-13 06:31:51 -05:00
Zuul
d73b446a41 Merge "Remove unused variable" 2017-12-13 07:28:43 +00:00
Zuul
a1afb3186f Merge "Don't log PolicyNotRegistered when check resource type" 2017-12-13 04:53:11 +00:00
ricolin
222a8ac5e9 [policy in code] part 7 add sample and releasenote
Since we're moving all policy into code and documenting it there we
should generate those docs automatically, so they are less likely to
be out-of-date.
Also add releasenote for ops to aware that Heat is now using
policies in code and their Orchestration service needs to avoid
depends on policy.json file if file not exist, since there is no
such file by default after this patch.
Partially-Implements: bp policy-in-code

Change-Id: I25fc5a110b1fe515918e042f220c23ac9a7e811f
2017-12-13 10:58:56 +08:00
ricolin
f2bc379242 [policy in code] part 6(cfn, cloudwatch)
Add cloudformation and cloudwatch policy in code rules.
Remove policy.json. We don't keep any default policy rules in
policy.json from now. Still they can create policy.json file and
add any rules they try to override.
Partially-Implements: bp policy-in-code

Change-Id: I610115dc1974b2182ce673bb086a1da15b022de3
2017-12-13 10:58:47 +08:00
Zuul
64fd0db4ac Merge "[policy in code] part 5 (software-*)" 2017-12-12 21:28:03 +00:00
Zuul
d03514e3c8 Merge "Update Zuul branch limit" 2017-12-11 14:13:42 +00:00
Zuul
e614e683a6 Merge "Updated from global requirements" 2017-12-11 14:03:00 +00:00
Zuul
70ff59848c Merge "Protect prepare_update_replace() with resource lock" 2017-12-11 12:51:41 +00:00
ricolin
81a2e4ab43 Allow reserved status for attach check
This issue was due to Nova changes it's volume attach workflow
(https://review.openstack.org/#/c/330285) which allows `reserved`
status.
Closes-Bug: #1737343

Change-Id: I13f1906f53a89586bb51c0b70fa768a9500dfa26
2017-12-11 04:28:54 +00:00
ricolin
abc850331c Don't log PolicyNotRegistered when check resource type
Silence PolicyNotRegistered exception when checking resource type.
We do not consider PolicyNotRegistered as an error when checking
resource type, so we shouldn't log the exception as well.

Depends-On: I13f1906f53a89586bb51c0b70fa768a9500dfa26
Change-Id: I111ea7ffa43a46d2a6fe360fb0c20d672df5771c
2017-12-09 18:24:39 +00:00
Zane Bitter
b0e18270b4 Protect prepare_update_replace() with resource lock
When we consolidated resource locking with resource state transitions in
a7376f7494b310e9367ebe5dcb43b432a4053023, prepare_update_replace() moved
outside of the locked section, so that other update operations could
potentially conflict with it. This change ensures that we call it while the
lock is still held (if we have transitioned the resource to
UPDATE_IN_PROGRESS, and thus acquired the lock), or that we acquire the
lock before calling it (if UpdateReplace is raised before attempting to
update the resource).

To avoid unnecessary locking and unlocking, we only take the lock if the
Resource plugin has overridden the default handler method (either
restore_prev_rsrc() or prepare_for_replace()), since the defaults do
nothing.

Change-Id: Ie32836ed643e440143bde8b83aeb4d6159acd034
Closes-Bug: #1727127
2017-12-08 11:52:20 +05:30
OpenStack Proposal Bot
74541975c1 Updated from global requirements
Change-Id: I774c2015a728eaa1911475923bad585d3bf6cec2
2017-12-07 13:21:56 +00:00
Zuul
653c130a1d Merge "Updated from global requirements" 2017-12-07 10:47:03 +00:00
Zuul
719c457e40 Merge "Build heat.conf reproducibly" 2017-12-07 09:47:39 +00:00