Exemplo n.º 1
0
def update_named_zone(zone, zone_type, conf, username):
    return HostGroupConfDal.update_named_zone(zone, zone_type, conf, username)
Exemplo n.º 2
0
def check_named_zone(zone, conf):
    for group, zone_conf in conf.items():
        HostGroupConfDal.check_zone_conf(group, zone, zone_conf)
Exemplo n.º 3
0
def add_named_zone(zone, zone_type, conf, add_header, username):
    return HostGroupConfDal.add_named_zone(zone, zone_type, conf, add_header,
                                           username)
Exemplo n.º 4
0
def get_host_group(host_ip):
    return HostGroupConfDal.get_group_by_ip(host_ip)
Exemplo n.º 5
0
def get_named_zone(zone_name):
    return HostGroupConfDal.get_named_zone(zone_name)
Exemplo n.º 6
0
def delete_host_group(group_name):
    return HostGroupConfDal.delete_host_group(group_name)
Exemplo n.º 7
0
def get_host_group(host_ip):
    return HostGroupConfDal.get_group_by_ip(host_ip)
Exemplo n.º 8
0
def get_named_conf(group_name):
    return HostGroupConfDal.get_named_conf_header(group_name)
Exemplo n.º 9
0
def update_group_reload_status(group_name, reload_status):
    if not HostGroupConfDal.update_group_reload_status(group_name,
                                                       reload_status):
        raise BadParam('No such group', msg_ch=u'没有主机组:%s' % group_name)
Exemplo n.º 10
0
def add_host(group_name, host_name, host_ip):
    HostGroupConfDal.check_host(host_name, host_ip)
    return HostGroupConfDal.add_host(group_name, host_name, host_ip)
Exemplo n.º 11
0
def list_host_group():
    return HostGroupConfDal.list_host_group()
Exemplo n.º 12
0
def update_host_conf_md5(host_ip, host_conf_md5):
    return HostGroupConfDal.update_host_conf_md5(host_ip, host_conf_md5)
Exemplo n.º 13
0
def update_host_conf_md5(host_ip, host_conf_md5):
    return HostGroupConfDal.update_host_conf_md5(host_ip, host_conf_md5)
Exemplo n.º 14
0
def get_group_named(group_name):
    return HostGroupConfDal.build_complete_named_conf(group_name)
Exemplo n.º 15
0
def delete_named_zone(zone, username):
    return HostGroupConfDal.delete_named_zone(zone, username)
Exemplo n.º 16
0
def update_named_conf(name, conf_content, username):
    return HostGroupConfDal.update_named_conf(name, conf_content, username)
Exemplo n.º 17
0
def add_host_group():
    params = request.get_json(force=True)
    group_name, group_type, hosts = _check_and_format_params(
        params['group_name'], params['hosts'])
    HostGroupConfDal.add_host_group(group_name, group_type, hosts)
    return group_name, hosts
Exemplo n.º 18
0
def get_host_group():
    group = []
    for item in HostGroupConfDal.list_host_group():
        if item['has_conf']:
            group.append({'group_name': item['group_name']})
    return group
Exemplo n.º 19
0
def get_reload_status(group_name):
    return HostGroupConfDal.get_group_by_name(group_name).reload_status
Exemplo n.º 20
0
def list_named_zone():
    return HostGroupConfDal.list_named_zone()
Exemplo n.º 21
0
def get_group_named(group_name):
    return HostGroupConfDal.build_complete_named_conf(group_name)
Exemplo n.º 22
0
def get_reload_status(group_name):
    return HostGroupConfDal.get_group_by_name(group_name).reload_status