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 11
11
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12
12
# License for the specific language governing permissions and limitations
13
13
# under the License.
14
+
14
15
import copy
15
16
16
17
from nova .api .validation import parameter_types
27
28
'name' : parameter_types .name ,
28
29
'policies' : {
29
30
# 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.
34
33
'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
+ ],
38
40
'uniqueItems' : True ,
41
+ 'minItems' : 1 ,
42
+ 'maxItems' : 1 ,
39
43
'additionalItems' : False ,
40
44
}
41
45
},
Original file line number Diff line number Diff line change @@ -37,5 +37,4 @@ def test_create_with_empty_policies(self):
37
37
client .OpenStackApiException ,
38
38
self .api .post_server_groups ,
39
39
{'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