Corsinvest.ProxmoxVE.Api.Extension
1.1.3
Corsinvest for Proxmox VE Api Client Extension
See the version list below for details.
Install-Package Corsinvest.ProxmoxVE.Api.Extension -Version 1.1.3
dotnet add package Corsinvest.ProxmoxVE.Api.Extension --version 1.1.3
<PackageReference Include="Corsinvest.ProxmoxVE.Api.Extension" Version="1.1.3" />
paket add Corsinvest.ProxmoxVE.Api.Extension --version 1.1.3
#r "nuget: Corsinvest.ProxmoxVE.Api.Extension, 1.1.3"
// Install Corsinvest.ProxmoxVE.Api.Extension as a Cake Addin
#addin nuget:?package=Corsinvest.ProxmoxVE.Api.Extension&version=1.1.3
// Install Corsinvest.ProxmoxVE.Api.Extension as a Cake Tool
#tool nuget:?package=Corsinvest.ProxmoxVE.Api.Extension&version=1.1.3
Corsinvest.ProxmoxVE.Api
ProxmoVE Client API .Net
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:
______ _ __
/ ____/___ __________(_)___ _ _____ _____/ /_
/ / / __ \/ ___/ ___/ / __ \ | / / _ \/ ___/ __/
/ /___/ /_/ / / (__ ) / / / / |/ / __(__ ) /_
\____/\____/_/ /____/_/_/ /_/|___/\___/____/\__/
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 sufix 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 status
- StatusCode
- ReasonPhrase
- IsSuccessStatusCode
- Last result action
- Task utility
- WaitForTaskToFinish
- TaskIsRunning
- GetExitStatusTask
- Method directry 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<String, object>
- 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 Client("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("descr");
//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 reposnde 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
ProxmoVE Client API .Net
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:
______ _ __
/ ____/___ __________(_)___ _ _____ _____/ /_
/ / / __ \/ ___/ ___/ / __ \ | / / _ \/ ___/ __/
/ /___/ /_/ / / (__ ) / / / / |/ / __(__ ) /_
\____/\____/_/ /____/_/_/ /_/|___/\___/____/\__/
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 sufix 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 status
- StatusCode
- ReasonPhrase
- IsSuccessStatusCode
- Last result action
- Task utility
- WaitForTaskToFinish
- TaskIsRunning
- GetExitStatusTask
- Method directry 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<String, object>
- 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 Client("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("descr");
//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 reposnde 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.
Dependencies
-
.NETStandard 2.0
- BetterConsoleTables (>= 1.0.3)
- Corsinvest.ProxmoxVE.Api (>= 1.1.3)
- Corsinvest.ProxmoxVE.Api.Metadata (>= 1.0.0)
- McMaster.Extensions.CommandLineUtils (>= 2.3.4)
Used By
NuGet packages (6)
Showing the top 5 NuGet packages that depend on Corsinvest.ProxmoxVE.Api.Extension:
Package | Downloads |
---|---|
Corsinvest.ProxmoxVE.Api.Shell
Corsinvest for Proxmox VE Api Shell
|
|
Corsinvest.ProxmoxVE.AutoSnap.Api
Corsinvest for Proxmox VE AutpSnap Api
|
|
Corsinvest.ProxmoxVE.Diagnostic.Api
Corsinvest for Proxmox VE Diagnostic Api
|
|
Corsinvest.ProxmoxVE.TelegramBot.Api
Corsinvest for Proxmox VE Botgram Api
|
|
Corsinvest.ProxmoxVE.Metrics.Exporter.Api
Corsinvest for Proxmox VE Metrics Exporter Api
|
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Corsinvest.ProxmoxVE.Api.Extension:
Repository | Stars |
---|---|
Corsinvest/cv4pve-autosnap
Automatic snapshot tool for Proxmox VE
|
Version History
Version | Downloads | Last updated |
---|---|---|
2.7.0 | 227 | 12/15/2020 |
2.6.11 | 260 | 10/19/2020 |
2.6.10 | 168 | 10/15/2020 |
2.6.9 | 269 | 10/12/2020 |
2.6.8 | 163 | 9/28/2020 |
2.6.7 | 293 | 9/28/2020 |
2.6.6 | 171 | 9/25/2020 |
2.6.5 | 316 | 8/24/2020 |
2.6.2 | 306 | 7/30/2020 |
2.6.1 | 288 | 7/20/2020 |
2.6.0 | 293 | 7/17/2020 |
2.5.7 | 235 | 7/14/2020 |
2.5.6 | 189 | 7/13/2020 |
2.5.4 | 228 | 6/22/2020 |
2.5.3 | 424 | 6/20/2020 |
2.5.2 | 228 | 6/20/2020 |
2.5.1 | 244 | 6/20/2020 |
2.5.0 | 233 | 6/20/2020 |
2.4.0 | 358 | 5/12/2020 |
2.3.3 | 193 | 5/10/2020 |
2.3.1 | 235 | 5/8/2020 |
2.3.0 | 489 | 4/16/2020 |
2.2.3 | 371 | 2/21/2020 |
2.2.2 | 384 | 1/30/2020 |
2.2.1 | 278 | 12/27/2019 |
2.2.0 | 289 | 12/17/2019 |
2.1.0 | 253 | 10/22/2019 |
2.0.0 | 224 | 10/9/2019 |
1.2.0 | 219 | 9/5/2019 |
1.1.3 | 238 | 8/26/2019 |
1.1.2 | 284 | 7/4/2019 |
1.1.1 | 234 | 7/4/2019 |
1.1.0 | 276 | 7/2/2019 |