2017 © Pedro Peláez
 

library proxmox

image

sapistudio/proxmox

  • Friday, June 15, 2018
  • by maharbig
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 33 % Grown

The README.md

Proxmox API Client

fork after : https://github.com/ZzAntares/ProxmoxVE.git, (*1)

This PHP 5.4+ library allows you to interact with your Proxmox server via API., (*2)

Installation

Recommended installation is using [Composer], if you do not have [Composer] what are you waiting?, (*3)

In the root of your project execute the following:, (*4)

$ composer require sapistudio/proxmox

Usage

<?php

// Require the autoloader
require_once 'vendor/autoload.php';

// Use the library namespace
use SapiStudio\Proxmox\Handler;

// Create your credentials array
$credentials = [
    'hostname' => 'proxmox.server.com',  // Also can be an IP
    'username' => 'root',
    'password' => 'secret',
];

// realm and port defaults to 'pam' and '8006' but you can specify them like so
$credentials = [
    'hostname' => 'proxmox.server.com',
    'username' => 'root',
    'password' => 'secret',
    'realm' => 'pve',
    'port' => '9009',
];

// Then simply pass your credentials when creating the API client object.
$proxmox = Handler::Nodes($credentials);

$allNodes = $proxmox->listNodes();

print_r($allNodes);

Sample output:, (*5)

Array
(
    [data] => Array
        (
            [0] => Array
                (
                    [disk] => 2539465464
                    [cpu] => 0.031314446882002
                    [maxdisk] => 30805066770
                    [maxmem] => 175168446464
                    [node] => mynode1
                    [maxcpu] => 24
                    [level] =>
                    [uptime] => 139376
                    [id] => node/mynode1
                    [type] => node
                    [mem] => 20601992182
                )

        )

)

Access node id data

// set node id
$proxmox->setNodeId($noedName);
//and access nodeIddata
$proxmox->listNodeQemus();

License

This project is released under the MIT License. See the bundled [LICENSE] file for details., (*6)

The Versions

15/06 2018

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

15/06 2018

2.0.3

2.0.3.0

  Sources   Download

MIT

The Requires

 

14/06 2018

2.0.2

2.0.2.0

  Sources   Download

MIT

The Requires

 

12/03 2018

2.0.1

2.0.1.0

  Sources   Download

MIT

The Requires

 

11/03 2018

2

2.0.0.0

  Sources   Download

MIT

The Requires