File: LicenseManager.pyi

package info (click to toggle)
python-pyvmomi 9.0.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,372 kB
  • sloc: python: 18,622; xml: 77; makefile: 3
file content (178 lines) | stat: -rw-r--r-- 6,547 bytes parent folder | download
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# 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.VmomiSupport import ManagedObject
from pyVmomi.VmomiSupport import long

from pyVmomi.vim import HostSystem
from pyVmomi.vim import KeyValue
from pyVmomi.vim import LicenseAssignmentManager

from pyVmomi.vmodl import DynamicData
from pyVmomi.vmodl import KeyAnyValue

class LicenseManager(ManagedObject):
   class LicenseState(Enum):
      initializing: ClassVar['LicenseState'] = 'initializing'
      normal: ClassVar['LicenseState'] = 'normal'
      marginal: ClassVar['LicenseState'] = 'marginal'
      fault: ClassVar['LicenseState'] = 'fault'

   class LicenseKey(Enum):
      esxFull: ClassVar['LicenseKey'] = 'esxFull'
      esxVmtn: ClassVar['LicenseKey'] = 'esxVmtn'
      esxExpress: ClassVar['LicenseKey'] = 'esxExpress'
      san: ClassVar['LicenseKey'] = 'san'
      iscsi: ClassVar['LicenseKey'] = 'iscsi'
      nas: ClassVar['LicenseKey'] = 'nas'
      vsmp: ClassVar['LicenseKey'] = 'vsmp'
      backup: ClassVar['LicenseKey'] = 'backup'
      vc: ClassVar['LicenseKey'] = 'vc'
      vcExpress: ClassVar['LicenseKey'] = 'vcExpress'
      esxHost: ClassVar['LicenseKey'] = 'esxHost'
      gsxHost: ClassVar['LicenseKey'] = 'gsxHost'
      serverHost: ClassVar['LicenseKey'] = 'serverHost'
      drsPower: ClassVar['LicenseKey'] = 'drsPower'
      vmotion: ClassVar['LicenseKey'] = 'vmotion'
      drs: ClassVar['LicenseKey'] = 'drs'
      das: ClassVar['LicenseKey'] = 'das'

   class LicenseSource(DynamicData):
      pass

   class LicenseServer(LicenseSource):
      licenseServer: str

   class LocalLicense(LicenseSource):
      licenseKeys: str

   class EvaluationLicense(LicenseSource):
      remainingHours: Optional[long] = None

   class FeatureInfo(DynamicData):
      class CostUnit(Enum):
         host: ClassVar['CostUnit'] = 'host'
         cpuCore: ClassVar['CostUnit'] = 'cpuCore'
         cpuPackage: ClassVar['CostUnit'] = 'cpuPackage'
         server: ClassVar['CostUnit'] = 'server'
         vm: ClassVar['CostUnit'] = 'vm'

      class State(Enum):
         enabled: ClassVar['State'] = 'enabled'
         disabled: ClassVar['State'] = 'disabled'
         optional: ClassVar['State'] = 'optional'

      class SourceRestriction(Enum):
         unrestricted: ClassVar['SourceRestriction'] = 'unrestricted'
         served: ClassVar['SourceRestriction'] = 'served'
         file: ClassVar['SourceRestriction'] = 'file'

      key: str
      featureName: str
      featureDescription: Optional[str] = None
      state: Optional[State] = None
      costUnit: str
      sourceRestriction: Optional[str] = None
      dependentKey: list[str] = []
      edition: Optional[bool] = None
      expiresOn: Optional[datetime] = None

   class ReservationInfo(DynamicData):
      class State(Enum):
         notUsed: ClassVar['State'] = 'notUsed'
         noLicense: ClassVar['State'] = 'noLicense'
         unlicensedUse: ClassVar['State'] = 'unlicensedUse'
         licensed: ClassVar['State'] = 'licensed'

      key: str
      state: State
      required: int

   class AvailabilityInfo(DynamicData):
      feature: FeatureInfo
      total: int
      available: int

   class DiagnosticInfo(DynamicData):
      sourceLastChanged: datetime
      sourceLost: str
      sourceLatency: float
      licenseRequests: str
      licenseRequestFailures: str
      licenseFeatureUnknowns: str
      opState: LicenseState
      lastStatusUpdate: datetime
      opFailureMessage: str

   class LicenseUsageInfo(DynamicData):
      source: LicenseSource
      sourceAvailable: bool
      reservationInfo: list[ReservationInfo] = []
      featureInfo: list[FeatureInfo] = []

   class EvaluationInfo(DynamicData):
      properties: list[KeyAnyValue] = []

   class LicensableResourceInfo(DynamicData):
      class ResourceKey(Enum):
         numCpuPackages: ClassVar['ResourceKey'] = 'numCpuPackages'
         numCpuCores: ClassVar['ResourceKey'] = 'numCpuCores'
         memorySize: ClassVar['ResourceKey'] = 'memorySize'
         memoryForVms: ClassVar['ResourceKey'] = 'memoryForVms'
         numVmsStarted: ClassVar['ResourceKey'] = 'numVmsStarted'
         numVmsStarting: ClassVar['ResourceKey'] = 'numVmsStarting'
         vsanCapacity: ClassVar['ResourceKey'] = 'vsanCapacity'

      resource: list[KeyAnyValue] = []

   class LicenseInfo(DynamicData):
      licenseKey: str
      editionKey: str
      name: str
      total: int
      used: Optional[int] = None
      costUnit: str
      properties: list[KeyAnyValue] = []
      labels: list[KeyValue] = []

   @property
   def source(self) -> LicenseSource: ...
   @property
   def sourceAvailable(self) -> bool: ...
   @property
   def diagnostics(self) -> Optional[DiagnosticInfo]: ...
   @property
   def featureInfo(self) -> list[FeatureInfo]: ...
   @property
   def licensedEdition(self) -> str: ...
   @property
   def licenses(self) -> list[LicenseInfo]: ...
   @property
   def licenseAssignmentManager(self) -> Optional[LicenseAssignmentManager]: ...
   @property
   def evaluation(self) -> EvaluationInfo: ...

   def QuerySupportedFeatures(self, host: Optional[HostSystem]) -> list[FeatureInfo]: ...
   def QuerySourceAvailability(self, host: Optional[HostSystem]) -> list[AvailabilityInfo]: ...
   def QueryUsage(self, host: Optional[HostSystem]) -> LicenseUsageInfo: ...
   def SetEdition(self, host: Optional[HostSystem], featureKey: Optional[str]) -> NoReturn: ...
   def CheckFeature(self, host: Optional[HostSystem], featureKey: str) -> bool: ...
   def Enable(self, host: Optional[HostSystem], featureKey: str) -> bool: ...
   def Disable(self, host: Optional[HostSystem], featureKey: str) -> bool: ...
   def ConfigureSource(self, host: Optional[HostSystem], licenseSource: LicenseSource) -> NoReturn: ...
   def UpdateLicense(self, licenseKey: str, labels: list[KeyValue]) -> LicenseInfo: ...
   def AddLicense(self, licenseKey: str, labels: list[KeyValue]) -> LicenseInfo: ...
   def RemoveLicense(self, licenseKey: str) -> NoReturn: ...
   def DecodeLicense(self, licenseKey: str) -> LicenseInfo: ...
   def UpdateLabel(self, licenseKey: str, labelKey: str, labelValue: str) -> NoReturn: ...
   def RemoveLabel(self, licenseKey: str, labelKey: str) -> NoReturn: ...