mirror of
https://github.com/tribufu/proxmox-sharp
synced 2026-05-18 09:35:45 +00:00
Rename project namespace
This commit is contained in:
parent
8efcd46e62
commit
79236af76b
24 changed files with 27 additions and 27 deletions
27
src/ProxmoxSharp.Tests/Program.cs
Normal file
27
src/ProxmoxSharp.Tests/Program.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
// Copyright (c) Tribufu. All Rights Reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
using dotenv.net;
|
||||
|
||||
namespace ProxmoxSharp.Tests
|
||||
{
|
||||
public static class Program
|
||||
{
|
||||
public static async Task Main()
|
||||
{
|
||||
DotEnv.Load(new DotEnvOptions(ignoreExceptions: true, envFilePaths: [".env", "../../.env"]));
|
||||
|
||||
var clusterUrl = Environment.GetEnvironmentVariable("PROXMOX_CLUSTER_URL");
|
||||
var tokenId = Environment.GetEnvironmentVariable("PROXMOX_TOKEN_ID");
|
||||
var tokenSecret = Environment.GetEnvironmentVariable("PROXMOX_TOKEN_SECRET");
|
||||
|
||||
var proxmox = new ProxmoxClient(clusterUrl, tokenId, tokenSecret);
|
||||
|
||||
var nodes = await proxmox.ListVirtualMachinesAsync("broadwell");
|
||||
foreach (var node in nodes)
|
||||
{
|
||||
Console.WriteLine($"- {node.Name}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
14
src/ProxmoxSharp.Tests/ProxmoxSharp.Tests.csproj
Normal file
14
src/ProxmoxSharp.Tests/ProxmoxSharp.Tests.csproj
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="dotenv.net" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ProxmoxSharp\ProxmoxSharp.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Loading…
Add table
Add a link
Reference in a new issue