示例#1
0
def publishSnapshot(name, container):
    try:
        snapshot = LXCSnapshot({'name': name, 'container': container})
        return response.replySuccess(snapshot.snapshotPublish(), message='Container {} published from {} snapshot successfully.'.format(container, name))
    except ValueError as e:
        return response.replyFailed(message=e.__str__())
示例#2
0
文件: snapshot.py 项目: one2Ter/lxdui
def publishSnapshot(name, container):
    try:
        snapshot = LXCSnapshot({'name': name, 'container': container})
        return response.replySuccess(snapshot.snapshotPublish())
    except ValueError as e:
        return response.replyFailed(message=e.__str__())