Updated openstack/openstack
Project: openstack/nova  dd4ed1b9013c5719dc8fca8df291cdfcf31c282b
null
Fix input validation for V2 API server group API extension

The server group extension create method allows the name
parameter to not be a string. The unittest which tests that an integer
passed as the name fails, but this is due to the policies parameter
missing from the test data, not because the name is invalid.

The internal nova code silently converts floats, integers, etc to strings
and so also does not pick up the validation issue.

The patch adds extra input validation to the API layer to pick up this issue
and also tightens the acceptable values of the string to reject trailing
or leading whitespace which if used can cause confusion for users. It uses
the regexp that the other parts of the API are converging towards to use
as a common acceptable name across the API rather than having different
criteria for names for different extensions.

Also ensures input validation is always properly applied to the policies
parameter and adds test cases. This part is backported from this
https://review.openstack.org/#/c/79312/5 patch.

The patch also fixes the broken unittests and adds new ones to test the
tightened criteria for the name parameter.

+DocImpact
Co-authored-by: Gary Kotton <gkotton@vmware.com>
Closes-Bug: 1290326

Change-Id: I9ddaef8a128ac6a1a448e47d6b3c9abcf719eb76
Updated openstack/openstack
Project: openstack/tempest  cd2c782ac1e5024984abca89818b37f76ad0843a
null
cleanup resources in setUpClass if exception raised

Resources created would not be cleanup if exception raised
in setUpClass.

This patch adds a new decorator to wrap setUpClass for
catching the exception in setUpClass and cleanup resources
using tearDownClass().

Use the decorator in the following test classes:
FloatingIPsTestJSON
ImagesMetadataTestJSON
ListServerFiltersTestJSON

Change-Id: Ia20ebd2a5d1b5ecbd5e8b21e51e7c2ee4c99fbd5
Closes-Bug: #1285509