"rpc_client" is not sub-command and should not be in the help for
'cinder-manage volume' command.
Change-Id: Ie94554b3fade09e32269c96fcb4a7d2b91062119
Closes-Bug: #
1498136
def __init__(self):
self._client = None
- def rpc_client(self):
+ def _rpc_client(self):
if self._client is None:
if not rpc.initialized():
rpc.init(CONF)
print(_("Detach volume from instance and then try again."))
return
- cctxt = self.rpc_client().prepare(server=host)
+ cctxt = self._rpc_client().prepare(server=host)
cctxt.cast(ctxt, "delete_volume", volume_id=volume['id'])
@args('--currenthost', required=True, help='Existing volume host name')
mock_rpc_client = get_client.return_value
volume_cmds = cinder_manage.VolumeCommands()
- rpc_client = volume_cmds.rpc_client()
+ rpc_client = volume_cmds._rpc_client()
rpc_initialized.assert_called_once_with()
rpc_init.assert_called_once_with(CONF)