cluster_resize with capacity is 0
Depends-On: https://review.openstack.org/640482/ Change-Id: Ie142219f785a7f722763982ccd445aadc2a15d10 Closes-Bug: #1817884
This commit is contained in:
parent
e4fbf8d86f
commit
f52ac6fb7e
|
@ -1213,9 +1213,9 @@ class EngineService(service.Service):
|
|||
raise exception.BadRequest(msg=msg)
|
||||
|
||||
if (req.adjustment_type == consts.EXACT_CAPACITY and
|
||||
req.number <= 0):
|
||||
msg = _("The 'number' must be positive integer for adjustment "
|
||||
"type '%s'.") % adj_type
|
||||
req.number < 0):
|
||||
msg = _("The 'number' must be non-negative integer "
|
||||
"for adjustment type '%s'.") % adj_type
|
||||
raise exception.BadRequest(msg=msg)
|
||||
|
||||
if adj_type == consts.CHANGE_IN_PERCENTAGE:
|
||||
|
|
|
@ -1137,7 +1137,7 @@ class ClusterTest(base.SenlinTestCase):
|
|||
self.ctx, req.obj_to_primitive())
|
||||
|
||||
self.assertEqual(exc.BadRequest, ex.exc_info[0])
|
||||
self.assertEqual("The 'number' must be positive integer for "
|
||||
self.assertEqual("The 'number' must be non-negative integer for "
|
||||
"adjustment type 'EXACT_CAPACITY'.",
|
||||
six.text_type(ex.exc_info[1]))
|
||||
|
||||
|
|
Loading…
Reference in New Issue