github.com/vmware/govmomi@v0.37.1/simulator/esx/resource_pool.go (about) 1 /* 2 Copyright (c) 2017-2023 VMware, Inc. All Rights Reserved. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package esx 18 19 import ( 20 "time" 21 22 "github.com/vmware/govmomi/vim25/mo" 23 "github.com/vmware/govmomi/vim25/types" 24 ) 25 26 // ResourcePool is the default template for ResourcePool properties. 27 // Capture method: 28 // 29 // govc pool.info "*" -dump 30 var ResourcePool = mo.ResourcePool{ 31 ManagedEntity: mo.ManagedEntity{ 32 ExtensibleManagedObject: mo.ExtensibleManagedObject{ 33 Self: types.ManagedObjectReference{Type: "ResourcePool", Value: "ha-root-pool"}, 34 Value: nil, 35 AvailableField: nil, 36 }, 37 Parent: &types.ManagedObjectReference{Type: "ComputeResource", Value: "ha-compute-res"}, 38 CustomValue: nil, 39 OverallStatus: "green", 40 ConfigStatus: "green", 41 ConfigIssue: nil, 42 EffectiveRole: []int32{-1}, 43 Permission: nil, 44 Name: "Resources", 45 DisabledMethod: []string{"CreateVApp", "CreateChildVM_Task"}, 46 RecentTask: nil, 47 DeclaredAlarmState: nil, 48 TriggeredAlarmState: nil, 49 AlarmActionsEnabled: (*bool)(nil), 50 Tag: nil, 51 }, 52 Summary: &types.ResourcePoolSummary{ 53 DynamicData: types.DynamicData{}, 54 Name: "Resources", 55 Config: types.ResourceConfigSpec{ 56 DynamicData: types.DynamicData{}, 57 Entity: &types.ManagedObjectReference{Type: "ResourcePool", Value: "ha-root-pool"}, 58 ChangeVersion: "", 59 LastModified: (*time.Time)(nil), 60 CpuAllocation: types.ResourceAllocationInfo{ 61 DynamicData: types.DynamicData{}, 62 Reservation: types.NewInt64(4121), 63 ExpandableReservation: types.NewBool(false), 64 Limit: types.NewInt64(4121), 65 Shares: &types.SharesInfo{ 66 DynamicData: types.DynamicData{}, 67 Shares: 9000, 68 Level: "custom", 69 }, 70 OverheadLimit: nil, 71 }, 72 MemoryAllocation: types.ResourceAllocationInfo{ 73 DynamicData: types.DynamicData{}, 74 Reservation: types.NewInt64(961), 75 ExpandableReservation: types.NewBool(false), 76 Limit: types.NewInt64(961), 77 Shares: &types.SharesInfo{ 78 DynamicData: types.DynamicData{}, 79 Shares: 9000, 80 Level: "custom", 81 }, 82 OverheadLimit: nil, 83 }, 84 }, 85 Runtime: types.ResourcePoolRuntimeInfo{ 86 DynamicData: types.DynamicData{}, 87 Memory: types.ResourcePoolResourceUsage{ 88 DynamicData: types.DynamicData{}, 89 ReservationUsed: 0, 90 ReservationUsedForVm: 0, 91 UnreservedForPool: 1007681536, 92 UnreservedForVm: 1007681536, 93 OverallUsage: 0, 94 MaxUsage: 1007681536, 95 }, 96 Cpu: types.ResourcePoolResourceUsage{ 97 DynamicData: types.DynamicData{}, 98 ReservationUsed: 0, 99 ReservationUsedForVm: 0, 100 UnreservedForPool: 4121, 101 UnreservedForVm: 4121, 102 OverallUsage: 0, 103 MaxUsage: 4121, 104 }, 105 OverallStatus: "green", 106 }, 107 QuickStats: (*types.ResourcePoolQuickStats)(nil), 108 ConfiguredMemoryMB: 0, 109 }, 110 Runtime: types.ResourcePoolRuntimeInfo{ 111 DynamicData: types.DynamicData{}, 112 Memory: types.ResourcePoolResourceUsage{ 113 DynamicData: types.DynamicData{}, 114 ReservationUsed: 0, 115 ReservationUsedForVm: 0, 116 UnreservedForPool: 1007681536, 117 UnreservedForVm: 1007681536, 118 OverallUsage: 0, 119 MaxUsage: 1007681536, 120 }, 121 Cpu: types.ResourcePoolResourceUsage{ 122 DynamicData: types.DynamicData{}, 123 ReservationUsed: 0, 124 ReservationUsedForVm: 0, 125 UnreservedForPool: 4121, 126 UnreservedForVm: 4121, 127 OverallUsage: 0, 128 MaxUsage: 4121, 129 }, 130 OverallStatus: "green", 131 }, 132 Owner: types.ManagedObjectReference{Type: "ComputeResource", Value: "ha-compute-res"}, 133 ResourcePool: nil, 134 Vm: nil, 135 Config: types.ResourceConfigSpec{ 136 DynamicData: types.DynamicData{}, 137 Entity: &types.ManagedObjectReference{Type: "ResourcePool", Value: "ha-root-pool"}, 138 ChangeVersion: "", 139 LastModified: (*time.Time)(nil), 140 CpuAllocation: types.ResourceAllocationInfo{ 141 DynamicData: types.DynamicData{}, 142 Reservation: types.NewInt64(4121), 143 ExpandableReservation: types.NewBool(false), 144 Limit: types.NewInt64(4121), 145 Shares: &types.SharesInfo{ 146 DynamicData: types.DynamicData{}, 147 Shares: 9000, 148 Level: "custom", 149 }, 150 OverheadLimit: nil, 151 }, 152 MemoryAllocation: types.ResourceAllocationInfo{ 153 DynamicData: types.DynamicData{}, 154 Reservation: types.NewInt64(961), 155 ExpandableReservation: types.NewBool(false), 156 Limit: types.NewInt64(961), 157 Shares: &types.SharesInfo{ 158 DynamicData: types.DynamicData{}, 159 Shares: 9000, 160 Level: "custom", 161 }, 162 OverheadLimit: nil, 163 }, 164 }, 165 ChildConfiguration: nil, 166 }