github.com/vmware/govmomi@v0.43.0/sms/types/enum.go (about) 1 /* 2 Copyright (c) 2014-2024 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 AlarmType string 26 27 const ( 28 AlarmTypeSpaceCapacityAlarm = AlarmType("SpaceCapacityAlarm") 29 AlarmTypeCapabilityAlarm = AlarmType("CapabilityAlarm") 30 AlarmTypeStorageObjectAlarm = AlarmType("StorageObjectAlarm") 31 AlarmTypeObjectAlarm = AlarmType("ObjectAlarm") 32 AlarmTypeComplianceAlarm = AlarmType("ComplianceAlarm") 33 AlarmTypeManageabilityAlarm = AlarmType("ManageabilityAlarm") 34 AlarmTypeReplicationAlarm = AlarmType("ReplicationAlarm") 35 AlarmTypeCertificateAlarm = AlarmType("CertificateAlarm") 36 ) 37 38 func (e AlarmType) Values() []AlarmType { 39 return []AlarmType{ 40 AlarmTypeSpaceCapacityAlarm, 41 AlarmTypeCapabilityAlarm, 42 AlarmTypeStorageObjectAlarm, 43 AlarmTypeObjectAlarm, 44 AlarmTypeComplianceAlarm, 45 AlarmTypeManageabilityAlarm, 46 AlarmTypeReplicationAlarm, 47 AlarmTypeCertificateAlarm, 48 } 49 } 50 51 func (e AlarmType) Strings() []string { 52 return types.EnumValuesAsStrings(e.Values()) 53 } 54 55 func init() { 56 types.Add("sms:AlarmType", reflect.TypeOf((*AlarmType)(nil)).Elem()) 57 } 58 59 // List of possible BackingStoragePool types 60 type BackingStoragePoolType string 61 62 const ( 63 BackingStoragePoolTypeThinProvisioningPool = BackingStoragePoolType("thinProvisioningPool") 64 BackingStoragePoolTypeDeduplicationPool = BackingStoragePoolType("deduplicationPool") 65 BackingStoragePoolTypeThinAndDeduplicationCombinedPool = BackingStoragePoolType("thinAndDeduplicationCombinedPool") 66 ) 67 68 func (e BackingStoragePoolType) Values() []BackingStoragePoolType { 69 return []BackingStoragePoolType{ 70 BackingStoragePoolTypeThinProvisioningPool, 71 BackingStoragePoolTypeDeduplicationPool, 72 BackingStoragePoolTypeThinAndDeduplicationCombinedPool, 73 } 74 } 75 76 func (e BackingStoragePoolType) Strings() []string { 77 return types.EnumValuesAsStrings(e.Values()) 78 } 79 80 func init() { 81 types.Add("sms:BackingStoragePoolType", reflect.TypeOf((*BackingStoragePoolType)(nil)).Elem()) 82 } 83 84 // List of possible block device interfaces 85 type BlockDeviceInterface string 86 87 const ( 88 BlockDeviceInterfaceFc = BlockDeviceInterface("fc") 89 BlockDeviceInterfaceIscsi = BlockDeviceInterface("iscsi") 90 BlockDeviceInterfaceFcoe = BlockDeviceInterface("fcoe") 91 BlockDeviceInterfaceOtherBlock = BlockDeviceInterface("otherBlock") 92 ) 93 94 func (e BlockDeviceInterface) Values() []BlockDeviceInterface { 95 return []BlockDeviceInterface{ 96 BlockDeviceInterfaceFc, 97 BlockDeviceInterfaceIscsi, 98 BlockDeviceInterfaceFcoe, 99 BlockDeviceInterfaceOtherBlock, 100 } 101 } 102 103 func (e BlockDeviceInterface) Strings() []string { 104 return types.EnumValuesAsStrings(e.Values()) 105 } 106 107 func init() { 108 types.Add("sms:BlockDeviceInterface", reflect.TypeOf((*BlockDeviceInterface)(nil)).Elem()) 109 } 110 111 // Types of entities supported by the service. 112 type EntityReferenceEntityType string 113 114 const ( 115 EntityReferenceEntityTypeDatacenter = EntityReferenceEntityType("datacenter") 116 EntityReferenceEntityTypeResourcePool = EntityReferenceEntityType("resourcePool") 117 EntityReferenceEntityTypeStoragePod = EntityReferenceEntityType("storagePod") 118 EntityReferenceEntityTypeCluster = EntityReferenceEntityType("cluster") 119 EntityReferenceEntityTypeVm = EntityReferenceEntityType("vm") 120 EntityReferenceEntityTypeDatastore = EntityReferenceEntityType("datastore") 121 EntityReferenceEntityTypeHost = EntityReferenceEntityType("host") 122 EntityReferenceEntityTypeVmFile = EntityReferenceEntityType("vmFile") 123 EntityReferenceEntityTypeScsiPath = EntityReferenceEntityType("scsiPath") 124 EntityReferenceEntityTypeScsiTarget = EntityReferenceEntityType("scsiTarget") 125 EntityReferenceEntityTypeScsiVolume = EntityReferenceEntityType("scsiVolume") 126 EntityReferenceEntityTypeScsiAdapter = EntityReferenceEntityType("scsiAdapter") 127 EntityReferenceEntityTypeNasMount = EntityReferenceEntityType("nasMount") 128 ) 129 130 func (e EntityReferenceEntityType) Values() []EntityReferenceEntityType { 131 return []EntityReferenceEntityType{ 132 EntityReferenceEntityTypeDatacenter, 133 EntityReferenceEntityTypeResourcePool, 134 EntityReferenceEntityTypeStoragePod, 135 EntityReferenceEntityTypeCluster, 136 EntityReferenceEntityTypeVm, 137 EntityReferenceEntityTypeDatastore, 138 EntityReferenceEntityTypeHost, 139 EntityReferenceEntityTypeVmFile, 140 EntityReferenceEntityTypeScsiPath, 141 EntityReferenceEntityTypeScsiTarget, 142 EntityReferenceEntityTypeScsiVolume, 143 EntityReferenceEntityTypeScsiAdapter, 144 EntityReferenceEntityTypeNasMount, 145 } 146 } 147 148 func (e EntityReferenceEntityType) Strings() []string { 149 return types.EnumValuesAsStrings(e.Values()) 150 } 151 152 func init() { 153 types.Add("sms:EntityReferenceEntityType", reflect.TypeOf((*EntityReferenceEntityType)(nil)).Elem()) 154 } 155 156 // List of possible file system interfaces 157 type FileSystemInterface string 158 159 const ( 160 FileSystemInterfaceNfs = FileSystemInterface("nfs") 161 FileSystemInterfaceOtherFileSystem = FileSystemInterface("otherFileSystem") 162 ) 163 164 func (e FileSystemInterface) Values() []FileSystemInterface { 165 return []FileSystemInterface{ 166 FileSystemInterfaceNfs, 167 FileSystemInterfaceOtherFileSystem, 168 } 169 } 170 171 func (e FileSystemInterface) Strings() []string { 172 return types.EnumValuesAsStrings(e.Values()) 173 } 174 175 func init() { 176 types.Add("sms:FileSystemInterface", reflect.TypeOf((*FileSystemInterface)(nil)).Elem()) 177 } 178 179 type FileSystemInterfaceVersion string 180 181 const ( 182 FileSystemInterfaceVersionNFSV3_0 = FileSystemInterfaceVersion("NFSV3_0") 183 ) 184 185 func (e FileSystemInterfaceVersion) Values() []FileSystemInterfaceVersion { 186 return []FileSystemInterfaceVersion{ 187 FileSystemInterfaceVersionNFSV3_0, 188 } 189 } 190 191 func (e FileSystemInterfaceVersion) Strings() []string { 192 return types.EnumValuesAsStrings(e.Values()) 193 } 194 195 func init() { 196 types.Add("sms:FileSystemInterfaceVersion", reflect.TypeOf((*FileSystemInterfaceVersion)(nil)).Elem()) 197 } 198 199 // Profiles supported by VASA Provider. 200 type ProviderProfile string 201 202 const ( 203 // PBM profile 204 ProviderProfileProfileBasedManagement = ProviderProfile("ProfileBasedManagement") 205 // Replication profile 206 ProviderProfileReplication = ProviderProfile("Replication") 207 ) 208 209 func (e ProviderProfile) Values() []ProviderProfile { 210 return []ProviderProfile{ 211 ProviderProfileProfileBasedManagement, 212 ProviderProfileReplication, 213 } 214 } 215 216 func (e ProviderProfile) Strings() []string { 217 return types.EnumValuesAsStrings(e.Values()) 218 } 219 220 func init() { 221 types.Add("sms:ProviderProfile", reflect.TypeOf((*ProviderProfile)(nil)).Elem()) 222 } 223 224 // State of the replication group at the site of the query. 225 // 226 // A replication group 227 // may be in different states at the source site and each of the target sites. 228 // Note that this state does not capture the health of the replication link. If 229 // necessary, that can be an additional attribute. 230 type ReplicationReplicationState string 231 232 const ( 233 // Replication Source 234 ReplicationReplicationStateSOURCE = ReplicationReplicationState("SOURCE") 235 // Replication target 236 ReplicationReplicationStateTARGET = ReplicationReplicationState("TARGET") 237 // The group failed over at this site of the query. 238 // 239 // It has not yet been made 240 // as a source of replication. 241 ReplicationReplicationStateFAILEDOVER = ReplicationReplicationState("FAILEDOVER") 242 // The group is InTest. 243 // 244 // The testFailover devices list will be available from 245 // the `TargetGroupMemberInfo` 246 ReplicationReplicationStateINTEST = ReplicationReplicationState("INTEST") 247 // Remote group was failed over, and this site is neither the source nor the 248 // target. 249 ReplicationReplicationStateREMOTE_FAILEDOVER = ReplicationReplicationState("REMOTE_FAILEDOVER") 250 ) 251 252 func (e ReplicationReplicationState) Values() []ReplicationReplicationState { 253 return []ReplicationReplicationState{ 254 ReplicationReplicationStateSOURCE, 255 ReplicationReplicationStateTARGET, 256 ReplicationReplicationStateFAILEDOVER, 257 ReplicationReplicationStateINTEST, 258 ReplicationReplicationStateREMOTE_FAILEDOVER, 259 } 260 } 261 262 func (e ReplicationReplicationState) Strings() []string { 263 return types.EnumValuesAsStrings(e.Values()) 264 } 265 266 func init() { 267 types.Add("sms:ReplicationReplicationState", reflect.TypeOf((*ReplicationReplicationState)(nil)).Elem()) 268 } 269 270 // Enumeration of the supported Alarm Status values 271 type SmsAlarmStatus string 272 273 const ( 274 SmsAlarmStatusRed = SmsAlarmStatus("Red") 275 SmsAlarmStatusGreen = SmsAlarmStatus("Green") 276 SmsAlarmStatusYellow = SmsAlarmStatus("Yellow") 277 ) 278 279 func (e SmsAlarmStatus) Values() []SmsAlarmStatus { 280 return []SmsAlarmStatus{ 281 SmsAlarmStatusRed, 282 SmsAlarmStatusGreen, 283 SmsAlarmStatusYellow, 284 } 285 } 286 287 func (e SmsAlarmStatus) Strings() []string { 288 return types.EnumValuesAsStrings(e.Values()) 289 } 290 291 func init() { 292 types.Add("sms:SmsAlarmStatus", reflect.TypeOf((*SmsAlarmStatus)(nil)).Elem()) 293 } 294 295 // Enumeration of the supported Entity Type values. 296 type SmsEntityType string 297 298 const ( 299 SmsEntityTypeStorageArrayEntity = SmsEntityType("StorageArrayEntity") 300 SmsEntityTypeStorageProcessorEntity = SmsEntityType("StorageProcessorEntity") 301 SmsEntityTypeStoragePortEntity = SmsEntityType("StoragePortEntity") 302 SmsEntityTypeStorageLunEntity = SmsEntityType("StorageLunEntity") 303 SmsEntityTypeStorageFileSystemEntity = SmsEntityType("StorageFileSystemEntity") 304 SmsEntityTypeStorageCapabilityEntity = SmsEntityType("StorageCapabilityEntity") 305 SmsEntityTypeCapabilitySchemaEntity = SmsEntityType("CapabilitySchemaEntity") 306 SmsEntityTypeCapabilityProfileEntity = SmsEntityType("CapabilityProfileEntity") 307 SmsEntityTypeDefaultProfileEntity = SmsEntityType("DefaultProfileEntity") 308 SmsEntityTypeResourceAssociationEntity = SmsEntityType("ResourceAssociationEntity") 309 SmsEntityTypeStorageContainerEntity = SmsEntityType("StorageContainerEntity") 310 SmsEntityTypeStorageObjectEntity = SmsEntityType("StorageObjectEntity") 311 SmsEntityTypeMessageCatalogEntity = SmsEntityType("MessageCatalogEntity") 312 SmsEntityTypeProtocolEndpointEntity = SmsEntityType("ProtocolEndpointEntity") 313 SmsEntityTypeVirtualVolumeInfoEntity = SmsEntityType("VirtualVolumeInfoEntity") 314 SmsEntityTypeBackingStoragePoolEntity = SmsEntityType("BackingStoragePoolEntity") 315 SmsEntityTypeFaultDomainEntity = SmsEntityType("FaultDomainEntity") 316 SmsEntityTypeReplicationGroupEntity = SmsEntityType("ReplicationGroupEntity") 317 ) 318 319 func (e SmsEntityType) Values() []SmsEntityType { 320 return []SmsEntityType{ 321 SmsEntityTypeStorageArrayEntity, 322 SmsEntityTypeStorageProcessorEntity, 323 SmsEntityTypeStoragePortEntity, 324 SmsEntityTypeStorageLunEntity, 325 SmsEntityTypeStorageFileSystemEntity, 326 SmsEntityTypeStorageCapabilityEntity, 327 SmsEntityTypeCapabilitySchemaEntity, 328 SmsEntityTypeCapabilityProfileEntity, 329 SmsEntityTypeDefaultProfileEntity, 330 SmsEntityTypeResourceAssociationEntity, 331 SmsEntityTypeStorageContainerEntity, 332 SmsEntityTypeStorageObjectEntity, 333 SmsEntityTypeMessageCatalogEntity, 334 SmsEntityTypeProtocolEndpointEntity, 335 SmsEntityTypeVirtualVolumeInfoEntity, 336 SmsEntityTypeBackingStoragePoolEntity, 337 SmsEntityTypeFaultDomainEntity, 338 SmsEntityTypeReplicationGroupEntity, 339 } 340 } 341 342 func (e SmsEntityType) Strings() []string { 343 return types.EnumValuesAsStrings(e.Values()) 344 } 345 346 func init() { 347 types.Add("sms:SmsEntityType", reflect.TypeOf((*SmsEntityType)(nil)).Elem()) 348 } 349 350 // List of possible states of a task. 351 type SmsTaskState string 352 353 const ( 354 // Task is put in the queue. 355 SmsTaskStateQueued = SmsTaskState("queued") 356 // Task is currently running. 357 SmsTaskStateRunning = SmsTaskState("running") 358 // Task has completed. 359 SmsTaskStateSuccess = SmsTaskState("success") 360 // Task has encountered an error or has been canceled. 361 SmsTaskStateError = SmsTaskState("error") 362 ) 363 364 func (e SmsTaskState) Values() []SmsTaskState { 365 return []SmsTaskState{ 366 SmsTaskStateQueued, 367 SmsTaskStateRunning, 368 SmsTaskStateSuccess, 369 SmsTaskStateError, 370 } 371 } 372 373 func (e SmsTaskState) Strings() []string { 374 return types.EnumValuesAsStrings(e.Values()) 375 } 376 377 func init() { 378 types.Add("sms:SmsTaskState", reflect.TypeOf((*SmsTaskState)(nil)).Elem()) 379 } 380 381 // List of supported VVOL Container types 382 type StorageContainerVvolContainerTypeEnum string 383 384 const ( 385 StorageContainerVvolContainerTypeEnumNFS = StorageContainerVvolContainerTypeEnum("NFS") 386 StorageContainerVvolContainerTypeEnumNFS4x = StorageContainerVvolContainerTypeEnum("NFS4x") 387 StorageContainerVvolContainerTypeEnumSCSI = StorageContainerVvolContainerTypeEnum("SCSI") 388 StorageContainerVvolContainerTypeEnumNVMe = StorageContainerVvolContainerTypeEnum("NVMe") 389 ) 390 391 func (e StorageContainerVvolContainerTypeEnum) Values() []StorageContainerVvolContainerTypeEnum { 392 return []StorageContainerVvolContainerTypeEnum{ 393 StorageContainerVvolContainerTypeEnumNFS, 394 StorageContainerVvolContainerTypeEnumNFS4x, 395 StorageContainerVvolContainerTypeEnumSCSI, 396 StorageContainerVvolContainerTypeEnumNVMe, 397 } 398 } 399 400 func (e StorageContainerVvolContainerTypeEnum) Strings() []string { 401 return types.EnumValuesAsStrings(e.Values()) 402 } 403 404 func init() { 405 types.Add("sms:StorageContainerVvolContainerTypeEnum", reflect.TypeOf((*StorageContainerVvolContainerTypeEnum)(nil)).Elem()) 406 } 407 408 // List of possible values for thin provisioning status alarm. 409 type ThinProvisioningStatus string 410 411 const ( 412 ThinProvisioningStatusRED = ThinProvisioningStatus("RED") 413 ThinProvisioningStatusYELLOW = ThinProvisioningStatus("YELLOW") 414 ThinProvisioningStatusGREEN = ThinProvisioningStatus("GREEN") 415 ) 416 417 func (e ThinProvisioningStatus) Values() []ThinProvisioningStatus { 418 return []ThinProvisioningStatus{ 419 ThinProvisioningStatusRED, 420 ThinProvisioningStatusYELLOW, 421 ThinProvisioningStatusGREEN, 422 } 423 } 424 425 func (e ThinProvisioningStatus) Strings() []string { 426 return types.EnumValuesAsStrings(e.Values()) 427 } 428 429 func init() { 430 types.Add("sms:ThinProvisioningStatus", reflect.TypeOf((*ThinProvisioningStatus)(nil)).Elem()) 431 } 432 433 // VASA provider authentication type. 434 type VasaAuthenticationType string 435 436 const ( 437 // Login using SAML token. 438 VasaAuthenticationTypeLoginByToken = VasaAuthenticationType("LoginByToken") 439 // Use id of an existing session that has logged-in from somewhere else. 440 VasaAuthenticationTypeUseSessionId = VasaAuthenticationType("UseSessionId") 441 ) 442 443 func (e VasaAuthenticationType) Values() []VasaAuthenticationType { 444 return []VasaAuthenticationType{ 445 VasaAuthenticationTypeLoginByToken, 446 VasaAuthenticationTypeUseSessionId, 447 } 448 } 449 450 func (e VasaAuthenticationType) Strings() []string { 451 return types.EnumValuesAsStrings(e.Values()) 452 } 453 454 func init() { 455 types.Add("sms:VasaAuthenticationType", reflect.TypeOf((*VasaAuthenticationType)(nil)).Elem()) 456 } 457 458 // List of possible VASA profiles supported by Storage Array 459 type VasaProfile string 460 461 const ( 462 // Block device profile 463 VasaProfileBlockDevice = VasaProfile("blockDevice") 464 // File system profile 465 VasaProfileFileSystem = VasaProfile("fileSystem") 466 // Storage capability profile 467 VasaProfileCapability = VasaProfile("capability") 468 // Policy profile 469 VasaProfilePolicy = VasaProfile("policy") 470 // Object based storage profile 471 VasaProfileObject = VasaProfile("object") 472 // IO Statistics profile 473 VasaProfileStatistics = VasaProfile("statistics") 474 // Storage DRS specific block device profile 475 VasaProfileStorageDrsBlockDevice = VasaProfile("storageDrsBlockDevice") 476 // Storage DRS specific file system profile 477 VasaProfileStorageDrsFileSystem = VasaProfile("storageDrsFileSystem") 478 ) 479 480 func (e VasaProfile) Values() []VasaProfile { 481 return []VasaProfile{ 482 VasaProfileBlockDevice, 483 VasaProfileFileSystem, 484 VasaProfileCapability, 485 VasaProfilePolicy, 486 VasaProfileObject, 487 VasaProfileStatistics, 488 VasaProfileStorageDrsBlockDevice, 489 VasaProfileStorageDrsFileSystem, 490 } 491 } 492 493 func (e VasaProfile) Strings() []string { 494 return types.EnumValuesAsStrings(e.Values()) 495 } 496 497 func init() { 498 types.Add("sms:VasaProfile", reflect.TypeOf((*VasaProfile)(nil)).Elem()) 499 } 500 501 // The status of the provider certificate 502 type VasaProviderCertificateStatus string 503 504 const ( 505 // Provider certificate is valid. 506 VasaProviderCertificateStatusValid = VasaProviderCertificateStatus("valid") 507 // Provider certificate is within the soft limit threshold. 508 VasaProviderCertificateStatusExpirySoftLimitReached = VasaProviderCertificateStatus("expirySoftLimitReached") 509 // Provider certificate is within the hard limit threshold. 510 VasaProviderCertificateStatusExpiryHardLimitReached = VasaProviderCertificateStatus("expiryHardLimitReached") 511 // Provider certificate has expired. 512 VasaProviderCertificateStatusExpired = VasaProviderCertificateStatus("expired") 513 // Provider certificate is revoked, malformed or missing. 514 VasaProviderCertificateStatusInvalid = VasaProviderCertificateStatus("invalid") 515 ) 516 517 func (e VasaProviderCertificateStatus) Values() []VasaProviderCertificateStatus { 518 return []VasaProviderCertificateStatus{ 519 VasaProviderCertificateStatusValid, 520 VasaProviderCertificateStatusExpirySoftLimitReached, 521 VasaProviderCertificateStatusExpiryHardLimitReached, 522 VasaProviderCertificateStatusExpired, 523 VasaProviderCertificateStatusInvalid, 524 } 525 } 526 527 func (e VasaProviderCertificateStatus) Strings() []string { 528 return types.EnumValuesAsStrings(e.Values()) 529 } 530 531 func init() { 532 types.Add("sms:VasaProviderCertificateStatus", reflect.TypeOf((*VasaProviderCertificateStatus)(nil)).Elem()) 533 } 534 535 // Deprecated as of SMS API 3.0, use `VasaProfile_enum`. 536 // 537 // Profiles supported by VASA Provider. 538 type VasaProviderProfile string 539 540 const ( 541 // Block device profile 542 VasaProviderProfileBlockDevice = VasaProviderProfile("blockDevice") 543 // File system profile 544 VasaProviderProfileFileSystem = VasaProviderProfile("fileSystem") 545 // Storage capability profile 546 VasaProviderProfileCapability = VasaProviderProfile("capability") 547 ) 548 549 func (e VasaProviderProfile) Values() []VasaProviderProfile { 550 return []VasaProviderProfile{ 551 VasaProviderProfileBlockDevice, 552 VasaProviderProfileFileSystem, 553 VasaProviderProfileCapability, 554 } 555 } 556 557 func (e VasaProviderProfile) Strings() []string { 558 return types.EnumValuesAsStrings(e.Values()) 559 } 560 561 func init() { 562 types.Add("sms:VasaProviderProfile", reflect.TypeOf((*VasaProviderProfile)(nil)).Elem()) 563 } 564 565 // The operational state of VASA Provider. 566 type VasaProviderStatus string 567 568 const ( 569 // VASA Provider is operating correctly. 570 VasaProviderStatusOnline = VasaProviderStatus("online") 571 // VASA Provider is not responding, e.g. 572 // 573 // communication error due to temporary 574 // network outage. SMS keeps polling the provider in this state. 575 VasaProviderStatusOffline = VasaProviderStatus("offline") 576 // VASA Provider is connected, but sync operation failed. 577 VasaProviderStatusSyncError = VasaProviderStatus("syncError") 578 // Deprecated as of SMS API 4.0, this status is deprecated. 579 // 580 // VASA Provider is unreachable. 581 VasaProviderStatusUnknown = VasaProviderStatus("unknown") 582 // VASA Provider is connected, but has not triggered sync operation. 583 VasaProviderStatusConnected = VasaProviderStatus("connected") 584 // VASA Provider is disconnected, e.g. 585 // 586 // failed to establish a valid 587 // SSL connection to the provider. SMS stops communication with the 588 // provider in this state. The user can reconnect to the provider by invoking 589 // `VasaProvider.VasaProviderReconnect_Task`. 590 VasaProviderStatusDisconnected = VasaProviderStatus("disconnected") 591 ) 592 593 func (e VasaProviderStatus) Values() []VasaProviderStatus { 594 return []VasaProviderStatus{ 595 VasaProviderStatusOnline, 596 VasaProviderStatusOffline, 597 VasaProviderStatusSyncError, 598 VasaProviderStatusUnknown, 599 VasaProviderStatusConnected, 600 VasaProviderStatusDisconnected, 601 } 602 } 603 604 func (e VasaProviderStatus) Strings() []string { 605 return types.EnumValuesAsStrings(e.Values()) 606 } 607 608 func init() { 609 types.Add("sms:VasaProviderStatus", reflect.TypeOf((*VasaProviderStatus)(nil)).Elem()) 610 } 611 612 // A Category to indicate whether provider is of internal or external category. 613 // 614 // This classification can help selectively enable few administrative functions 615 // such as say unregistration of a provider. 616 type VpCategory string 617 618 const ( 619 // An internal provider category indicates the set of providers such as IOFILTERS and VSAN. 620 VpCategoryInternal = VpCategory("internal") 621 // An external provider category indicates the set of providers are external and not belong 622 // to say either of IOFILTERS or VSAN category. 623 VpCategoryExternal = VpCategory("external") 624 ) 625 626 func (e VpCategory) Values() []VpCategory { 627 return []VpCategory{ 628 VpCategoryInternal, 629 VpCategoryExternal, 630 } 631 } 632 633 func (e VpCategory) Strings() []string { 634 return types.EnumValuesAsStrings(e.Values()) 635 } 636 637 func init() { 638 types.Add("sms:VpCategory", reflect.TypeOf((*VpCategory)(nil)).Elem()) 639 } 640 641 // VASA Provider type. 642 type VpType string 643 644 const ( 645 // Persistence provider. 646 VpTypePERSISTENCE = VpType("PERSISTENCE") 647 // DataService provider. 648 // 649 // No storage supported for this type of provider. 650 VpTypeDATASERVICE = VpType("DATASERVICE") 651 // Type is unknown. 652 // 653 // VASA provider type can be UNKNOWN when it is undergoing sync operation. 654 VpTypeUNKNOWN = VpType("UNKNOWN") 655 ) 656 657 func (e VpType) Values() []VpType { 658 return []VpType{ 659 VpTypePERSISTENCE, 660 VpTypeDATASERVICE, 661 VpTypeUNKNOWN, 662 } 663 } 664 665 func (e VpType) Strings() []string { 666 return types.EnumValuesAsStrings(e.Values()) 667 } 668 669 func init() { 670 types.Add("sms:VpType", reflect.TypeOf((*VpType)(nil)).Elem()) 671 }