'Retrieve diagnostics for an instance on this host.'

@object_compat
@wrap_exception()
@wrap_instance_fault
def get_instance_diagnostics(self, context, instance):

    current_power_state = self._get_power_state(context, instance)
    if (current_power_state == power_state.RUNNING):
        LOG.info('Retrieving    diagnostics', instance=instance)
        return self.driver.get_instance_diagnostics(instance)
    else:
        raise exception.InstanceInvalidState(attr='power    state', instance_uuid=instance.uuid, state=power_state.STATE_MAP[instance.power_state], method='get_diagnostics')
