github.com/vmware/govmomi@v0.37.1/vslm/types/enum.go (about) 1 /* 2 Copyright (c) 2014-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 type VslmEventType string 26 27 const ( 28 // Event type used to notify that FCD is going to be relocated. 29 VslmEventTypePreFcdMigrateEvent = VslmEventType("preFcdMigrateEvent") 30 // Event type used to notify FCD has been relocated. 31 VslmEventTypePostFcdMigrateEvent = VslmEventType("postFcdMigrateEvent") 32 ) 33 34 func init() { 35 types.Add("vslm:VslmEventType", reflect.TypeOf((*VslmEventType)(nil)).Elem()) 36 } 37 38 // The possible states of the vlsm event processing. 39 type VslmEventVslmEventInfoState string 40 41 const ( 42 // When the event has been successfully processed. 43 VslmEventVslmEventInfoStateSuccess = VslmEventVslmEventInfoState("success") 44 // When there is error while processing the event. 45 VslmEventVslmEventInfoStateError = VslmEventVslmEventInfoState("error") 46 ) 47 48 func init() { 49 types.Add("vslm:VslmEventVslmEventInfoState", reflect.TypeOf((*VslmEventVslmEventInfoState)(nil)).Elem()) 50 } 51 52 // List of possible states of a task. 53 type VslmTaskInfoState string 54 55 const ( 56 // When there are too many tasks for threads to handle. 57 VslmTaskInfoStateQueued = VslmTaskInfoState("queued") 58 // When the busy thread is freed from its current task by 59 // finishing the task, it picks a queued task to run. 60 // 61 // Then the queued tasks are marked as running. 62 VslmTaskInfoStateRunning = VslmTaskInfoState("running") 63 // When a running task has completed. 64 VslmTaskInfoStateSuccess = VslmTaskInfoState("success") 65 // When a running task has encountered an error. 66 VslmTaskInfoStateError = VslmTaskInfoState("error") 67 ) 68 69 func init() { 70 types.Add("vslm:VslmTaskInfoState", reflect.TypeOf((*VslmTaskInfoState)(nil)).Elem()) 71 } 72 73 // The `VslmVsoVStorageObjectQuerySpecQueryFieldEnum_enum` enumerated 74 // type defines the searchable fields. 75 type VslmVsoVStorageObjectQuerySpecQueryFieldEnum string 76 77 const ( 78 // Indicates `BaseConfigInfo.id` as the searchable field. 79 VslmVsoVStorageObjectQuerySpecQueryFieldEnumId = VslmVsoVStorageObjectQuerySpecQueryFieldEnum("id") 80 // Indicates `BaseConfigInfo.name` as the searchable 81 // field. 82 VslmVsoVStorageObjectQuerySpecQueryFieldEnumName = VslmVsoVStorageObjectQuerySpecQueryFieldEnum("name") 83 // Indicates `vim.vslm.VStorageObject#capacityInMB` as the 84 // searchable field. 85 VslmVsoVStorageObjectQuerySpecQueryFieldEnumCapacity = VslmVsoVStorageObjectQuerySpecQueryFieldEnum("capacity") 86 // Indicates `BaseConfigInfo.createTime` as the searchable 87 // field. 88 VslmVsoVStorageObjectQuerySpecQueryFieldEnumCreateTime = VslmVsoVStorageObjectQuerySpecQueryFieldEnum("createTime") 89 // Indicates 90 // `BaseConfigInfoFileBackingInfo.backingObjectId` as the 91 // searchable field. 92 VslmVsoVStorageObjectQuerySpecQueryFieldEnumBackingObjectId = VslmVsoVStorageObjectQuerySpecQueryFieldEnum("backingObjectId") 93 // Indicates `BaseConfigInfoBackingInfo.datastore` as the 94 // searchable field. 95 VslmVsoVStorageObjectQuerySpecQueryFieldEnumDatastoreMoId = VslmVsoVStorageObjectQuerySpecQueryFieldEnum("datastoreMoId") 96 // Indicates it as the searchable field. 97 VslmVsoVStorageObjectQuerySpecQueryFieldEnumMetadataKey = VslmVsoVStorageObjectQuerySpecQueryFieldEnum("metadataKey") 98 // Indicates it as the searchable field. 99 VslmVsoVStorageObjectQuerySpecQueryFieldEnumMetadataValue = VslmVsoVStorageObjectQuerySpecQueryFieldEnum("metadataValue") 100 ) 101 102 func init() { 103 types.Add("vslm:VslmVsoVStorageObjectQuerySpecQueryFieldEnum", reflect.TypeOf((*VslmVsoVStorageObjectQuerySpecQueryFieldEnum)(nil)).Elem()) 104 } 105 106 // The `VslmVsoVStorageObjectQuerySpecQueryOperatorEnum_enum` enumerated 107 // type defines the operators to use for constructing the query criteria. 108 type VslmVsoVStorageObjectQuerySpecQueryOperatorEnum string 109 110 const ( 111 VslmVsoVStorageObjectQuerySpecQueryOperatorEnumEquals = VslmVsoVStorageObjectQuerySpecQueryOperatorEnum("equals") 112 VslmVsoVStorageObjectQuerySpecQueryOperatorEnumNotEquals = VslmVsoVStorageObjectQuerySpecQueryOperatorEnum("notEquals") 113 VslmVsoVStorageObjectQuerySpecQueryOperatorEnumLessThan = VslmVsoVStorageObjectQuerySpecQueryOperatorEnum("lessThan") 114 VslmVsoVStorageObjectQuerySpecQueryOperatorEnumGreaterThan = VslmVsoVStorageObjectQuerySpecQueryOperatorEnum("greaterThan") 115 VslmVsoVStorageObjectQuerySpecQueryOperatorEnumLessThanOrEqual = VslmVsoVStorageObjectQuerySpecQueryOperatorEnum("lessThanOrEqual") 116 VslmVsoVStorageObjectQuerySpecQueryOperatorEnumGreaterThanOrEqual = VslmVsoVStorageObjectQuerySpecQueryOperatorEnum("greaterThanOrEqual") 117 VslmVsoVStorageObjectQuerySpecQueryOperatorEnumContains = VslmVsoVStorageObjectQuerySpecQueryOperatorEnum("contains") 118 VslmVsoVStorageObjectQuerySpecQueryOperatorEnumStartsWith = VslmVsoVStorageObjectQuerySpecQueryOperatorEnum("startsWith") 119 VslmVsoVStorageObjectQuerySpecQueryOperatorEnumEndsWith = VslmVsoVStorageObjectQuerySpecQueryOperatorEnum("endsWith") 120 ) 121 122 func init() { 123 types.Add("vslm:VslmVsoVStorageObjectQuerySpecQueryOperatorEnum", reflect.TypeOf((*VslmVsoVStorageObjectQuerySpecQueryOperatorEnum)(nil)).Elem()) 124 }