/LXD.NET

LXD client implemented in C#

Primary LanguageC#MIT LicenseMIT

LXD.NET

Build status NuGet version

LXD client implemented in C#.

Usage

This module is available as a NuGet package. One can install it using NuGet Package Console window,

PM> Install-Package LXD

Example

using LXD;

Client client = new Client(
    apiEndpoint: "https://your-lxd-service:8443",
    clientCertificateFilename: "your-client-certificate.p12",
    password: "your-client-certificate-password");

Console.WriteLine(client.Trusted); // true

foreach (Domain.Container container in client.Containers) {
    Console.WriteLine(container.Name);
}
// alpline
// ubuntu

Domain.Container alpine = client.Containers.First();
foreach (string str in alpine.Exec(new[] {"cat", "/etc/issue"})) {
    Console.WriteLine(st);
}
// Welcome to Alpine Linux 3.4
// Kernel \r on an \m (\l)