예제 #1
0
def import_yaml(filename, root=None, depth=2, clear=0):
    depth = int(depth)
    clear = int(clear)
    etcd = create_etcd(root=root)
    if clear==1:
        etcd.clear()
    etcd.import_from_yaml(filename, depth=depth)
예제 #2
0
def list_keys(root=None):
    etcd = create_etcd(root=root, key_sep='/')
    for x in etcd.list_items():
        print x[0], '=', x[1]
예제 #3
0
def dump(root=None):
    etcd = create_etcd(root=root, key_sep='/')
    d = etcd.as_dict()
    print yaml.safe_dump(d)