github.com/vmware/govmomi@v0.37.1/eam/types/enum.go (about)

     1  /*
     2  Copyright (c) 2021-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 types
    18  
    19  import (
    20  	"reflect"
    21  
    22  	"github.com/vmware/govmomi/vim25/types"
    23  )
    24  
    25  // Defines if the deployed VMs needs to run on different hosts.
    26  type AgencyVMPlacementPolicyVMAntiAffinity string
    27  
    28  const (
    29  	// Denotes no specific VM anti-affinity policy.
    30  	AgencyVMPlacementPolicyVMAntiAffinityNone = AgencyVMPlacementPolicyVMAntiAffinity("none")
    31  	// Best effort is made the VMs to run on different hosts as long as
    32  	// this does not impact the ability of the host to satisfy current CPU
    33  	// or memory requirements for virtual machines on the system.
    34  	//
    35  	// NOTE: Currently not supported - i.e. the agency configuration is
    36  	// considered as invalid.
    37  	AgencyVMPlacementPolicyVMAntiAffinitySoft = AgencyVMPlacementPolicyVMAntiAffinity("soft")
    38  )
    39  
    40  func init() {
    41  	types.Add("eam:AgencyVMPlacementPolicyVMAntiAffinity", reflect.TypeOf((*AgencyVMPlacementPolicyVMAntiAffinity)(nil)).Elem())
    42  }
    43  
    44  // Defines if the deployed VM is affinied to run on the same host it is
    45  // deployed on.
    46  type AgencyVMPlacementPolicyVMDataAffinity string
    47  
    48  const (
    49  	// Denotes no specific VM data affinity policy.
    50  	AgencyVMPlacementPolicyVMDataAffinityNone = AgencyVMPlacementPolicyVMDataAffinity("none")
    51  	// Best effort is made the VM to run on the same host it is deployed on
    52  	// as long as this does not impact the ability of the host to satisfy
    53  	// current CPU or memory requirements for virtual machines on the
    54  	// system.
    55  	//
    56  	// NOTE: Currently not supported - i.e. the agency configuration is
    57  	// considered as invalid.
    58  	AgencyVMPlacementPolicyVMDataAffinitySoft = AgencyVMPlacementPolicyVMDataAffinity("soft")
    59  )
    60  
    61  func init() {
    62  	types.Add("eam:AgencyVMPlacementPolicyVMDataAffinity", reflect.TypeOf((*AgencyVMPlacementPolicyVMDataAffinity)(nil)).Elem())
    63  }
    64  
    65  type AgentConfigInfoOvfDiskProvisioning string
    66  
    67  const (
    68  	// Denotes no specific type for disk provisioning.
    69  	//
    70  	// Disks will be
    71  	// provisioned as defaulted by vSphere.
    72  	AgentConfigInfoOvfDiskProvisioningNone = AgentConfigInfoOvfDiskProvisioning("none")
    73  	// Disks will be provisioned with only used space allocated.
    74  	AgentConfigInfoOvfDiskProvisioningThin = AgentConfigInfoOvfDiskProvisioning("thin")
    75  	// Disks will be provisioned with full size allocated.
    76  	AgentConfigInfoOvfDiskProvisioningThick = AgentConfigInfoOvfDiskProvisioning("thick")
    77  )
    78  
    79  func init() {
    80  	types.Add("eam:AgentConfigInfoOvfDiskProvisioning", reflect.TypeOf((*AgentConfigInfoOvfDiskProvisioning)(nil)).Elem())
    81  	types.AddMinAPIVersionForType("eam:AgentConfigInfoOvfDiskProvisioning", "6.9")
    82  }
    83  
    84  // Represents the state of the VM lifecycle.
    85  type AgentVmHookVmState string
    86  
    87  const (
    88  	// The VM is provisioned and not powered-on.
    89  	AgentVmHookVmStateProvisioned = AgentVmHookVmState("provisioned")
    90  	// The VM is powered on.
    91  	AgentVmHookVmStatePoweredOn = AgentVmHookVmState("poweredOn")
    92  	// The VM is about to be powered on as part of a VM upgrade workflow.
    93  	AgentVmHookVmStatePrePowerOn = AgentVmHookVmState("prePowerOn")
    94  )
    95  
    96  func init() {
    97  	types.Add("eam:AgentVmHookVmState", reflect.TypeOf((*AgentVmHookVmState)(nil)).Elem())
    98  	types.AddMinAPIVersionForEnumValue("eam:AgentVmHookVmState", "prePowerOn", "7.0")
    99  }
   100  
   101  // The <code>GoalState</code> enumeration defines the goal of the entity.
   102  type EamObjectRuntimeInfoGoalState string
   103  
   104  const (
   105  	// The entity should be fully deployed and active.
   106  	//
   107  	// If the entity is an
   108  	// `Agency`, it should install VIBs and deploy and power on all agent
   109  	// virtual machines. If the entity is an `Agent`, its VIB should be installed and its
   110  	// agent virtual machine should be deployed and powered on.
   111  	EamObjectRuntimeInfoGoalStateEnabled = EamObjectRuntimeInfoGoalState("enabled")
   112  	// The entity should be fully deployed but inactive.
   113  	//
   114  	// f the entity is an
   115  	// `Agency`, the behavior is similar to the <code>enabled</code> goal state, but
   116  	// agents are not powered on (if they have been powered on they are powered
   117  	// off).
   118  	EamObjectRuntimeInfoGoalStateDisabled = EamObjectRuntimeInfoGoalState("disabled")
   119  	// The entity should be completely removed from the vCenter Server.
   120  	//
   121  	// If the entity is an
   122  	// `Agency`, no more VIBs or agent virtual machines are deployed. All installed VIBs
   123  	// installed by the `Agency` are uninstalled and any deployed agent virtual machines
   124  	// are powered off (if they have been powered on) and deleted.
   125  	// If the entity is an `Agent`, its VIB is uninstalled and the virtual machine is
   126  	// powered off and deleted.
   127  	EamObjectRuntimeInfoGoalStateUninstalled = EamObjectRuntimeInfoGoalState("uninstalled")
   128  )
   129  
   130  func init() {
   131  	types.Add("eam:EamObjectRuntimeInfoGoalState", reflect.TypeOf((*EamObjectRuntimeInfoGoalState)(nil)).Elem())
   132  }
   133  
   134  // <code>Status</code> defines a health value that denotes how well the entity
   135  // conforms to the goal state.
   136  type EamObjectRuntimeInfoStatus string
   137  
   138  const (
   139  	// The entity is in perfect compliance with the goal state.
   140  	EamObjectRuntimeInfoStatusGreen = EamObjectRuntimeInfoStatus("green")
   141  	// The entity is actively working to reach the desired goal state.
   142  	EamObjectRuntimeInfoStatusYellow = EamObjectRuntimeInfoStatus("yellow")
   143  	// The entity has reached an issue which prevents it from reaching the desired goal
   144  	// state.
   145  	//
   146  	// To remediate any offending issues, look at `EamObjectRuntimeInfo.issue`
   147  	// and use either `EamObject.Resolve` or
   148  	// `EamObject.ResolveAll`.
   149  	EamObjectRuntimeInfoStatusRed = EamObjectRuntimeInfoStatus("red")
   150  )
   151  
   152  func init() {
   153  	types.Add("eam:EamObjectRuntimeInfoStatus", reflect.TypeOf((*EamObjectRuntimeInfoStatus)(nil)).Elem())
   154  }
   155  
   156  // <code>MaintenanceModePolicy</code> defines how ESX Agent Manager is going
   157  // to put into maintenance mode hosts which are part of a cluster not managed
   158  type EsxAgentManagerMaintenanceModePolicy string
   159  
   160  const (
   161  	// Only a single host at a time will be put into maintenance mode.
   162  	EsxAgentManagerMaintenanceModePolicySingleHost = EsxAgentManagerMaintenanceModePolicy("singleHost")
   163  	// Hosts will be put into maintenance mode simultaneously.
   164  	//
   165  	// If vSphere DRS
   166  	// is enabled, its recommendations will be used. Otherwise, it will be
   167  	// attempted to put in maintenance mode simultaneously as many host as
   168  	// possible.
   169  	EsxAgentManagerMaintenanceModePolicyMultipleHosts = EsxAgentManagerMaintenanceModePolicy("multipleHosts")
   170  )
   171  
   172  func init() {
   173  	types.Add("eam:EsxAgentManagerMaintenanceModePolicy", reflect.TypeOf((*EsxAgentManagerMaintenanceModePolicy)(nil)).Elem())
   174  	types.AddMinAPIVersionForType("eam:EsxAgentManagerMaintenanceModePolicy", "7.4")
   175  }
   176  
   177  // Supported types of hooks for agents.
   178  type HooksHookType string
   179  
   180  const (
   181  	// Hook raised for an agent immediately after a Virtual Machine was
   182  	// created.
   183  	HooksHookTypePOST_PROVISIONING = HooksHookType("POST_PROVISIONING")
   184  	// Hook raised for an agent immediately after a Virtual Machine was
   185  	// powered on.
   186  	HooksHookTypePOST_POWER_ON = HooksHookType("POST_POWER_ON")
   187  )
   188  
   189  func init() {
   190  	types.Add("eam:HooksHookType", reflect.TypeOf((*HooksHookType)(nil)).Elem())
   191  }
   192  
   193  // Reasons solution is not valid for application.
   194  type SolutionsInvalidReason string
   195  
   196  const (
   197  	// The OVF descriptor provided in the VM source is invalid.
   198  	SolutionsInvalidReasonINVALID_OVF_DESCRIPTOR = SolutionsInvalidReason("INVALID_OVF_DESCRIPTOR")
   199  	// The provided VM source is inaccessible from ESX Agent Manager.
   200  	SolutionsInvalidReasonINACCESSBLE_VM_SOURCE = SolutionsInvalidReason("INACCESSBLE_VM_SOURCE")
   201  	// The provided networks are not suitable for application purposes.
   202  	SolutionsInvalidReasonINVALID_NETWORKS = SolutionsInvalidReason("INVALID_NETWORKS")
   203  	// The provided datastores are not suitable for application purposes.
   204  	SolutionsInvalidReasonINVALID_DATASTORES = SolutionsInvalidReason("INVALID_DATASTORES")
   205  	// The provided resource pool is not accessible or part of the cluster.
   206  	SolutionsInvalidReasonINVALID_RESOURCE_POOL = SolutionsInvalidReason("INVALID_RESOURCE_POOL")
   207  	// The provided folder is inaccessible or not part of the same datacenter
   208  	// with the cluster.
   209  	SolutionsInvalidReasonINVALID_FOLDER = SolutionsInvalidReason("INVALID_FOLDER")
   210  	// The provided OVF properties are insufficient to satisfy the required
   211  	// user configurable properties in the VM described in the vmSource.
   212  	SolutionsInvalidReasonINVALID_PROPERTIES = SolutionsInvalidReason("INVALID_PROPERTIES")
   213  	// The legacy agency requested for transition is not valid/cannot be
   214  	// mapped to systm Virtual Machines solution.
   215  	SolutionsInvalidReasonINVALID_TRANSITION = SolutionsInvalidReason("INVALID_TRANSITION")
   216  )
   217  
   218  func init() {
   219  	types.Add("eam:SolutionsInvalidReason", reflect.TypeOf((*SolutionsInvalidReason)(nil)).Elem())
   220  }
   221  
   222  // Describes possible reasons a solution is non compliant.
   223  type SolutionsNonComplianceReason string
   224  
   225  const (
   226  	// There is ongoing work to acheive the desired state.
   227  	SolutionsNonComplianceReasonWORKING = SolutionsNonComplianceReason("WORKING")
   228  	// ESX Agent Manager has ecnountered am issue attempting to acheive the
   229  	// desired state.
   230  	SolutionsNonComplianceReasonISSUE = SolutionsNonComplianceReason("ISSUE")
   231  	// ESX Agent Manager is awaiting user input to continue attempting to
   232  	// acheive the desired state.
   233  	SolutionsNonComplianceReasonIN_HOOK = SolutionsNonComplianceReason("IN_HOOK")
   234  	// An obsoleted spec is currently in application for this solution.
   235  	//
   236  	// This state should take precedence over:
   237  	// `WORKING`
   238  	// `ISSUE`
   239  	// `IN_HOOK`
   240  	SolutionsNonComplianceReasonOBSOLETE_SPEC = SolutionsNonComplianceReason("OBSOLETE_SPEC")
   241  	// Application for this solutiona has never been requested with
   242  	// `Solutions.Apply`.
   243  	SolutionsNonComplianceReasonNO_SPEC = SolutionsNonComplianceReason("NO_SPEC")
   244  )
   245  
   246  func init() {
   247  	types.Add("eam:SolutionsNonComplianceReason", reflect.TypeOf((*SolutionsNonComplianceReason)(nil)).Elem())
   248  }
   249  
   250  // Virtual Machine deployment optimization strategies.
   251  type SolutionsVMDeploymentOptimization string
   252  
   253  const (
   254  	// Utilizes all cloning methods available, will create initial snapshots
   255  	// on the Virtual Machines.
   256  	SolutionsVMDeploymentOptimizationALL_CLONES = SolutionsVMDeploymentOptimization("ALL_CLONES")
   257  	// Utilize only full copy cloning menthods, will create initial snapshots
   258  	// on the Virtual Machines.
   259  	SolutionsVMDeploymentOptimizationFULL_CLONES_ONLY = SolutionsVMDeploymentOptimization("FULL_CLONES_ONLY")
   260  	// Virtual Machiness will not be cloned from pre-existing deployment.
   261  	SolutionsVMDeploymentOptimizationNO_CLONES = SolutionsVMDeploymentOptimization("NO_CLONES")
   262  )
   263  
   264  func init() {
   265  	types.Add("eam:SolutionsVMDeploymentOptimization", reflect.TypeOf((*SolutionsVMDeploymentOptimization)(nil)).Elem())
   266  }
   267  
   268  // Provisioning types for system Virtual Machines.
   269  type SolutionsVMDiskProvisioning string
   270  
   271  const (
   272  	// Disks will be provisioned with only used space allocated.
   273  	SolutionsVMDiskProvisioningTHIN = SolutionsVMDiskProvisioning("THIN")
   274  	// Disks will be provisioned with full size allocated.
   275  	SolutionsVMDiskProvisioningTHICK = SolutionsVMDiskProvisioning("THICK")
   276  )
   277  
   278  func init() {
   279  	types.Add("eam:SolutionsVMDiskProvisioning", reflect.TypeOf((*SolutionsVMDiskProvisioning)(nil)).Elem())
   280  }