Corsinvest.ProxmoxVE.Api.Metadata 1.0.1

Corsinvest for Proxmox VE Api Metadata

There is a newer version of this package available.
See the version list below for details.
Install-Package Corsinvest.ProxmoxVE.Api.Metadata -Version 1.0.1
dotnet add package Corsinvest.ProxmoxVE.Api.Metadata --version 1.0.1
<PackageReference Include="Corsinvest.ProxmoxVE.Api.Metadata" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Corsinvest.ProxmoxVE.Api.Metadata --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Corsinvest.ProxmoxVE.Api

License
Nuget Nuget Nuget AppVeyor branch Donate to this project using Paypal

Proxmox VE Client API .Net

Proxmox VE Api

Nuget Api

Nuget Extension

Nuget Metadata

Donations

If you like my work and want to support it, then please consider to deposit a donation through Paypal by clicking on the next button:

paypal

   ______                _                      __
  / ____/___  __________(_)___ _   _____  _____/ /_
 / /   / __ \/ ___/ ___/ / __ \ | / / _ \/ ___/ __/
/ /___/ /_/ / /  (__  ) / / / / |/ /  __(__  ) /_
\____/\____/_/  /____/_/_/ /_/|___/\___/____/\__/

Corsinvest for Proxmox VE Api Client  (Made in Italy)

General

The client is generated from a JSON Api on Proxmox VE.

Main features

  • Easy to learn
  • Method named
  • Method native suffix Rest (prevent)
    • GetRest
    • CreateRest (Post)
    • SetRest (Put)
    • DeleteRest
  • Set ResponseType json, png
  • Full class and method generated from documentation (about client)
  • Comment any method and parameters
  • Parameters indexed eg [n] is structured in array index and value
  • Tree structure
    • client.Nodes["pve1"].Qemu[100].Snapshot().snapshotList().Response.data
  • Return data Proxmox VE
  • Debug Level show to console information REST call
  • Return result
    • Request
    • Response
    • Status
  • Last result action
  • Task utility
    • WaitForTaskToFinish
    • TaskIsRunning
    • GetExitStatusTask
  • Method direct access
    • Get
    • Create (Post)
    • Set (Put)
    • Delete
  • Login return bool if access
  • Return Result class more information
  • ClientBase lite function

Result

The result is class Result and contain properties:

  • Response returned from Proxmox VE (data,errors,...) dynamic ExpandoObject
  • ResponseToDictionary return response to dictionary IDictionary&lt;String, object&gt;
  • ResponseInError (bool) : Contains errors from Proxmox VE.
  • StatusCode (System.Net.HttpStatusCode): Status code of the HTTP response.
  • ReasonPhrase (string): The reason phrase which typically is sent by servers together with the status code.
  • IsSuccessStatusCode (bool) : Gets a value that indicates if the HTTP response was successful.
  • GetError() (string) : Get error.

Example result:

{
  "data": {
    "smbios1": "uuid=9246585e-0c8b-4d02-8fe2-f48fd0da3975",
    "ide2": "none,media=cdrom",
    "onboot": 1,
    "boot": "cdn",
    "cores": 2,
    "agent": 1,
    "memory": 4096,
    "numa": 0,
    "bootdisk": "virtio0",
    "sockets": 1,
    "net0": "virtio=3A:39:38:30:36:31,bridge=vmbr0",
    "parent": "auto4hours170904080002",
    "digest": "acafde32daab50bce801fef2e029440c54ebe2f7",
    "vga": "qxl",
    "virtio0": "local-zfs:vm-100-disk-1,cache=writeback,size=50G",
    "ostype": "win8",
    "name": "phenometa"
  }
}

Usage

var client = new PveClient("10.92.90.91");
if (client.Login("root", "password"))
{
    var vm = client.Nodes["pve1"].Qemu[100];

    //config vm
    var config = vm.Config.VmConfig();
    Console.WriteLine(Client.ObjectToJson(config.Response));

    //create snapshot
    var response = vm.Snapshot.Snapshot("pippo2311");

    //update snapshot description
    vm.Snapshot["pippo2311"].Config.UpdateSnapshotConfig("description");

    //delete snapshot
    vm.Snapshot["pippo2311"].Delsnapshot();

    //list of snapshot
    foreach (var snapshot in vm.Snapshot.SnapshotList().Response.data)
    {
        Console.WriteLine(Client.ObjectToJson(snapshot));
        Console.WriteLine(snapshot.name);
    }

    //change response type from json to png
    client.ResponseType = "png";
    var dataImg = client.Nodes["pve1"].Rrd.Rrd("cpu", "day").Response;
    Console.WriteLine("<img src=\"{dataImg}\" \>");
}

