From 808038053fbaa62dfdef99d10468e6ed77c3d0da Mon Sep 17 00:00:00 2001 From: Szymon Wroblewski Date: Mon, 31 Oct 2016 05:20:12 -0500 Subject: [PATCH] Clean _get_cctxt method signatures rpc.RPCAPI._get_cctxt method had unnecessary host argument. volume.rpcapi.VolumeAPI._get_cctxt allowed to pass version only by named attribute. Change-Id: I105120661bb9043a351888463f35f7c8a6e08621 --- cinder/rpc.py | 2 +- cinder/volume/rpcapi.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cinder/rpc.py b/cinder/rpc.py index 4016e74535c..11de4f0bd67 100644 --- a/cinder/rpc.py +++ b/cinder/rpc.py @@ -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. diff --git a/cinder/volume/rpcapi.py b/cinder/volume/rpcapi.py index 01b7e7dc309..2a0bb3feaee 100644 --- a/cinder/volume/rpcapi.py +++ b/cinder/volume/rpcapi.py @@ -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)