Closed zaibon closed 5 years ago
needs to be proper JSX client
Duplicate of #577
Accessible through j.clients.zstor
and takes the following params:
verified
root@3bot:/# /root/go/bin/zstor -D --config aConfigFile.yaml daemon --listen 127.0.0.1:8000
DEBU[0000] Debug logging enabled
INFO[0000] Version: 1.1.0-beta-3
INFO[0000] Daemon Server interface: grpc
root@3bot:/# kosmos
JSX> j.servers.zdb.default.start()
no server running on /tmp/tmux-0/default
no server running need to start
++ '[' start == kill ']'
++ tmux -f /sandbox/cfg/.tmux.conf has-session
no server running on /tmp/tmux-0/default
++ '[' 1 -eq 1 ']'
++ echo 'no server running need to start'
++ tmux -f /sandbox/cfg/.tmux.conf new -s main -d 'bash --rcfile /sandbox/bin/env_tmux_detach.sh'
++ '[' start '!=' start ']'
main: 1 windows (created Thu Aug 22 10:11:29 2019) [80x24]
JSX>
JSX> zdb = j.clients.zstor.get("test",ip="127.0.0.1",port=8000)
JSX> zdb.write_file('/sandbox/code/test.py')
[chunkSize: 65
objects {
key: "\000\000\000\000"
shardID: "127.0.0.1:9900"
}
hash: "XO\266\324\200\377D\227V\3163h\202\324}L(1\006}.\032\347\375\354L\321w\270h\006["
]
JSX> x = zdb.write_file('/sandbox/code/test.py')
JSX> zdb.read(x)
b'just for test flis\n'
- js version
3BOTDEVEL:3bot:jumpscaleX: git log -1 commit 9f1a4a8d397fdc8e4472bce86580a1739e38cfa6 (HEAD -> development_jumpscale, origin/development_jumpscale) Author: kristof de spiegeleer <> Date: Thu Aug 22 10:00:06 2019 +0200
BCDB fix (I think) for parent_id issue
In order to finish https://github.com/threefoldtech/home/issues/343 We need to integrate the 0-stor daemon python client into JSx.
The python client is available at: https://github.com/threefoldtech/0-stor/tree/master/daemon/client/py-client