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)
def list_keys(root=None): etcd = create_etcd(root=root, key_sep='/') for x in etcd.list_items(): print x[0], '=', x[1]
def dump(root=None): etcd = create_etcd(root=root, key_sep='/') d = etcd.as_dict() print yaml.safe_dump(d)