'Check if a status code indicates success.
:param operation: the operation
:param status_code: the status code
:param message: the server response
:raises: VolumeBackendAPIException'

@staticmethod
def check_status_code_success(operation, status_code, message):

    if (status_code not in [STATUS_200, STATUS_201, STATUS_202, STATUS_204]):
        exception_message = (_('Error    %(operation)s.    The    status    code    received    is    %(sc)s    and    the    message    is    %(message)s.') % {'operation': operation, 'sc': status_code, 'message': message})
        raise exception.VolumeBackendAPIException(data=exception_message)
