Ensure infoblox A record is removed.

    State example:

    .. code-block:: yaml

        infoblox_a.absent:
            - name: example-ha-0.domain.com

        infoblox_a.absent:
            - name:
            - ipv4addr: 127.0.23.23

def absent(name=None, ipv4addr=None, **api_opts):
    '''
    Ensure infoblox A record is removed.

    State example:

    .. code-block:: yaml

        infoblox_a.absent:
            - name: example-ha-0.domain.com

        infoblox_a.absent:
            - name:
            - ipv4addr: 127.0.23.23
    '''
    ret = {'name': name, 'result': False, 'comment': '', 'changes': {}}
    obj = __salt__['infoblox.get_a'](name=name, ipv4addr=ipv4addr, allow_array=False, **api_opts)

    if not obj:
        ret['result'] = True
        ret['comment'] = 'infoblox already removed'
        return ret

    if __opts__['test']:
        ret['result'] = None
        ret['changes'] = {'old': obj, 'new': 'absent'}
        return ret

    if __salt__['infoblox.delete_a'](name=name, ipv4addr=ipv4addr, **api_opts):
        ret['result'] = True
        ret['changes'] = {'old': obj, 'new': 'absent'}
    return ret