Extension Pack

The extension pack add functionality to Client API.

Corsinvest.ProxmoxVE.Api

License
Nuget Nuget Nuget AppVeyor branch Donate to this project using Paypal

Proxmox VE Client API .Net

Proxmox VE Api

Nuget Api

Nuget Extension

Nuget Metadata

Donations

If you like my work and want to support it, then please consider to deposit a donation through Paypal by clicking on the next button:

paypal

   ______                _                      __
  / ____/___  __________(_)___ _   _____  _____/ /_
 / /   / __ \/ ___/ ___/ / __ \ | / / _ \/ ___/ __/
/ /___/ /_/ / /  (__  ) / / / / |/ /  __(__  ) /_
\____/\____/_/  /____/_/_/ /_/|___/\___/____/\__/

Corsinvest for Proxmox VE Api Client  (Made in Italy)

General

The client is generated from a JSON Api on Proxmox VE.

Main features

  • Easy to learn
  • Method named
  • Method native suffix Rest (prevent)
    • GetRest
    • CreateRest (Post)
    • SetRest (Put)
    • DeleteRest
  • Set ResponseType json, png
  • Full class and method generated from documentation (about client)
  • Comment any method and parameters
  • Parameters indexed eg [n] is structured in array index and value
  • Tree structure
    • client.Nodes["pve1"].Qemu[100].Snapshot().snapshotList().Response.data
  • Return data Proxmox VE
  • Debug Level show to console information REST call
  • Return result
    • Request
    • Response
    • Status
  • Last result action
  • Task utility
    • WaitForTaskToFinish
    • TaskIsRunning
    • GetExitStatusTask
  • Method direct access
    • Get
    • Create (Post)
    • Set (Put)
    • Delete
  • Login return bool if access
  • Return Result class more information
  • ClientBase lite function

Result

The result is class Result and contain properties:

  • Response returned from Proxmox VE (data,errors,...) dynamic ExpandoObject
  • ResponseToDictionary return response to dictionary IDictionary&lt;String, object&gt;
  • ResponseInError (bool) : Contains errors from Proxmox VE.
  • StatusCode (System.Net.HttpStatusCode): Status code of the HTTP response.
  • ReasonPhrase (string): The reason phrase which typically is sent by servers together with the status code.
  • IsSuccessStatusCode (bool) : Gets a value that indicates if the HTTP response was successful.
  • GetError() (string) : Get error.

Example result:

{
  "data": {
    "smbios1": "uuid=9246585e-0c8b-4d02-8fe2-f48fd0da3975",
    "ide2": "none,media=cdrom",
    "onboot": 1,
    "boot": "cdn",
    "cores": 2,
    "agent": 1,
    "memory": 4096,
    "numa": 0,
    "bootdisk": "virtio0",
    "sockets": 1,
    "net0": "virtio=3A:39:38:30:36:31,bridge=vmbr0",
    "parent": "auto4hours170904080002",
    "digest": "acafde32daab50bce801fef2e029440c54ebe2f7",
    "vga": "qxl",
    "virtio0": "local-zfs:vm-100-disk-1,cache=writeback,size=50G",
    "ostype": "win8",
    "name": "phenometa"
  }
}

Usage

var client = new PveClient("10.92.90.91");
if (client.Login("root", "password"))
{
    var vm = client.Nodes["pve1"].Qemu[100];

    //config vm
    var config = vm.Config.VmConfig();
    Console.WriteLine(Client.ObjectToJson(config.Response));

    //create snapshot
    var response = vm.Snapshot.Snapshot("pippo2311");

    //update snapshot description
    vm.Snapshot["pippo2311"].Config.UpdateSnapshotConfig("description");

    //delete snapshot
    vm.Snapshot["pippo2311"].Delsnapshot();

    //list of snapshot
    foreach (var snapshot in vm.Snapshot.SnapshotList().Response.data)
    {
        Console.WriteLine(Client.ObjectToJson(snapshot));
        Console.WriteLine(snapshot.name);
    }

    //change response type from json to png
    client.ResponseType = "png";
    var dataImg = client.Nodes["pve1"].Rrd.Rrd("cpu", "day").Response;
    Console.WriteLine("<img src=\"{dataImg}\" \>");
}

Extension Pack

The extension pack add functionality to Client API.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.1.0 54 10/22/2019
1.0.1 48 10/9/2019
1.0.0 74 8/26/2019