summaryrefslogtreecommitdiff
path: root/heat/tests
Commit message (Collapse)AuthorAgeFilesLines
* Added a unit test for get_environment_hidden_param18.0.1stable/yogaChengen Du2023-03-291-0/+50
| | | | | | | | | | | A unit test for verifying that hidden parameters should be masked in the get stack environment API Story: 2010555 Task: 47229 Change-Id: I44ef26849ebb450a5643907a0ef47166cfd9b1cb (cherry picked from commit bdcb2c3bd115f1893baeab1d946eefa4aab49552) (cherry picked from commit 89b57e5e2eee091f18afbc03e83536109388dcb6)
* Honor 'hidden' parameter in 'stack environment show' commandChengen Du2023-03-291-1/+2
| | | | | | | | | | | | | Backport note: This includes change I0abbd535aacc03446ada0fa806dfdfdaa4522afe which fixed the wrong explanation in the release note file. Related-Bug: #1999665 Story: 2010484 Task: 47052 Change-Id: Ifc51ff6a4deab05002ccded59383416f9a586aa0 (cherry picked from commit c1b5fcfbe37d3f94d5b73ae36e071d1aa8c4e0f5) (cherry picked from commit 436ecad6511b30683f6b9af4e484ed64c3bcaab9)
* Decode UTF-8 body data in SwiftSignalZane Bitter2023-02-061-54/+57
| | | | | | | | Change-Id: Ie12c2df93f846629a7c8b7c6415cebc31eaba1bc Story: #2010485 Task: 47053 (cherry picked from commit a0ff4b98b700c7f31a9f14d3d62eeaf3b2047139) (cherry picked from commit 6343b64e703221402f0d40fc0e62da944551e2dd)
* Don't always replace FAILED ServerGroup resourcesRabi Mishra2022-07-131-5/+37
| | | | | | | | | | | | | | | | | | ServerGroup resources work as scheduler hints for server resources and replacement of it replaces the servers which is undesirable in many circumstances. - We don't allow update of ServerGroup resource properties - If not created (CREATE_FAILED) without resource_id they will be replaced - If does not exist in nova they would be created - If exist in nova, FAILED resource status would be just changed to COMPLETE Task: 45748 Change-Id: I096dff2b541a5aa8afbbbcea5161e7ca1c244039 (cherry picked from commit a0e072b3204d736b9a4a5b2ceb2157f57405ac6f)
* Fix parameter merging with merge strategiesRabi Mishra2022-07-041-6/+6
| | | | | | | | | | | | | | | | | | Earlier users had to specify merge strategy for a parameter/parameter_default in every environment file where they are used(or the defaults for that environment was used). However, the strategy for a parameter in the first environment was ignored as there is nothing to merge. With Iec3367667248d0b46196a6d569f3cbb3b200d842, we changed to use existing merge strategies, but the strategies in the first environment were still ignored. This patch fixes it. Task: 45578 Change-Id: Ic6125c6af60c1007243523cc8510a17f49c7b5af (cherry picked from commit d9fe7301b3af2db9fa56d59eb405add94730ba50)
* Fix AttributeError in Python 3.8Takashi Kajinami2022-06-211-0/+37
| | | | | | | | | | | | | | | | | | | | | | The importlib-metadata package was imported to the core Python since Python 3.8, and stevedore uses the standard library implementation instead of the 3rd party package in Python 3.8 and later. However the implementation available in Python 3.8 is quite old and especially it does not include the change which added the module attribute[1]. This change makes sure we avoid referring to that attribute if it does not exist, to avoid AttributeError in Python 3.8. [1] https://github.com/python/importlib_metadata/commit/dfc96137ac3583477c02aa97291b0896fb61f282 Backport note: This change includes an additional fix for Python < 3.8, which uses the 3rd party importlib-metadata. Story: 2010095 Task: 45650 Change-Id: Ieba5f353b0fe8a9b187bac1f6ff1b3a8f3b896b3 (cherry picked from commit eec1f92bc02e8beb4ce1db9646f8b3b678fb8329)
* Use previous parameter merge strategyrabi2022-06-141-0/+11
| | | | | | | | | | | | We don't allow different parameter merge strategies in different environment files for a parameter. If a merge strategy has already been provided in one environment file, let's use that for subsequent ones unless a different merge strategy has been provided. Task: 45578 Change-Id: Iec3367667248d0b46196a6d569f3cbb3b200d842 (cherry picked from commit 94f32ee39f4d705614079bd0ac113cde67dbb7e4)
* Fix compatibility with oslo.context >= 4.0.018.0.0.0rc118.0.0Takashi Kajinami2022-03-016-32/+32
| | | | | | | | The tenant argument of RequestContext is longer available since oslo.context 4.0.0. This change removes usage of the deprecated argument in unit tests to prepare for version bump. Change-Id: I0493b5fbe09d183e57a207c1dda0b2ee7a4e1b34
* Fix unit tests for croniter>=1.2.0Takashi Kajinami2022-01-171-2/+2
| | | | | | | | | | | | | | | Since croniter 1.2.0, day=0 is no longer accepted as a valid value[1]. Because of this change, some unit tests are failing with the following error. Invalid CRON expression: [* * 0 * *] is not acceptable, out of range This change updates the pattern used in unit tests so that the value is accepted by the latest croniter. [1] https://github.com/kiorky/croniter/commit/17953c8fa73d09c15b1a8af6b3f27245856f3cb1 Change-Id: Ib9ee765e89716583b8f28cc9aafd9cb4e8e8e1cb
* Merge "Fix Pool resource update for session_persistence"Zuul2021-12-241-0/+1
|\
| * Fix Pool resource update for session_persistencerabi2021-11-171-0/+1
| | | | | | | | | | | | | | | | Pool session_persistence property should be update allowed. Task: 43952 Change-Id: Idee8893844bfd776a81c9e3ac45aa6804092a440
* | Adjust self.assertRaisesRegex messages for py310Corey Bryant2021-12-132-5/+5
| | | | | | | | | | | | | | | | | | The messages returned are slightly different when run with Python 3.10. Story: 2009741 Task: 44177 Change-Id: I26917aefdf43bf3f9008891d2e66aef9b94f58b5
* | Skip aodhclient plugin testrabi2021-11-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | This is broken after pyparsing was bumped to 3.0.6. With python-aodhclient (kind of unmaintained it seems) CI broken, we should skip the test temporarily until [1] is merged and we've a client released with the change. [1] https://review.opendev.org/c/openstack/python-aodhclient/+/819393 Change-Id: Ib4a244087038f698eabbf2180eff3efce3a3c767
* | Merge "Fix None comparision when sorting by `updated_at`"Zuul2021-11-221-5/+22
|\ \ | |/ |/|
| * Fix None comparision when sorting by `updated_at`Erik Panter2021-11-091-5/+22
| | | | | | | | | | | | | | | | | | | | When sorting resource candidates in `_get_best_existing_rsrc_db`, resources with the same score are sorted by `updated_at`, which can be `None`. If that is the case, use `created_at` instead. Task: 43815 Story: 2009653 Change-Id: Ic0265fcf7ceb811803cdebaa8932fe80dc59a627
* | Fallback to upstream for Fedora imageIan Wienand2021-11-121-0/+3
|/ | | | | | | | | | | | | | OpenDev infra only keep around the latest two Fedora releases in their mirrors. Probe for the image from the local test mirror, but if not found, fallback to upstream. This will be much less reliable, but can avoid gate breakage until new images can be used. Also, use endpoint_type when creating keystoneclient Keystone admin endpoint has been removed from devstack with[1]. This would use the public endpoint by default. Change-Id: I96ab14871ee8c5d5b83cc0cd4abc840ef0218ca8
* Use yaml.safe_load() in lbaas testsrabi2021-11-015-14/+14
| | | | | | | load() function requires a loader parameter with PyYAML 6.0. Change-Id: Icf8ae805e53d80cf7be46465326983d2e24ef23a
* Allow for creating server_group with max_nova_api_microversionrabi2021-10-181-0/+6
| | | | | | | | When users set max_nova_api_microversion in heat.conf, we should use that to create the client. Change-Id: If74f3f869fc696c87540357d96b039b68c456539 Task: 43661
* Fix ServerGroup createrabi2021-10-121-3/+7
| | | | | | | | | | | | | Nova api has a different signature from microversion 2.64 onwards[1]. Also adds support_status for 'rules' property missed earlier in I8e77f54303298da00cbe719afccb449f10fe387c. [1] https://github.com/openstack/python-novaclient/blob/master/novaclient/v2/server_groups.py#L103-L104 Task: 43168 Change-Id: If7138c71044adadaf7de255a2fac463b57ff3c47
* Drop six libraryBrendan Shephard2021-10-051-3/+1
| | | | | | | | The six library was introduced to bridge the gap between Python2 and 3. This is no longer necessary on branches where we are not supporting Python2. Change-Id: I7736373d03c23884158e4a1d41defafb4e2b8a4c
* Use correct argument name for setting Nova KeyPair key typeZane Bitter2021-08-311-2/+2
| | | | | | | | | | The argument in novaclient is, and always has been, 'key_type' not 'type'. So using an x509 key instead of an ssh one has never worked since it was introduced in d4307b5d2bef8e3370696c4323b142576862fe0e. Change-Id: Id38f489396e5b2dfce2e529737ecbaff3ffddc2d Story: 2008575 Task: 41727
* Merge "Allow arbitrary image properties"Zuul2021-08-251-1/+90
|\
| * Allow arbitrary image propertiesBrendan Shephard2021-08-041-1/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In some circumstances, it is necessary to have arbitrary image properties on Glance images. An example is described here: https://storyboard.openstack.org/#!/story/2008951 This patch adds the ability to specify those properties using the WebImage resource. Story: 2008951 Task: 42575 Change-Id: I23475185671c52b02eb57f1aa537f206b51c384a
* | Use Block Storage API v3 instead of API v2Takashi Kajinami2021-08-024-14/+6
|/ | | | | | | | | | | | | | Block Storage API v2 was deprecated during Pike cycle and is being removed during Xena cycle, and current v3 API should be used instead. Unused volume_client and network_client in integration test code are also removed by this change. Note: granade tests is made non-voting temporally until the same issue is fixed in stable/wallaby. Depends-on: https://review.opendev.org/802150/ Change-Id: I6a2b5afa13480791971bbd8bba1f43b9f2db8294
* Merge "Switch to use <user/project>_domain_id in context"Zuul2021-06-252-8/+9
|\
| * Switch to use <user/project>_domain_id in contextramishra2021-06-232-8/+9
| | | | | | | | | | | | | | | | | | Unreadable logs from oslo.context warnings. "Using the 'project_domain' argument is deprecated in version '2.18' and will be removed in version '3.0'" Change-Id: Icfe18a5d299da4b6b4024374791be53f2b3e41f2
* | Merge "Add availability_zone to OS::Octavia::LoadBalancer"Zuul2021-06-242-0/+2
|\ \ | |/ |/|
| * Add availability_zone to OS::Octavia::LoadBalancerJake Yip2021-06-162-0/+2
| | | | | | | | Change-Id: I63369b92b77b4f84bc2646ab35632006ee6b841b
* | [goal] Deprecate the JSON formatted policy fileGhanshyam Mann2021-06-175-8/+23
|/ | | | | | | | | | | | | | | | | | As per the community goal of migrating the policy file the format from JSON to YAML[1], we need to do two things: 1. Change the default value of '[oslo_policy] policy_file'' config option from 'policy.json' to 'policy.yaml' with upgrade checks. 2. Deprecate the JSON formatted policy file on the project side via warning in doc and releasenotes. Also replace policy.json to policy.yaml ref from doc and code. [1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html Change-Id: I1aa12bcd2638390f25d57ce8abeeec248121dc02
* Fix SQLAlchemy use for version 1.4Brendan Shephard2021-06-162-12/+2
| | | | | | | | | | | | | | | The change to SQLAlchemy upper constraints has broken some of the tests in Heat. Syntax and usage needs to be updated accordingly to ensure tests work with the 1.4 version of SQLAlchemy. Reference: https://storyboard.openstack.org/#!/story/2008974 Story: 2008974 Task: 42616 Change-Id: Id4755c8c58401ebfd42a8c57f94d111de9f74ac1
* Preserve order in list_concat_uniqueramishra2021-04-231-1/+1
| | | | | | | | | Also, we should not modify a list when iterating over it. Task: 42359 Closes-Bug: #1925373 Change-Id: Iaa2c05b4155d93f44de60b6f98a69450c1512817
* Fix failing test_common_constraintsramishra2021-04-141-4/+3
| | | | | | | After UC change for croniter in [1] [1] https://review.opendev.org/c/openstack/requirements/+/785745 Change-Id: I7506f3b95ae52777ea39042b449f7949f3f81aed
* Merge "Check ready status volume before extend volume"Zuul2021-04-072-2/+33
|\
| * Check ready status volume before extend volumericolin2021-03-122-2/+33
| | | | | | | | | | | | Change-Id: I2d74bb0ee66813a500b3cb7766022297f5a152f2 Story: 2008349 Task: 41251
* | Don't update status for replaced resourceramishra2021-04-011-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With I04e7ad90944c2d03ce0e59ba16af9d60d6e01222 we allowed update of previously-existing resource if replacement creation has failed during last update. However, we force update the status of the existing resource to 'COMPLETE'. Therefore, in the next update if properties/type has not changed for the resource it won't try to update/replace the previously existing resource resulting in false positive of stack updated successfully. Task: 42194 Change-Id: Icc90a921ec67e49aec2c4acfad72235c57c78421
* | Assume interface detach called for port not foundramishra2021-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | If the interface has been detached before we call detach_interface, then we keep on calling it as we get a 404 from nova. Let's assume it's being called and check if the interface has been detached. Task: 42195 Change-Id: I768eeb10c2c24a0c93749b11636ef3e003ecfcd9
* | Merge "Allow creating a Neutron port without fixed ips"16.0.0.0rc116.0.0Zuul2021-03-151-0/+39
|\ \
| * | Allow creating a Neutron port without fixed ipsTakashi Kajinami2021-01-251-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Newton release, Neutron supports ports without fixed ips[1]. This change introduces a new no_fixed_ips property so that we can create an unaddressed port from Heat. [1] https://specs.openstack.org/openstack/neutron-specs/specs/newton/unaddressed-port.html Story: 2008554 Task: 41685 Change-Id: I6f16905155038db44c7e01dd5d34d65032dca061
* | | Merge "Add Vitrage template resource"Zuul2021-03-152-0/+183
|\ \ \
| * | | Add Vitrage template resourceIfat Afek2020-11-162-0/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The VitrageTemplate resource is responsible for adding a Vitrage template. This template can be used, for example, to execute a Mistral healing workflow. Depends-On: If05f0907d8f43f64327c7774170e5b559286fc06 Depends-On: I56560d014a02b5f2ddbc08689d39147fbe4ffca4 Change-Id: Ie862e88ccb82c819b93fa2dbc5f21af61b138046 Story: 2002684 Task: 22504
* | | | Merge "Use resource_id instead of phy rsrc name in InstanceGroup"Zuul2021-03-151-5/+1
|\ \ \ \
| * | | | Use resource_id instead of phy rsrc name in InstanceGroupricolin2020-04-161-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use default resource implementation for get_reference_id in: * OS::Heat::InstanceGroup * OS::Heat::AutoScalingGroup * AWS::AutoScaling::AutoScalingGroup Story: #2007007 Task: #37870 Change-Id: I7fd223a3bde1c5d2ecd073124a25675567e406d2
* | | | | Merge "Switch to collections.abc.*"Zuul2021-03-122-2/+2
|\ \ \ \ \ | |_|_|_|/ |/| | | |
| * | | | Switch to collections.abc.*Stephen Finucane2021-02-012-2/+2
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The abstract base classes previously defined in 'collections' were moved to 'collections.abc' in 3.3. The aliases will be removed in 3.10. Preempt this change now with a simple find-replace: $ ag -l 'collections.($TYPES)' | \ xargs sed -i 's/\(collections\)\.\($TYPES\)/\1.abc.\2/g' Where $TYPES is the list of moved ABCs from [1]. [1] https://docs.python.org/3/library/collections.abc.html Change-Id: Ia282479bb1d466bd2189ebb21b51d91e89b9581e Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | | | Merge "Workaround client race in legacy nested stack delete"Zuul2021-03-113-4/+20
|\ \ \ \
| * | | | Workaround client race in legacy nested stack deleteZane Bitter2019-12-233-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we delete a legacy stack, the delete call may return when a previous delete is still IN_PROGRESS and we are waiting for it to be cancelled - for up to 250s by default plus the time it takes to kill any remaining threads. This means that if the client subsequently sees a DELETE_FAILED status, it can be ambiguous as to whether it refers to the previous delete or the one it just commanded. Work around this when Heat itself is the client (i.e. we are deleting a nested stack). First, put the time the delete started into the status_reason message when the stack goes into the DELETE_IN_PROGRESS state, so that we can distinguish. Then, require the stack to report its status as DELETE_FAILED twice in a row, 10s apart, before we mark it as failed - unless we have definitively seen a different delete commence in the meantime. Change-Id: Ie23ba5f4538a8f5c2e7d64caa6cbe530c013b520 Story: #1669608 Task: 17214
* | | | | Merge "Fix invalid argument formatting in exception messages"Zuul2021-03-112-13/+13
|\ \ \ \ \
| * | | | | Fix invalid argument formatting in exception messageszhufl2020-11-262-13/+13
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | This is to fix the invalid argument formatting in exception messages. Change-Id: I3ed91a4fd22b36815b5cefdd8c9b2fc2a7df4471
* | | | | Merge "Regenerate trust when update with different user"Zuul2021-03-118-11/+143
|\ \ \ \ \
| * | | | | Regenerate trust when update with different userricolin2020-11-178-11/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regenerate trust when update stack with different user We will regenerate (and delete old trust) when user credential doesn't match with current context (means different user is operating). Story: #1752347 Task: #17352 Change-Id: I39795bdbd8ab255150153bf8b1e165b49e1a7027