Merge "policy binding update cannot work"

This commit is contained in:
Jenkins
2016-11-08 03:00:31 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 3 deletions

View File

@@ -1288,11 +1288,11 @@ class ShellTest(testtools.TestCase):
args = {
'id': 'C1',
'policy': 'policy1',
'enabled': 'True',
'enabled': True,
}
args = self._make_args(args)
kwargs = {
'enabled': 'True',
'enabled': True,
}
service.cluster_update_policy.return_value = {'action': 'action_id'}

View File

@@ -16,6 +16,7 @@ import threading
import time
from openstack import exceptions as sdk_exc
from oslo_utils import strutils
import six
from senlinclient.common import exc
@@ -1052,7 +1053,7 @@ def do_cluster_policy_update(service, args):
show_deprecated('senlin cluster-policy-update',
'openstack cluster policy binding update')
kwargs = {
'enabled': args.enabled,
'enabled': strutils.bool_from_string(args.enabled, strict=True),
}
resp = service.cluster_update_policy(args.id, args.policy, **kwargs)