|
@@ -7,6 +7,11 @@ using Microsoft.Extensions.Logging;
|
|
|
using RackPeek.Commands;
|
|
using RackPeek.Commands;
|
|
|
using RackPeek.Commands.Server;
|
|
using RackPeek.Commands.Server;
|
|
|
using RackPeek.Commands.Server.Cpus;
|
|
using RackPeek.Commands.Server.Cpus;
|
|
|
|
|
+using RackPeek.Commands.Server.Nics;
|
|
|
|
|
+using RackPeek.Domain.Resources.Hardware.Reports;
|
|
|
|
|
+using RackPeek.Domain.Resources.Hardware.Server;
|
|
|
|
|
+using RackPeek.Domain.Resources.Hardware.Server.Cpu;
|
|
|
|
|
+using RackPeek.Domain.Resources.Hardware.Server.Nic;
|
|
|
using RackPeek.Commands.Server.Drives;
|
|
using RackPeek.Commands.Server.Drives;
|
|
|
using RackPeek.Domain.Resources.Hardware.Reports;
|
|
using RackPeek.Domain.Resources.Hardware.Reports;
|
|
|
using RackPeek.Domain.Resources.Hardware.Server;
|
|
using RackPeek.Domain.Resources.Hardware.Server;
|
|
@@ -99,6 +104,15 @@ public static class Program
|
|
|
services.AddScoped<ServerCpuSetCommand>();
|
|
services.AddScoped<ServerCpuSetCommand>();
|
|
|
services.AddScoped<ServerCpuRemoveCommand>();
|
|
services.AddScoped<ServerCpuRemoveCommand>();
|
|
|
|
|
|
|
|
|
|
+ // NIC use cases
|
|
|
|
|
+ services.AddScoped<AddNicUseCase>();
|
|
|
|
|
+ services.AddScoped<UpdateNicUseCase>();
|
|
|
|
|
+ services.AddScoped<RemoveNicUseCase>();
|
|
|
|
|
+
|
|
|
|
|
+ // NIC commands
|
|
|
|
|
+ services.AddScoped<ServerNicAddCommand>();
|
|
|
|
|
+ services.AddScoped<ServerNicUpdateCommand>();
|
|
|
|
|
+ services.AddScoped<ServerNicRemoveCommand>();
|
|
|
// Drive commands
|
|
// Drive commands
|
|
|
services.AddScoped<ServerDriveAddCommand>();
|
|
services.AddScoped<ServerDriveAddCommand>();
|
|
|
services.AddScoped<ServerDriveUpdateCommand>();
|
|
services.AddScoped<ServerDriveUpdateCommand>();
|
|
@@ -152,6 +166,18 @@ public static class Program
|
|
|
.WithDescription("Remove a CPU from a server");
|
|
.WithDescription("Remove a CPU from a server");
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ server.AddBranch("nic", nic =>
|
|
|
|
|
+ {
|
|
|
|
|
+ nic.SetDescription("Manage server NICs");
|
|
|
|
|
+
|
|
|
|
|
+ nic.AddCommand<ServerNicAddCommand>("add")
|
|
|
|
|
+ .WithDescription("Add a NIC to a server");
|
|
|
|
|
+
|
|
|
|
|
+ nic.AddCommand<ServerNicUpdateCommand>("set")
|
|
|
|
|
+ .WithDescription("Update a NIC on a server");
|
|
|
|
|
+
|
|
|
|
|
+ nic.AddCommand<ServerNicRemoveCommand>("del")
|
|
|
|
|
+ .WithDescription("Remove a NIC from a server");
|
|
|
server.AddBranch("drive", drive =>
|
|
server.AddBranch("drive", drive =>
|
|
|
{
|
|
{
|
|
|
drive.SetDescription("Manage server drives");
|
|
drive.SetDescription("Manage server drives");
|