Merge "Clean _get_cctxt method signatures"

This commit is contained in:
Jenkins 2016-11-09 00:48:56 +00:00 committed by Gerrit Code Review
commit 41b516234f
2 changed files with 3 additions and 3 deletions

View File

@ -199,7 +199,7 @@ class RPCAPI(object):
return version
return versions[-1]
def _get_cctxt(self, host=None, version=None, **kwargs):
def _get_cctxt(self, version=None, **kwargs):
"""Prepare client context
Version parameter accepts single version string or tuple of strings.

View File

@ -117,10 +117,10 @@ class VolumeAPI(rpc.RPCAPI):
TOPIC = constants.VOLUME_TOPIC
BINARY = 'cinder-volume'
def _get_cctxt(self, host=None, **kwargs):
def _get_cctxt(self, host=None, version=None, **kwargs):
if host is not None:
kwargs['server'] = utils.get_volume_rpc_host(host)
return super(VolumeAPI, self)._get_cctxt(**kwargs)
return super(VolumeAPI, self)._get_cctxt(version, **kwargs)
def create_consistencygroup(self, ctxt, group, host):
cctxt = self._get_cctxt(host)