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