From 417d53bee5d48a3935b18242ec8ca6e60cceca12 Mon Sep 17 00:00:00 2001 From: ypilpre Date: Wed, 11 Sep 2013 09:52:18 +0200 Subject: [PATCH] Update pve2_api.class.php --- pve2_api.class.php | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/pve2_api.class.php b/pve2_api.class.php index 5508e49..01b5848 100755 --- a/pve2_api.class.php +++ b/pve2_api.class.php @@ -341,6 +341,48 @@ public function get_node_list () { return $this->pve_cluster_node_list; } + + /* + Get Last VMID from a Cluster or a Node + + return an VMID + */ + + public function get_next_vmid() { + if (!$this->constructor_success) { + return false; + } + $vmid = $this->pve_action("/cluster/nextid","GET"); + if ($vmid == null) + { + return false; + }else { + return $vmid; + } + + /* + Return the version and minor revision of Proxmox Server + */ + + + public function get_version() { + if (!$this->constructor_success) { + return false; + } + $version = $this->pve_action("/version","GET"); + if ($version == null) + { + return false; + }else { + return $version['version']; + } + + + } + + + + /* * object/array? get (string action_path) */