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