'Retrieve the power state for the given instance.'

def _get_power_state(self, context, instance):

    LOG.debug('Checking    state', instance=instance)
    try:
        return self.driver.get_info(instance).state
    except exception.InstanceNotFound:
        return power_state.NOSTATE
