1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
|
# Copyright (c) 2006-2025 Broadcom. All Rights Reserved.
# Broadcom Confidential. The term "Broadcom" refers to Broadcom Inc.
# and/or its subsidiaries.
# ******* WARNING - AUTO GENERATED CODE - DO NOT EDIT *******
from datetime import datetime
from typing import ClassVar
from typing import NoReturn
from typing import Optional
from pyVmomi.VmomiSupport import Enum
from pyVmomi.vim import HostSystem
from pyVmomi.vim import KeyValue
from pyVmomi.vim import ManagedEntity
from pyVmomi.vim import Task
from pyVmomi.vim import VirtualMachine
from pyVmomi.vmodl import DynamicData
from pyVmomi.vim.encryption import CryptoKeyId
from pyVmomi.vim.encryption import CryptoKeyResult
from pyVmomi.vim.encryption import CryptoManager
from pyVmomi.vim.encryption import KeyProviderId
from pyVmomi.vim.encryption import KmipClusterInfo
from pyVmomi.vim.encryption import KmipServerInfo
from pyVmomi.vim.encryption import KmipServerSpec
class CryptoManagerKmip(CryptoManager):
class CertificateInfo(DynamicData):
subject: str
issuer: str
serialNumber: str
notBefore: datetime
notAfter: datetime
fingerprint: str
checkTime: datetime
secondsSinceValid: Optional[int] = None
secondsBeforeExpire: Optional[int] = None
class ServerStatus(DynamicData):
name: str
status: ManagedEntity.Status
connectionStatus: str
certInfo: Optional[CertificateInfo] = None
clientTrustServer: Optional[bool] = None
serverTrustClient: Optional[bool] = None
class ClusterStatus(DynamicData):
clusterId: KeyProviderId
overallStatus: Optional[ManagedEntity.Status] = None
managementType: Optional[str] = None
servers: list[ServerStatus] = []
clientCertInfo: Optional[CertificateInfo] = None
class GenerateKeySpec(DynamicData):
keyType: Optional[str] = None
class ServerCertInfo(DynamicData):
certificate: str
certInfo: Optional[CertificateInfo] = None
clientTrustServer: Optional[bool] = None
class CertSignRequest(DynamicData):
commonName: Optional[str] = None
organization: Optional[str] = None
organizationUnit: Optional[str] = None
locality: Optional[str] = None
state: Optional[str] = None
country: Optional[str] = None
email: Optional[str] = None
class CryptoKeyStatus(DynamicData):
class KeyUnavailableReason(Enum):
KeyStateMissingInCache: ClassVar['KeyUnavailableReason'] = 'KeyStateMissingInCache'
KeyStateClusterInvalid: ClassVar['KeyUnavailableReason'] = 'KeyStateClusterInvalid'
KeyStateClusterUnreachable: ClassVar['KeyUnavailableReason'] = 'KeyStateClusterUnreachable'
KeyStateMissingInKMS: ClassVar['KeyUnavailableReason'] = 'KeyStateMissingInKMS'
KeyStateNotActiveOrEnabled: ClassVar['KeyUnavailableReason'] = 'KeyStateNotActiveOrEnabled'
KeyStateManagedByTrustAuthority: ClassVar['KeyUnavailableReason'] = 'KeyStateManagedByTrustAuthority'
KeyStateManagedByNKP: ClassVar['KeyUnavailableReason'] = 'KeyStateManagedByNKP'
NoPermissionToAccessKeyProvider: ClassVar['KeyUnavailableReason'] = 'NoPermissionToAccessKeyProvider'
WrappingKeyMissingInKMS: ClassVar['KeyUnavailableReason'] = 'WrappingKeyMissingInKMS'
WrappingKeyNotActiveOrEnabled: ClassVar['KeyUnavailableReason'] = 'WrappingKeyNotActiveOrEnabled'
class KeyInfo(DynamicData):
keyId: str
class WrappingKeyIdKeyInfo(CryptoKeyStatus.KeyInfo):
configuredTime: Optional[datetime] = None
class WrappingRotationIntervalKeyInfo(CryptoKeyStatus.KeyInfo):
createTime: Optional[datetime] = None
rotateTime: Optional[datetime] = None
keyId: CryptoKeyId
keyAvailable: Optional[bool] = None
reason: Optional[str] = None
keyInfo: Optional[KeyInfo] = None
encryptedVMs: list[VirtualMachine] = []
affectedHosts: list[HostSystem] = []
referencedByTags: list[str] = []
class CustomAttributeSpec(DynamicData):
attributes: list[KeyValue] = []
@property
def kmipServers(self) -> list[KmipClusterInfo]: ...
def RegisterKmipServer(self, server: KmipServerSpec) -> NoReturn: ...
def MarkDefault(self, clusterId: KeyProviderId) -> NoReturn: ...
def UpdateKmipServer(self, server: KmipServerSpec) -> NoReturn: ...
def RemoveKmipServer(self, clusterId: KeyProviderId, serverName: str) -> NoReturn: ...
def ListKmipServers(self, limit: Optional[int]) -> list[KmipClusterInfo]: ...
def RetrieveKmipServersStatus(self, clusters: list[KmipClusterInfo]) -> Task: ...
def GenerateKey(self, keyProvider: Optional[KeyProviderId], spec: Optional[CustomAttributeSpec], keySpec: Optional[GenerateKeySpec]) -> CryptoKeyResult: ...
def RetrieveKmipServerCert(self, keyProvider: KeyProviderId, server: KmipServerInfo) -> ServerCertInfo: ...
def UploadKmipServerCert(self, cluster: KeyProviderId, certificate: str) -> NoReturn: ...
def GenerateSelfSignedClientCert(self, cluster: KeyProviderId, request: Optional[CertSignRequest]) -> str: ...
def GenerateClientCsr(self, cluster: KeyProviderId, request: Optional[CertSignRequest]) -> str: ...
def RetrieveSelfSignedClientCert(self, cluster: KeyProviderId) -> str: ...
def RetrieveClientCsr(self, cluster: KeyProviderId) -> str: ...
def RetrieveClientCert(self, cluster: KeyProviderId) -> str: ...
def UpdateSelfSignedClientCert(self, cluster: KeyProviderId, certificate: str) -> NoReturn: ...
def UpdateKmsSignedCsrClientCert(self, cluster: KeyProviderId, certificate: str) -> NoReturn: ...
def UploadClientCert(self, cluster: KeyProviderId, certificate: str, privateKey: str) -> NoReturn: ...
def IsKmsClusterActive(self, cluster: Optional[KeyProviderId]) -> bool: ...
def SetDefaultKmsCluster(self, entity: Optional[ManagedEntity], clusterId: Optional[KeyProviderId]) -> NoReturn: ...
def GetDefaultKmsCluster(self, entity: Optional[ManagedEntity], defaultsToParent: Optional[bool]) -> Optional[KeyProviderId]: ...
def QueryCryptoKeyStatus(self, keyIds: list[CryptoKeyId], checkKeyBitMap: int) -> list[CryptoKeyStatus]: ...
def RegisterKmsCluster(self, clusterId: KeyProviderId, managementType: Optional[str]) -> NoReturn: ...
def UnregisterKmsCluster(self, clusterId: KeyProviderId) -> NoReturn: ...
def ListKmsClusters(self, includeKmsServers: Optional[bool], managementTypeFilter: Optional[int], statusFilter: Optional[int]) -> list[KmipClusterInfo]: ...
def SetKeyCustomAttributes(self, keyId: CryptoKeyId, spec: CustomAttributeSpec) -> CryptoKeyResult: ...
|