File tree Expand file tree Collapse file tree 3 files changed +22
-9
lines changed
api/openstack/compute/schemas
tests/functional/regressions Expand file tree Collapse file tree 3 files changed +22
-9
lines changed Original file line number Diff line number Diff line change 1111# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
1212# License for the specific language governing permissions and limitations
1313# under the License.
14+
1415import copy
1516
1617from nova .api .validation import parameter_types
2728 'name' : parameter_types .name ,
2829 'policies' : {
2930 # This allows only a single item and it must be one of the
30- # enumerated values. So this is really just a single string
31- # value, but for legacy reasons is an array. We could
32- # probably change the type from array to string with a
33- # microversion at some point but it's very low priority.
31+ # enumerated values. It's changed to a single string value
32+ # in 2.64.
3433 'type' : 'array' ,
35- 'items' : [{
36- 'type' : 'string' ,
37- 'enum' : ['anti-affinity' , 'affinity' ]}],
34+ 'items' : [
35+ {
36+ 'type' : 'string' ,
37+ 'enum' : ['anti-affinity' , 'affinity' ],
38+ },
39+ ],
3840 'uniqueItems' : True ,
41+ 'minItems' : 1 ,
42+ 'maxItems' : 1 ,
3943 'additionalItems' : False ,
4044 }
4145 },
Original file line number Diff line number Diff line change @@ -37,5 +37,4 @@ def test_create_with_empty_policies(self):
3737 client .OpenStackApiException ,
3838 self .api .post_server_groups ,
3939 {'name' : 'test group' , 'policies' : []})
40- # FIXME(stephenfin): This should not be a 500 error
41- self .assertEqual (500 , exc .response .status_code )
40+ self .assertEqual (400 , exc .response .status_code )
Original file line number Diff line number Diff line change 1+ ---
2+ fixes :
3+ - |
4+ Resolved an issue whereby providing an empty list for the ``policies``
5+ field in the request body of the ``POST /os-server-groups`` API would
6+ result in a server error. This only affects the 2.1 to 2.63 microversions,
7+ as the 2.64 microversion replaces the ``policies`` list field with a
8+ ``policy`` string field. See `bug #1894966`__ for more information.
9+
10+ .. __: https://bugs.launchpad.net/nova/+bug/1894966
You can’t perform that action at this time.
0 commit comments