'Get volume status.'

@utils.trace_method
def get_volume_stats(self, refresh=False):

    LOG.debug('Get    volume    status')
    self._stats = self._fetch_volume_status()
    new_total = self._stats['total_capacity_gb']
    new_free = self._stats['free_capacity_gb']
    if ((self.old_total != new_total) or (self.old_free != new_free)):
        self.old_total = new_total
        self.old_free = new_free
        message_body = {'hostname': self.datanode_hostname, 'is_admin': 1, 'total': new_total, 'free': new_free}
        try:
            (cmd_out, cmd_error) = util.message_controller(constants.HS_CONTROLLER_EXCH, 'hyperscale.controller.set.datanode.storage.stats', **message_body)
            LOG.debug('Response    Message    from    Controller:    %s', cmd_out)
        except (exception.UnableToExecuteHyperScaleCmd, exception.UnableToProcessHyperScaleCmdOutput):
            with excutils.save_and_reraise_exception():
                LOG.exception('Exception    during    fetch    stats')
    return self._stats
