Permalink
Browse files

Add rollbackVirtualMachine and getSnapshotConfigVirtualMachine methods

  • Loading branch information...
1 parent 8e3f3d8 commit 10362d5bd15ef4440bc56c3579b573c75b8f2314 @y0ug y0ug committed Jan 10, 2013
Showing with 14 additions and 1 deletion.
  1. +14 −1 pyproxmox.py
View
15 pyproxmox.py
@@ -455,6 +455,19 @@ def vncproxyVirtualMachine(self,node,vmid):
post_data = None
data = self.connect('post',"nodes/%s/qemu/%s/vncproxy" % (node,vmid), post_data)
return data
+
+ def rollbackVirtualMachine(self,node,vmid,snapname):
+ """Rollback a snapshot of a virtual machine. Returns JSON"""
+ post_data = None
+ data = self.connect('post',"nodes/%s/qemu/%s/snapshot/%s/rollback" % (node,vmid,snapname), post_data)
+ return data
+
+ def getSnapshotConfigVirtualMachine(self,node,vmid,snapname):
+ """Get snapshot config of a virtual machine. Returns JSON"""
+ post_data = None
+ data = self.connect('get',"nodes/%s/qemu/%s/snapshot/%s/config" % (node,vmid,snapname), post_data)
+ return data
+
"""
Methods using the DELETE protocol to communicate with the Proxmox API.
@@ -556,4 +569,4 @@ def updateStorageConfiguration(self,storageid,post_data):
data = self.connect('put',"storage/%s" % (storageid), post_data)
return data
-
+

0 comments on commit 10362d5

Please sign in to comment.