File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -341,6 +341,48 @@ public function get_node_list () {
341341 return $ this ->pve_cluster_node_list ;
342342 }
343343
344+
345+ /*
346+ Get Last VMID from a Cluster or a Node
347+
348+ return an VMID
349+ */
350+
351+ public function get_next_vmid () {
352+ if (!$ this ->constructor_success ) {
353+ return false ;
354+ }
355+ $ vmid = $ this ->pve_action ("/cluster/nextid " ,"GET " );
356+ if ($ vmid == null )
357+ {
358+ return false ;
359+ }else {
360+ return $ vmid ;
361+ }
362+
363+ /*
364+ Return the version and minor revision of Proxmox Server
365+ */
366+
367+
368+ public function get_version () {
369+ if (!$ this ->constructor_success ) {
370+ return false ;
371+ }
372+ $ version = $ this ->pve_action ("/version " ,"GET " );
373+ if ($ version == null )
374+ {
375+ return false ;
376+ }else {
377+ return $ version ['version ' ];
378+ }
379+
380+
381+ }
382+
383+
384+
385+
344386 /*
345387 * object/array? get (string action_path)
346388 */
You can’t perform that action at this time.
0 commit comments