Exemple #1
0
def libSetCache(attr):
    
    for key,val in attr.items():
        if key not in conf2st:
            continue
        for path,sec,option in conf2st.get(key):
            old_vals = _stget(path, sec, option)
            old_host = old_vals.split(':')[0]
            old_port = old_vals.split(':')[1]
            if 'cache_memcache_host' == key:
                new_vals = ':'.join([val,old_port])
            else:
                new_vals = ':'.join([old_host,val])
            _stset(path, sec, option, new_vals)
Exemple #2
0
def libSetStorage(attr):
    for key, val in attr.items():
        if key not in conf2st:
            continue
        for path, sec, option in conf2st.get(key):
            _stset(path, sec, option, val)
def libSetStorage(attr):
    for key,val in attr.items():
        if key not in conf2st:
            continue
        for path,sec,option in conf2st.get(key):
            _stset(path, sec, option, val)