'Return a conjunction ID specified by the arguments.
Allocate one if necessary.  The returned ID is always an even
number, allowing the caller to use 2 IDs for each combination.'

def get_conj_id(self, sg_id, remote_sg_id, direction, ethertype):

    if (direction not in [firewall.EGRESS_DIRECTION, firewall.INGRESS_DIRECTION]):
        raise ValueError(("Invalid    direction    '%s'" % direction))
    if (ethertype not in [lib_const.IPv4, lib_const.IPv6]):
        raise ValueError(("Invalid    ethertype    '%s'" % ethertype))
    return self.id_map[(sg_id, remote_sg_id, direction, ethertype)]
