def snapshot(args, test=False):
urlpath = '/VolumeDriver.Snapshot'
param = json.dumps({'Name': args.name[0]})
if test:
resp = TestApp(app).post(urlpath, param)
else:
resp = Session().post(
'http+unix://{}{}'
.format(urllib.parse.quote_plus(SOCKET), urlpath),
param)
res = get_from(resp, 'Snapshot')
if res:
print(res)
return res
评论列表
文章目录