'Generic implementation of the absent state for the OneView resources.
It checks if the resource needs to be removed.
:arg dict resource: Resource to delete.
:arg str method: Function of the OneView client that will be called for resource deletion.
Usually delete or remove.
:return: A dictionary with the expected arguments for the AnsibleModule.exit_json'

def resource_absent(self, resource, method='delete'):

    if resource:
        getattr(self.resource_client, method)(resource)
        return {'changed': True, 'msg': self.MSG_DELETED}
    else:
        return {'changed': False, 'msg': self.MSG_ALREADY_ABSENT}
