summaryrefslogtreecommitdiff
path: root/heat/tests
Commit message (Collapse)AuthorAgeFilesLines
* Use Block Storage API v3 instead of API v2stable/ussuriTakashi Kajinami2021-08-254-16/+9
| | | | | | | | | | | | | | | | | | | | | | | | | 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/victoria. Also, changes to use fedora 33 for tests. Depends-on: https://review.opendev.org/802150/ Change-Id: I6a2b5afa13480791971bbd8bba1f43b9f2db8294 (cherry picked from commit 1828df32fa946d49d8449ff1d8a26c05b3990a65) Move testing to Fedora 33 Now that the gate is unblocked, we can also test F33 for gating purposes here. Change-Id: Ie1c9075623d85b27aaf1ac67a3063e219726bc6f (cherry picked from commit 6a9c35d89804057b56e1b0b995265ce3eb68129d)
* Preserve order in list_concat_uniqueussuri-em14.2.0ramishra2021-04-271-1/+1
| | | | | | | | | | Also, we should not modify a list when iterating over it. Task: 42359 Closes-Bug: #1925373 Change-Id: Iaa2c05b4155d93f44de60b6f98a69450c1512817 (cherry picked from commit a8f8528d1ea1952cf76bd09fd27cbd65a978af65)
* Don't update status for replaced resourceramishra2021-04-041-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 (cherry picked from commit bfbaab107d709c37548a22239b952c6221b9ac85)
* As of nova microversion 2.57, personality is deprecatedDavid Hill2020-11-171-0/+40
| | | | | | | | | | | This patch returns a stack validation error if the nova microversion is 2.57 or greater and the personality parameter is also specified in the templates. Change-Id: I0919150baa36112ccbd8bfd7ccebc7aab5735cf3 Task: 41229 (cherry picked from commit b068f45adda72fa12f50008a603c8f37fcabcdff) (cherry picked from commit 3f98fd9b1dfadf0390cc8bef9f42d08840b34840)
* Merge "Lazily cache parsed value of list/json parameters" into stable/ussuriZuul2020-10-131-2/+2
|\
| * Lazily cache parsed value of list/json parametersZane Bitter2020-09-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parsing the value of JSON parameters at the time we create them (or update the default value) results in exceptions occurring while creating the Stack object, that are then not caught and transformed. The result is an HTTP 500 Internal Error reported by the API, with an unhelpful error message. By not parsing the JSON until it is needed, we ensure that any errors will occur during validation, where errors are appropriately transformed (to StackValidationFailed) and annotated with the necessary information to help the user determine the source. Change-Id: I70e341c344d6254173ad4519276626230087263a Story: 2007957 Task: 40443 (cherry picked from commit b603470a1207fcbc9ee30f3a3b4b457a9f83a03a)
* | Supports 'virtio-forwarder' vnic type for portEmilien Macchi2020-10-071-0/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Supports the 'virtio-forwarder' vnic type for port sync with Neutron. The 'virtio-forwarder' is an indirect mode for SR-IOV interfaces used to connect the instances into the Neutron networks. It has been supported since the Queens release: I28315fb12f62dc7d52d099c211086b2b81eca39a Note that 'virtio-forwarder' is already supported by Horizon: openstack_dashboard/api/neutron.py: ('virtio-forwarder', _('Virtio Forwarder')) Nova: nova/network/model.py: VNIC_TYPE_VIRTIO_FORWARDER = 'virtio-forwarder' openstackclient: openstackclient/network/v2/port.py: choices=(...), virtio-forwarder neutron-lib: neutron_lib/api/definitions/portbindings.py VNIC_VIRTIO_FORWARDER = 'virtio-forwarder' Task: 40435 Change-Id: Ie65f8858d6d1a1854702eb33c40ea827505bfe51 (cherry picked from commit 03ab18d4599183d13dceb6d1130358f717197136)
* Check external resources after creationZane Bitter2020-07-232-0/+15
| | | | | | | | | | | | | | | The method Resource.check() is not a generator function, but it does return a generator in most cases. Simply calling the function does not cause the resource to actually be checked. Only in the case where the resource did not provide a handle_check() method would it do anything at all - and in that case it simply changes the state to CHECK_COMPLETE. Yield the generator function so that the resource will actually be checked if the resource type supports it. Change-Id: I2a78b6f6235529a95838307e3d38731d31ff5c4b Task: 37828 (cherry picked from commit 5c6038f7a272238eef8978a4b26ab4ae4efd745b)
* Merge "Allow scale-down of ASG as part of update" into stable/ussuriZuul2020-07-152-33/+37
|\
| * Allow scale-down of ASG as part of updateRabi Mishra2020-05-292-33/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When user wants to do manual scale-up of ASG by increasing the desired_capacity and also update some member properties as part of a stack update, if it fails due to insufficient resources when resizing, trying to manually scale-down by decreasing the desired_capacity won't work, as it would always expect to update the group with the earlier size before scaling down. This patch uses the target_size when building the batches. Task: 39867 Change-Id: Id851530b424f68b5e0e967fe34431483bfffd852 (cherry picked from commit 26d8f64fc90ed9b3ad0413ed0c932fb91b51d666)
* | Merge "Check for nova exception.Conflict rather than task_state" into ↵Zuul2020-07-141-4/+8
|\ \ | | | | | | | | | stable/ussuri
| * | Check for nova exception.Conflict rather than task_stateRabi Mishra2020-07-011-4/+8
| |/ | | | | | | | | | | | | | | | | | | When detaching and attaching volumes nova would raise an exception.Conflict, if attach and detach can't happen. Let's use that to retry rather than using task_state. Change-Id: I50904e4254568cd807b9ff18eef482cadb626ce5 Task: 40169 (cherry picked from commit 01c230e793043310614d5b88096476ce0eac2c78)
* | Use never expiring alarm_url for resource attributesRabi Mishra2020-06-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't use timestamp when generating ec2 signed url for alarm url attributes of resource. This will resolve the issue for new resources even if they are cached in attributes or resource_data. However, for existing stacks containing these resources the current best option is to not cache these attributes and allow alarm resources to be able to get a new never expiring urls in the next forced update. Change-Id: If2ebc3deacb770294004ae023500367af603b59e Task: 39985 Related-Bug: #1872737 (cherry picked from commit d0e44ded0a07cfe6b3413693d79c7f1f67b27701)
* | Don't store signal_url for ec2 signaling of deploymentsRabi Mishra2020-06-254-6/+16
|/ | | | | | | | | | | | | | | | | | | As part of a CVE keystone has started checking[1] the timestamp of signed ec2 token with default TTL of 15 mins. We can't store the ec2 url anymore for future use for those. This moves the caching logic to BaseWaitConditionHandle class. Conflicts: heat/engine/resources/signal_responder.py heat/tests/test_signal.py [1] https://review.opendev.org/#/c/724124/ Change-Id: I6b74faed820caccd39210bd48a212b2dedca46b9 Task: 39985 Related-Bug: #1872737 (cherry picked from commit 3047ca7d36baaa59ab2960602da956d2087a2a62)
* Merge "New resource OS::Neutron::QoSMinimumBandwidthRule"14.0.0.0rc114.0.0Zuul2020-04-271-0/+123
|\
| * New resource OS::Neutron::QoSMinimumBandwidthRuleBence Romsics2020-04-271-0/+123
| | | | | | | | | | | | | | | | The 'minimum_bandwidth_rule' QoS rule type of Neutron (supported in both egress and ingress directions since the Stein release) did not have a Heat resource yet. This change adds it. Change-Id: I693fe2f7801f78f827ef1c74e5874018cd9cf51b
* | Add Ironic Port resource type supportricolin2020-04-261-0/+275
|/ | | | | Change-Id: If6b1d77d055b9a3803e50563a4f41c2dcdcb1f31 Task: 36286
* Merge "Remove six and python 2.7 full support"Zuul2020-04-231-6/+9
|\
| * Remove six and python 2.7 full supportHervé Beraud2020-04-221-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Six is in use to help us to keep support for python 2.7. Since the ussuri cycle we decide to remove the python 2.7 support so we can go ahead and also remove six usage from the python code. Review process and help ----------------------- Removing six introduce a lot of changes and an huge amount of modified files To simplify reviews we decided to split changes into several patches to avoid painful reviews and avoid mistakes. To review this patch you can use the six documentation [1] to obtain help and understand choices. Additional informations ----------------------- Changes related to 'six.b(data)' [2] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ six.b [2] encode the given datas in latin-1 in python3 so I did the same things in this patch. Latin-1 is equal to iso-8859-1 [3]. This encoding is the default encoding [4] of certain descriptive HTTP headers. I suggest to keep latin-1 for the moment and to move to another encoding in a follow-up patch if needed to move to most powerful encoding (utf8). HTML4 support utf8 charset and utf8 is the default charset for HTML5 [5]. Note that this commit message is autogenerated and not necesserly contains changes related to 'six.b' [1] https://six.readthedocs.io/ [2] https://six.readthedocs.io/#six.b [3] https://docs.python.org/3/library/codecs.html#standard-encodings [4] https://www.w3schools.com/charsets/ref_html_8859.asp [5] https://www.w3schools.com/html/html_charset.asp Patch 4 of a serie of 28 patches Change-Id: I871c2dad10abc35790e730c7c4c5272f499b7623
* | Merge "Remove six and python 2.7 full support"Zuul2020-04-231-2/+0
|\ \ | |/
| * Remove six and python 2.7 full supportHervé Beraud2020-04-221-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Six is in use to help us to keep support for python 2.7. Since the ussuri cycle we decide to remove the python 2.7 support so we can go ahead and also remove six usage from the python code. Review process and help ----------------------- Removing six introduce a lot of changes and an huge amount of modified files To simplify reviews we decided to split changes into several patches to avoid painful reviews and avoid mistakes. To review this patch you can use the six documentation [1] to obtain help and understand choices. Additional informations ----------------------- Changes related to 'six.b(data)' [2] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ six.b [2] encode the given datas in latin-1 in python3 so I did the same things in this patch. Latin-1 is equal to iso-8859-1 [3]. This encoding is the default encoding [4] of certain descriptive HTTP headers. I suggest to keep latin-1 for the moment and to move to another encoding in a follow-up patch if needed to move to most powerful encoding (utf8). HTML4 support utf8 charset and utf8 is the default charset for HTML5 [5]. Note that this commit message is autogenerated and not necesserly contains changes related to 'six.b' [1] https://six.readthedocs.io/ [2] https://six.readthedocs.io/#six.b [3] https://docs.python.org/3/library/codecs.html#standard-encodings [4] https://www.w3schools.com/charsets/ref_html_8859.asp [5] https://www.w3schools.com/html/html_charset.asp Patch 3 of a serie of 28 patches Change-Id: If6e66839c128dde5fb80d90155dedb598da8d53b
* | Merge "Add group property for OS::Heat::MultipartMime"Zuul2020-04-221-3/+11
|\ \ | |/ |/|
| * Add group property for OS::Heat::MultipartMimericolin2020-01-221-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | Add ``group`` property to ``OS::Heat::MultipartMime``. This allow you to set group for entire multipart cofig resource like ``group`` property in ``OS::Heat::SoftwareConfig``. Aware that, you must make sure all configs in MultipartMime works with ``group``. Default value is ``Heat::Ungrouped``. Change-Id: I7e4d3a5e5631ae7bd0d5ebdac810ce04a4c98d4a Story: #2002683 Task: #22502
* | Merge "Fix hacking warnings"Zuul2020-04-1812-37/+41
|\ \
| * | Fix hacking warningsAndreas Jaeger2020-04-1612-37/+41
| | | | | | | | | | | | | | | | | | Fix some warnings found by hacking and enable them again. Change-Id: Ia09de4d0fda752a009b9246b4e6d485601cd9562
* | | Merge "Filter by project id in list_security_groups"Zuul2020-04-162-23/+2
|\ \ \ | |/ / |/| |
| * | Filter by project id in list_security_groupsPavlo Shchelokovskyy2020-04-082-23/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this utilizes server-side filtering and makes requests issued on behalf of admin user (who otherwise sees all SGs) much faster, avoiding unnecessary failures due to timeouts. Change-Id: Ifdceb855affcfccb07dbe415ee4b140d3a0355ee Story: 2007473 Task: 39168
* | | Add ironic client plugin supportricolin2020-04-092-0/+77
|/ / | | | | | | | | Change-Id: I2f3ee94424c4dab75fbcef6f8b32e565b45684e4 Task: 36285
* | Merge "Add Octavia Quota Resource for lbaas quota parameters"Zuul2020-03-121-0/+140
|\ \
| * | Add Octavia Quota Resource for lbaas quota parametersHaider, Nafiz (nh532m)2020-03-061-0/+140
| | | | | | | | | | | | Change-Id: Ib6423b9f14beefd3daf5ac5f516b49cdd9fa0a00
* | | Support allowed_cidrs for Octavia listenerFeilong Wang2020-03-072-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support ``allowed_cidrs`` property for the resource ``OS::Octavia::Listener``, the property is allowed to be updated as well. The property 'allowed_cidrs' was introduced in Octavia since Train release. The default value is empty list if it is not specified in Heat template. Task: 38952 Story: 2007378 Change-Id: I9d38716b236b0782f0d09097b7a0f615fe5be041
* | | Merge "Split 'action' policy into more granular controls"Zuul2020-03-041-14/+8
|\ \ \
| * | | Split 'action' policy into more granular controlsZane Bitter2019-10-291-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow operators to specify different policies for each action, since each action is quite different in character. The previous "actions:action" rule remains and is the default for each of the new rules, so there is no effect on existing policies and no action required by the operator unless they want to take advantage of the additional flexibility. Change-Id: Ic4985e8637bc4f34ea2514075b30d2ec32f3441c Task: 37296
* | | | Merge "Allow tags to be removed with update --existing"Zuul2020-03-031-0/+10
|\ \ \ \ | |_|/ / |/| | |
| * | | Allow tags to be removed with update --existingZane Bitter2019-10-101-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When updating a stack using the PATCH method (i.e. passing --existing on the command line), the existing tags are kept unless otherwise specified. However, while it was possible to set a new set of tags on such an update, it was not possible to remove all of the tags because an empty string was treated the same as None or a missing tags key (both of which are treated as no change). When the user explicitly requests an empty tags list (by passing ''), honour that request. Note that while None is treated the same as a missing key, in practice the API never sends us a value of None; the key is never sent to the engine if the user passes null to the API. The input string is split by the API so the engine receives data with the key then the value is always a Python list. Change-Id: I6ae355b0a8af017c7a9145c9483c1ad3f2ac5ca5 Task: 37010
* | | | Merge "Make tags handling more robust"Zuul2020-02-253-4/+5
|\ \ \ \ | |/ / /
| * | | Make tags handling more robustZane Bitter2019-10-103-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid loading the tags from the DB and then re-saving every time the stack is stored when the stack has tags. Avoid attempting to lazy-load the tags from the DB multiple times when there are no tags. Avoid lazy-loading the existing tags on an update when we intend to overwrite them anyway. Avoid writing the same set of tags multiple times. e.g. in a legacy update, previously we rewrote the current set of tags when changing the state to IN_PROGRESS, then wrote the new set of tags regardless of whether they had changed, then wrote the new set of tags again when the update completed. In a convergence update we also did three writes but in a different order, so that the new tags were written every time. With this change we write the new set of tags only once. This could also have prevented stacks with tags from being updated from legacy to convergence, because the (unchanged) tag list would get rewritten from inside a DB transaction. This is not expected so the stack_tags_set() API does not pass subtransactions=True when creating a transaction, which would cause a DB error. Change-Id: Ia52818cfc9479d5fa6e3b236988694f47998acda Task: 37001
* | | | Merge "Handle OS::Mistral::Workflow resource replacement properly"Zuul2020-02-251-20/+66
|\ \ \ \
| * | | | Handle OS::Mistral::Workflow resource replacement properlyRabi Mishra2020-02-251-20/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OS::Mistral::Workflow resource creates a mistral workflow with a unique name (resource_id). We replace FAILED resources by default and replace wont work in this case as it will try to use the same workflow name for the replacement resouce, if the 'name' property is provided. If the workflow does not exist/deleted using mistral api directly, it would create a replacement resource, but it would delete the workflow when cleaning up the old resource. So we would endup with a replacement resource without any backing workflow. This adds a new resource attribute ``always_replace_on_check_failed`` and overrides needs_replace_failed() for OS::Mistral::Workflow. Task: 38855 Change-Id: Ia0812b88cae363dfa25ccd907ecbe8b86f5b1a23
* | | | | Support handling empty string for volume AZFeilong Wang2020-02-241-0/+23
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building a complex stack, instance and volume are both necessary. But the support of AZ in Nova and Cinder are slightly different which is causing troubles to build the Heat template. Without setting, the property availability_zone of volume always got "", an empty string, instead of None. As a result, Cinder will return 400 BadRequest error. This patch will turn the empty string into None, to make sure Cinder can correctly handle the scenario when availability_zone of volume is not set. Task: 38853 Story: 2007330 Change-Id: Ib5bddf12ca63849a030d1d579d0a2e853e8b848a
* | | | Merge "Check task_state of instance before volume actions"Zuul2020-02-203-0/+225
|\ \ \ \
| * | | | Check task_state of instance before volume actionsricolin2019-12-263-0/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check task_state before verify resize or before detachment. We need to make sure the task_state moved out from resize_finish before we trigger some action like attach/detach volume. So when we update flvor and volume at the samethime, the resize action will not affect volume attachment/detachment. Depends-On: https://review.opendev.org/#/c/700512/ Change-Id: I64033d5a0a8fea5c4fd93b1deb111d3d8fba0cf7 Story: #2007042 Task: #37854 Task: #37855 Task: #37869
* | | | | Merge "Avoid dynamic import from monasca client"Zuul2020-02-201-4/+1
|\ \ \ \ \
| * | | | | Avoid dynamic import from monasca clientricolin2020-02-191-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I113a773076b2c687be0b7c88bf547b854a7d2f9a
* | | | | | Merge "Make properties updatable for IKE policy of VPNaaS"Zuul2020-02-191-8/+17
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | Make properties updatable for IKE policy of VPNaaShuangtianhua2020-02-191-8/+17
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow to update properties for IKE policy of VPNaaS. Change-Id: Id0e50b5757a17c99c9d91761bd600e9e83d75ed1 Task: 17216
* | | | | Merge "Improve handle_delete/check_delete_complete for resources"Zuul2020-02-141-5/+9
|\ \ \ \ \
| * | | | | Improve handle_delete/check_delete_complete for resourceshuangtianhua2019-12-231-5/+9
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If resource is not found in handle_delete, no need to get the resource again in check_delete_complete. Change-Id: Ib2ac05e4f89fe8eb159e4cb871828ce07bd03089
* | | | | Merge "[S2007072] Enables case insensitive user name search."Zuul2020-02-141-13/+9
|\ \ \ \ \
| * | | | | [S2007072] Enables case insensitive user name search.Sampat P2020-02-131-13/+9
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task: 37963 If heat templates use keystone user name in a case different from the case in which the user name is stored in keystone DB Heat stack creates fails. This change adds an option to heat engine to enable case insensitive user name search. Change-Id: I8e5cb027beebce39921d336fb3845125b0efc5bc