Ejemplo n.º 1
0
def random_pool_data():
    ns_zone = random_zone_data().name
    data = {
        "name": random_string(),
    }
    ns_records = []
    for i in range(0, 2):
        ns_records.append("ns%s.%s" % (i, ns_zone))
    data["ns_records"] = []

    return PoolModel.from_dict(data)
Ejemplo n.º 2
0
def random_pool_data():
    ns_zone = random_zone_data().name
    data = {
        "name": random_string(),
    }
    ns_records = []
    for i in range(0, 2):
        ns_records.append("ns%s.%s" % (i, ns_zone))
    data["ns_records"] = []

    return PoolModel.from_dict(data)
Ejemplo n.º 3
0
def random_pool_data():
    ns_zone = random_zone_data().name
    data = {
        "name": random_string(),
    }
    records = []
    for i in range(0, 2):
        records.append("ns%s.%s" % (i, ns_zone))
    ns_records = [{"hostname": x, "priority": random.randint(1, 999)}
                  for x in records]
    data["ns_records"] = ns_records

    return PoolModel.from_dict(data)
Ejemplo n.º 4
0
def random_pool_data():
    ns_zone = random_zone_data().name
    data = {
        "name": random_string(),
    }
    records = []
    for i in range(0, 2):
        records.append("ns%s.%s" % (i, ns_zone))
    ns_records = [{"hostname": x, "priority": random.randint(1, 999)}
                  for x in records]
    data["ns_records"] = ns_records

    return PoolModel.from_dict(data)