Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1 from y0ug/master

Add rollbackVirtualMachine and getSnapshotConfigVirtualMachine methods
  • Loading branch information...
commit c3903e360c572ef2f8861c2f4c02fe3a9b76d954 2 parents 8e3f3d8 + d6760b7
@Daemonthread authored
Showing with 21 additions and 2 deletions.
  1. +7 −1 README.md
  2. +14 −1 pyproxmox.py
View
8 README.md
@@ -247,6 +247,12 @@ Requires a dictionary of tuples formatted [('postname1','data'),('postname2','da
vncproxyVirtualMachine(node,vmid)
"Creates a VNC Proxy for a virtual machine. Returns JSON"
+
+ rollbackVirtualMachine(node,vmid,snapname)
+"Rollback a snapshot of a virtual machine. Returns JSON"
+
+ getSnapshotConfigVirtualMachine(node,vmid,snapname)
+"Get snapshot config of a virtual machine. Returns JSON"
#### DELETE Methods
@@ -308,4 +314,4 @@ Requires a dictionary of tuples formatted [('postname1','data'),('postname2','da
##### STORAGE
updateStorageConfiguration(storageid,post_data)
-"Update storage configuration"
+"Update storage configuration"
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 c3903e3

Please sign in to comment.
Something went wrong with that request. Please try again.