github.com/vmware/govmomi@v0.51.0/simulator/esx/resource_pool.go (about) 1 // © Broadcom. All Rights Reserved. 2 // The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. 3 // SPDX-License-Identifier: Apache-2.0 4 5 package esx 6 7 import ( 8 "time" 9 10 "github.com/vmware/govmomi/vim25/mo" 11 "github.com/vmware/govmomi/vim25/types" 12 ) 13 14 // ResourcePool is the default template for ResourcePool properties. 15 // Capture method: 16 // 17 // govc pool.info "*" -dump 18 var ResourcePool = mo.ResourcePool{ 19 ManagedEntity: mo.ManagedEntity{ 20 ExtensibleManagedObject: mo.ExtensibleManagedObject{ 21 Self: types.ManagedObjectReference{Type: "ResourcePool", Value: "ha-root-pool"}, 22 Value: nil, 23 AvailableField: nil, 24 }, 25 Parent: &types.ManagedObjectReference{Type: "ComputeResource", Value: "ha-compute-res"}, 26 CustomValue: nil, 27 OverallStatus: "green", 28 ConfigStatus: "green", 29 ConfigIssue: nil, 30 EffectiveRole: []int32{-1}, 31 Permission: nil, 32 Name: "Resources", 33 DisabledMethod: []string{"CreateVApp", "CreateChildVM_Task"}, 34 RecentTask: nil, 35 DeclaredAlarmState: nil, 36 TriggeredAlarmState: nil, 37 AlarmActionsEnabled: (*bool)(nil), 38 Tag: nil, 39 }, 40 Summary: &types.ResourcePoolSummary{ 41 DynamicData: types.DynamicData{}, 42 Name: "Resources", 43 Config: types.ResourceConfigSpec{ 44 DynamicData: types.DynamicData{}, 45 Entity: &types.ManagedObjectReference{Type: "ResourcePool", Value: "ha-root-pool"}, 46 ChangeVersion: "", 47 LastModified: (*time.Time)(nil), 48 CpuAllocation: types.ResourceAllocationInfo{ 49 DynamicData: types.DynamicData{}, 50 Reservation: types.NewInt64(4121), 51 ExpandableReservation: types.NewBool(false), 52 Limit: types.NewInt64(4121), 53 Shares: &types.SharesInfo{ 54 DynamicData: types.DynamicData{}, 55 Shares: 9000, 56 Level: "custom", 57 }, 58 OverheadLimit: nil, 59 }, 60 MemoryAllocation: types.ResourceAllocationInfo{ 61 DynamicData: types.DynamicData{}, 62 Reservation: types.NewInt64(961), 63 ExpandableReservation: types.NewBool(false), 64 Limit: types.NewInt64(961), 65 Shares: &types.SharesInfo{ 66 DynamicData: types.DynamicData{}, 67 Shares: 9000, 68 Level: "custom", 69 }, 70 OverheadLimit: nil, 71 }, 72 }, 73 Runtime: types.ResourcePoolRuntimeInfo{ 74 DynamicData: types.DynamicData{}, 75 Memory: types.ResourcePoolResourceUsage{ 76 DynamicData: types.DynamicData{}, 77 ReservationUsed: 0, 78 ReservationUsedForVm: 0, 79 UnreservedForPool: 1007681536, 80 UnreservedForVm: 1007681536, 81 OverallUsage: 0, 82 MaxUsage: 1007681536, 83 }, 84 Cpu: types.ResourcePoolResourceUsage{ 85 DynamicData: types.DynamicData{}, 86 ReservationUsed: 0, 87 ReservationUsedForVm: 0, 88 UnreservedForPool: 4121, 89 UnreservedForVm: 4121, 90 OverallUsage: 0, 91 MaxUsage: 4121, 92 }, 93 OverallStatus: "green", 94 }, 95 QuickStats: (*types.ResourcePoolQuickStats)(nil), 96 ConfiguredMemoryMB: 0, 97 }, 98 Runtime: types.ResourcePoolRuntimeInfo{ 99 DynamicData: types.DynamicData{}, 100 Memory: types.ResourcePoolResourceUsage{ 101 DynamicData: types.DynamicData{}, 102 ReservationUsed: 0, 103 ReservationUsedForVm: 0, 104 UnreservedForPool: 1007681536, 105 UnreservedForVm: 1007681536, 106 OverallUsage: 0, 107 MaxUsage: 1007681536, 108 }, 109 Cpu: types.ResourcePoolResourceUsage{ 110 DynamicData: types.DynamicData{}, 111 ReservationUsed: 0, 112 ReservationUsedForVm: 0, 113 UnreservedForPool: 4121, 114 UnreservedForVm: 4121, 115 OverallUsage: 0, 116 MaxUsage: 4121, 117 }, 118 OverallStatus: "green", 119 }, 120 Owner: types.ManagedObjectReference{Type: "ComputeResource", Value: "ha-compute-res"}, 121 ResourcePool: nil, 122 Vm: nil, 123 Config: types.ResourceConfigSpec{ 124 DynamicData: types.DynamicData{}, 125 Entity: &types.ManagedObjectReference{Type: "ResourcePool", Value: "ha-root-pool"}, 126 ChangeVersion: "", 127 LastModified: (*time.Time)(nil), 128 CpuAllocation: types.ResourceAllocationInfo{ 129 DynamicData: types.DynamicData{}, 130 Reservation: types.NewInt64(4121), 131 ExpandableReservation: types.NewBool(false), 132 Limit: types.NewInt64(4121), 133 Shares: &types.SharesInfo{ 134 DynamicData: types.DynamicData{}, 135 Shares: 9000, 136 Level: "custom", 137 }, 138 OverheadLimit: nil, 139 }, 140 MemoryAllocation: types.ResourceAllocationInfo{ 141 DynamicData: types.DynamicData{}, 142 Reservation: types.NewInt64(961), 143 ExpandableReservation: types.NewBool(false), 144 Limit: types.NewInt64(961), 145 Shares: &types.SharesInfo{ 146 DynamicData: types.DynamicData{}, 147 Shares: 9000, 148 Level: "custom", 149 }, 150 OverheadLimit: nil, 151 }, 152 }, 153 ChildConfiguration: nil, 154 }