Esempio n. 1
0
def update_named_zone(zone, zone_type, conf, username):
    return HostGroupConfDal.update_named_zone(zone, zone_type, conf, username)
Esempio n. 2
0
def check_named_zone(zone, conf):
    for group, zone_conf in conf.items():
        HostGroupConfDal.check_zone_conf(group, zone, zone_conf)
Esempio 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)
Esempio n. 4
0
def get_host_group(host_ip):
    return HostGroupConfDal.get_group_by_ip(host_ip)
Esempio n. 5
0
def get_named_zone(zone_name):
    return HostGroupConfDal.get_named_zone(zone_name)
Esempio n. 6
0
def delete_host_group(group_name):
    return HostGroupConfDal.delete_host_group(group_name)
Esempio n. 7
0
def get_host_group(host_ip):
    return HostGroupConfDal.get_group_by_ip(host_ip)
Esempio n. 8
0
def get_named_conf(group_name):
    return HostGroupConfDal.get_named_conf_header(group_name)
Esempio 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)
Esempio 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)
Esempio n. 11
0
def list_host_group():
    return HostGroupConfDal.list_host_group()
Esempio n. 12
0
def update_host_conf_md5(host_ip, host_conf_md5):
    return HostGroupConfDal.update_host_conf_md5(host_ip, host_conf_md5)
Esempio n. 13
0
def update_host_conf_md5(host_ip, host_conf_md5):
    return HostGroupConfDal.update_host_conf_md5(host_ip, host_conf_md5)
Esempio n. 14
0
def get_group_named(group_name):
    return HostGroupConfDal.build_complete_named_conf(group_name)
Esempio n. 15
0
def delete_named_zone(zone, username):
    return HostGroupConfDal.delete_named_zone(zone, username)
Esempio n. 16
0
def update_named_conf(name, conf_content, username):
    return HostGroupConfDal.update_named_conf(name, conf_content, username)
Esempio 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
Esempio 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
Esempio n. 19
0
def get_reload_status(group_name):
    return HostGroupConfDal.get_group_by_name(group_name).reload_status
Esempio n. 20
0
def list_named_zone():
    return HostGroupConfDal.list_named_zone()
Esempio n. 21
0
def get_group_named(group_name):
    return HostGroupConfDal.build_complete_named_conf(group_name)
Esempio n. 22
0
def get_reload_status(group_name):
    return HostGroupConfDal.get_group_by_name(group_name).reload_status