When implementing the base driver "get_volume_stats" function, not all
drivers implemented 'refresh' as a kwarg. This can cause failures for any
code that simply invokes the following (assuming that refresh will default
to False -- which is does for 50+ drivers):
driver.get_volume_stats()
This patch set updates the 7 drivers that did not implement refresh as a
kwarg so that the various driver implementations are consistent.
Closes-bug:
1423357
Change-Id: I6520155d1cbde4bf41573c170f4ea81815b5c1c2
return iscsi_ports
- def get_volume_stats(self, refresh):
+ def get_volume_stats(self, refresh=False):
if refresh:
self._update_volume_stats()
'san_ip', 'san_login', 'san_password']
common.check_flags(self.configuration, required_flags)
- def get_volume_stats(self, refresh):
+ def get_volume_stats(self, refresh=False):
common = self._login()
try:
stats = common.get_volume_stats(refresh)
'san_password']
common.check_flags(self.configuration, required_flags)
- def get_volume_stats(self, refresh):
+ def get_volume_stats(self, refresh=False):
common = self._login()
try:
stats = common.get_volume_stats(refresh)
cliq_args['serverName'] = connector['host']
self._cliq_run_xml("unassignVolumeToServer", cliq_args)
- def get_volume_stats(self, refresh):
+ def get_volume_stats(self, refresh=False):
if refresh:
self._update_backend_status()
"""Unassign the volume from the host."""
self.proxy.terminate_connection(volume, connector)
- def get_volume_stats(self, refresh):
+ def get_volume_stats(self, refresh=False):
data = self.proxy.get_volume_stats(refresh)
data['driver_version'] = self.VERSION
return data
finally:
self._logout(client)
- def get_volume_stats(self, refresh):
+ def get_volume_stats(self, refresh=False):
"""Gets volume stats."""
client = self._login()
try:
return
raise exception.Invalid(ex)
- def get_volume_stats(self, refresh):
+ def get_volume_stats(self, refresh=False):
if refresh:
self._update_volume_stats()