From 37f6675bc5e4cb1f5449fe1f509b310514f603be Mon Sep 17 00:00:00 2001 From: jiansong Date: Wed, 5 Jul 2017 23:26:29 -0700 Subject: [PATCH] Fix a exception error For shrink, if not specified instance_id should throw "Not instances specified for shrink operation." Change-Id: I1aa48d9306873e50e6dd5bb54f624508faac97c6 --- trove/common/strategies/cluster/experimental/mongodb/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trove/common/strategies/cluster/experimental/mongodb/api.py b/trove/common/strategies/cluster/experimental/mongodb/api.py index 87efadddb7..642ee59c0f 100644 --- a/trove/common/strategies/cluster/experimental/mongodb/api.py +++ b/trove/common/strategies/cluster/experimental/mongodb/api.py @@ -307,7 +307,7 @@ class MongoDbCluster(models.Cluster): """ if not len(instances) > 0: raise exception.TroveError( - _('Not instances specified for grow operation.') + _('No instances specified for grow operation.') ) self._prep_resize() self._check_quotas(self.context, instances) @@ -339,7 +339,7 @@ class MongoDbCluster(models.Cluster): """ if not len(instance_ids) > 0: raise exception.TroveError( - _('Not instances specified for grow operation.') + _('No instances specified for shrink operation.') ) self._prep_resize()