add code for VmBeingModified endpoint
This commit is contained in:
@@ -21,7 +21,6 @@ type CronTask struct {
|
||||
// use gocron to check events in the Events table
|
||||
func (c *CronTask) RunVmCheck(ctx context.Context, logger *slog.Logger) error {
|
||||
var (
|
||||
//unixTimestamp int64
|
||||
numVcpus int32
|
||||
numRam int32
|
||||
totalDiskGB float64
|
||||
@@ -66,7 +65,6 @@ func (c *CronTask) RunVmCheck(ctx context.Context, logger *slog.Logger) error {
|
||||
// calculate VM properties we want to store
|
||||
if vmObject.Vm.Config != nil {
|
||||
numRam = vmObject.Vm.Config.Hardware.MemoryMB
|
||||
//numVcpus = vmObject.Vm.Config.Hardware.NumCPU * vmObject.Vm.Config.Hardware.NumCoresPerSocket
|
||||
numVcpus = vmObject.Vm.Config.Hardware.NumCPU
|
||||
|
||||
// Calculate the total disk allocated in GB
|
||||
@@ -94,7 +92,7 @@ func (c *CronTask) RunVmCheck(ctx context.Context, logger *slog.Logger) error {
|
||||
}
|
||||
|
||||
if foundVm {
|
||||
c.Logger.Debug("Simulate adding to Inventory", "vm_name", evt.VmName.String, "vcpus", numVcpus, "ram", numRam, "dc", evt.DatacenterId.String)
|
||||
c.Logger.Debug("Adding to Inventory table", "vm_name", evt.VmName.String, "vcpus", numVcpus, "ram", numRam, "dc", evt.DatacenterId.String)
|
||||
|
||||
params := queries.CreateInventoryParams{
|
||||
Name: vmObject.Vm.Name,
|
||||
|
Reference in New Issue
Block a user