Ensure a security group rule does not exist

    name
        name or id of the security group rule to delete

    rule_id
        uuid of the rule to delete

    project_id
        id of project to delete rule from

def absent(name, auth=None, **kwargs):
    '''
    Ensure a security group rule does not exist

    name
        name or id of the security group rule to delete

    rule_id
        uuid of the rule to delete

    project_id
        id of project to delete rule from
    '''
    rule_id = kwargs['rule_id']
    ret = {'name': rule_id,
           'changes': {},
           'result': True,
           'comment': ''}

    __salt__['neutronng.setup_clouds'](auth)

    secgroup = __salt__['neutronng.security_group_get'](
        name=name,
        filters={'tenant_id': kwargs['project_id']}
    )

    # no need to delete a rule if the security group doesn't exist
    if secgroup is None:
        ret['comment'] = "security group does not exist"
        return ret

    # This should probably be done with compare on fields instead of
    # rule_id in the future
    rule_exists = None
    for rule in secgroup['security_group_rules']:
        if _rule_compare(rule, {"id": rule_id}) is True:
            rule_exists = True

    if rule_exists:
        if __opts__['test']:
            ret['result'] = None
            ret['changes'] = {'id': kwargs['rule_id']}
            ret['comment'] = 'Security group rule will be deleted.'
            return ret

        __salt__['neutronng.security_group_rule_delete'](rule_id=rule_id)
        ret['changes']['id'] = rule_id
        ret['comment'] = 'Deleted security group rule'

    return ret