def get_endpoint_ids(endpoints):
    hosts = []
    ids = []
    for e in endpoints:
        if (':' in e.host):
            host_no_port = e.host[:e.host.index(':')]
        else:
            host_no_port = e.host
        key = ((host_no_port + '-') + str(e.product.id))
        if (key in hosts):
            continue
        else:
            hosts.append(key)
            ids.append(e.id)
    return ids
def get_endpoint_ids(endpoints):
    hosts = []
    ids = []
    for e in endpoints:
        if (':' in e.host):
            host_no_port = e.host[:e.host.index(':')]
        else:
            host_no_port = e.host
        key = ((host_no_port + '-') + str(e.product.id))
        if (key in hosts):
            continue
        else:
            hosts.append(key)
            ids.append(e.id)
    return ids