File: DistributedVirtualSwitch.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 (246 lines) | stat: -rw-r--r-- 10,991 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# 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 long

from pyVmomi.vim import HostSystem
from pyVmomi.vim import ManagedEntity
from pyVmomi.vim import SharesInfo
from pyVmomi.vim import Task
from pyVmomi.vim import VirtualMachine

from pyVmomi.vmodl import DynamicData

from pyVmomi.vim.dvs import DistributedVirtualPort
from pyVmomi.vim.dvs import DistributedVirtualPortgroup
from pyVmomi.vim.dvs import EntityBackup
from pyVmomi.vim.dvs import HostMember
from pyVmomi.vim.dvs import HostProductSpec
from pyVmomi.vim.dvs import KeyedOpaqueBlob
from pyVmomi.vim.dvs import NetworkResourcePool
from pyVmomi.vim.dvs import PortCriteria
from pyVmomi.vim.dvs import ProductSpec
from pyVmomi.vim.dvs import VmVnicNetworkResourcePool

class DistributedVirtualSwitch(ManagedEntity):
   class ProductSpecOperationType(Enum):
      preInstall: ClassVar['ProductSpecOperationType'] = 'preInstall'
      upgrade: ClassVar['ProductSpecOperationType'] = 'upgrade'
      notifyAvailableUpgrade: ClassVar['ProductSpecOperationType'] = 'notifyAvailableUpgrade'
      proceedWithUpgrade: ClassVar['ProductSpecOperationType'] = 'proceedWithUpgrade'
      updateBundleInfo: ClassVar['ProductSpecOperationType'] = 'updateBundleInfo'

   class ContactInfo(DynamicData):
      name: Optional[str] = None
      contact: Optional[str] = None

   class NicTeamingPolicyMode(Enum):
      loadbalance_ip: ClassVar['NicTeamingPolicyMode'] = 'loadbalance_ip'
      loadbalance_srcmac: ClassVar['NicTeamingPolicyMode'] = 'loadbalance_srcmac'
      loadbalance_srcid: ClassVar['NicTeamingPolicyMode'] = 'loadbalance_srcid'
      failover_explicit: ClassVar['NicTeamingPolicyMode'] = 'failover_explicit'
      loadbalance_loadbased: ClassVar['NicTeamingPolicyMode'] = 'loadbalance_loadbased'

   class NetworkResourceManagementCapability(DynamicData):
      networkResourceManagementSupported: bool
      networkResourcePoolHighShareValue: int
      qosSupported: bool
      userDefinedNetworkResourcePoolsSupported: bool
      networkResourceControlVersion3Supported: Optional[bool] = None
      userDefinedInfraTrafficPoolSupported: Optional[bool] = None

   class RollbackCapability(DynamicData):
      rollbackSupported: bool

   class BackupRestoreCapability(DynamicData):
      backupRestoreSupported: bool

   class FeatureCapability(DynamicData):
      networkResourceManagementSupported: bool
      vmDirectPathGen2Supported: Optional[bool] = None
      nicTeamingPolicy: list[str] = []
      networkResourcePoolHighShareValue: Optional[int] = None
      networkResourceManagementCapability: Optional[NetworkResourceManagementCapability] = None
      healthCheckCapability: Optional[HealthCheckFeatureCapability] = None
      rollbackCapability: Optional[RollbackCapability] = None
      backupRestoreCapability: Optional[BackupRestoreCapability] = None
      networkFilterSupported: Optional[bool] = None
      macLearningSupported: Optional[bool] = None

   class HealthCheckFeatureCapability(DynamicData):
      pass

   class Capability(DynamicData):
      dvsOperationSupported: Optional[bool] = None
      dvPortGroupOperationSupported: Optional[bool] = None
      dvPortOperationSupported: Optional[bool] = None
      compatibleHostComponentProductInfo: list[HostProductSpec] = []
      featuresSupported: Optional[FeatureCapability] = None

   class Summary(DynamicData):
      name: str
      uuid: str
      numPorts: int
      productInfo: Optional[ProductSpec] = None
      hostMember: list[HostSystem] = []
      vm: list[VirtualMachine] = []
      host: list[HostSystem] = []
      portgroupName: list[str] = []
      description: Optional[str] = None
      contact: Optional[ContactInfo] = None
      numHosts: Optional[int] = None

   class SwitchPolicy(DynamicData):
      autoPreInstallAllowed: Optional[bool] = None
      autoUpgradeAllowed: Optional[bool] = None
      partialUpgradeAllowed: Optional[bool] = None

   class UplinkPortPolicy(DynamicData):
      pass

   class NameArrayUplinkPortPolicy(UplinkPortPolicy):
      uplinkPortName: list[str] = []

   class ConfigSpec(DynamicData):
      configVersion: Optional[str] = None
      name: Optional[str] = None
      numStandalonePorts: Optional[int] = None
      maxPorts: Optional[int] = None
      uplinkPortPolicy: Optional[UplinkPortPolicy] = None
      uplinkPortgroup: list[DistributedVirtualPortgroup] = []
      defaultPortConfig: Optional[DistributedVirtualPort.Setting] = None
      host: list[HostMember.ConfigSpec] = []
      extensionKey: Optional[str] = None
      description: Optional[str] = None
      policy: Optional[SwitchPolicy] = None
      vendorSpecificConfig: list[KeyedOpaqueBlob] = []
      contact: Optional[ContactInfo] = None
      switchIpAddress: Optional[str] = None
      defaultProxySwitchMaxNumPorts: Optional[int] = None
      infrastructureTrafficResourceConfig: list[HostInfrastructureTrafficResource] = []
      netResourcePoolTrafficResourceConfig: list[HostInfrastructureTrafficResource] = []
      networkResourceControlVersion: Optional[str] = None

   class CreateSpec(DynamicData):
      configSpec: ConfigSpec
      productInfo: Optional[ProductSpec] = None
      capability: Optional[Capability] = None

   class ConfigInfo(DynamicData):
      uuid: str
      name: str
      numStandalonePorts: int
      numPorts: int
      maxPorts: int
      uplinkPortPolicy: UplinkPortPolicy
      uplinkPortgroup: list[DistributedVirtualPortgroup] = []
      defaultPortConfig: DistributedVirtualPort.Setting
      host: list[HostMember] = []
      productInfo: ProductSpec
      targetInfo: Optional[ProductSpec] = None
      extensionKey: Optional[str] = None
      vendorSpecificConfig: list[KeyedOpaqueBlob] = []
      policy: Optional[SwitchPolicy] = None
      description: Optional[str] = None
      configVersion: str
      contact: ContactInfo
      switchIpAddress: Optional[str] = None
      createTime: datetime
      networkResourceManagementEnabled: bool
      defaultProxySwitchMaxNumPorts: Optional[int] = None
      healthCheckConfig: list[HealthCheckConfig] = []
      infrastructureTrafficResourceConfig: list[HostInfrastructureTrafficResource] = []
      netResourcePoolTrafficResourceConfig: list[HostInfrastructureTrafficResource] = []
      networkResourceControlVersion: Optional[str] = None
      vmVnicNetworkResourcePool: list[VmVnicNetworkResourcePool] = []
      pnicCapacityRatioForReservation: Optional[int] = None

   class NetworkResourceControlVersion(Enum):
      version2: ClassVar['NetworkResourceControlVersion'] = 'version2'
      version3: ClassVar['NetworkResourceControlVersion'] = 'version3'

   class HostInfrastructureTrafficClass(Enum):
      management: ClassVar['HostInfrastructureTrafficClass'] = 'management'
      faultTolerance: ClassVar['HostInfrastructureTrafficClass'] = 'faultTolerance'
      vmotion: ClassVar['HostInfrastructureTrafficClass'] = 'vmotion'
      virtualMachine: ClassVar['HostInfrastructureTrafficClass'] = 'virtualMachine'
      iSCSI: ClassVar['HostInfrastructureTrafficClass'] = 'iSCSI'
      nfs: ClassVar['HostInfrastructureTrafficClass'] = 'nfs'
      hbr: ClassVar['HostInfrastructureTrafficClass'] = 'hbr'
      vsan: ClassVar['HostInfrastructureTrafficClass'] = 'vsan'
      vdp: ClassVar['HostInfrastructureTrafficClass'] = 'vdp'
      backupNfc: ClassVar['HostInfrastructureTrafficClass'] = 'backupNfc'
      nvmetcp: ClassVar['HostInfrastructureTrafficClass'] = 'nvmetcp'
      provisioning: ClassVar['HostInfrastructureTrafficClass'] = 'provisioning'

   class HostInfrastructureTrafficResource(DynamicData):
      class ResourceAllocation(DynamicData):
         limit: Optional[long] = None
         shares: Optional[SharesInfo] = None
         reservation: Optional[long] = None

      key: str
      description: Optional[str] = None
      allocationInfo: ResourceAllocation

   class HealthCheckConfig(DynamicData):
      enable: Optional[bool] = None
      interval: Optional[int] = None

   class ResourceRuntimeInfo(DynamicData):
      capacity: Optional[int] = None
      usage: Optional[int] = None
      available: Optional[int] = None
      allocatedResource: list[VmVnicNetworkResourcePool.VnicAllocatedResource] = []
      vmVnicNetworkResourcePoolRuntime: list[VmVnicNetworkResourcePool.RuntimeInfo] = []

   class RuntimeInfo(DynamicData):
      hostMemberRuntime: list[HostMember.RuntimeInfo] = []
      resourceRuntimeInfo: Optional[ResourceRuntimeInfo] = None

   @property
   def uuid(self) -> str: ...
   @property
   def capability(self) -> Capability: ...
   @property
   def summary(self) -> Summary: ...
   @property
   def config(self) -> ConfigInfo: ...
   @property
   def networkResourcePool(self) -> list[NetworkResourcePool]: ...
   @property
   def portgroup(self) -> list[DistributedVirtualPortgroup]: ...
   @property
   def runtime(self) -> Optional[RuntimeInfo]: ...

   def FetchPortKeys(self, criteria: Optional[PortCriteria]) -> list[str]: ...
   def FetchPorts(self, criteria: Optional[PortCriteria]) -> list[DistributedVirtualPort]: ...
   def QueryUsedVlanId(self) -> list[int]: ...
   def Reconfigure(self, spec: ConfigSpec) -> Task: ...
   def PerformProductSpecOperation(self, operation: str, productSpec: Optional[ProductSpec]) -> Task: ...
   def Merge(self, dvs: DistributedVirtualSwitch) -> Task: ...
   def AddPortgroups(self, spec: list[DistributedVirtualPortgroup.ConfigSpec]) -> Task: ...
   def MovePort(self, portKey: list[str], destinationPortgroupKey: Optional[str]) -> Task: ...
   def UpdateCapability(self, capability: Capability) -> NoReturn: ...
   def ReconfigurePort(self, port: list[DistributedVirtualPort.ConfigSpec]) -> Task: ...
   def RefreshPortState(self, portKeys: list[str]) -> NoReturn: ...
   def RectifyHost(self, hosts: list[HostSystem]) -> Task: ...
   def UpdateNetworkResourcePool(self, configSpec: list[NetworkResourcePool.ConfigSpec]) -> NoReturn: ...
   def AddNetworkResourcePool(self, configSpec: list[NetworkResourcePool.ConfigSpec]) -> NoReturn: ...
   def RemoveNetworkResourcePool(self, key: list[str]) -> NoReturn: ...
   def ReconfigureVmVnicNetworkResourcePool(self, configSpec: list[VmVnicNetworkResourcePool.ConfigSpec]) -> Task: ...
   def EnableNetworkResourceManagement(self, enable: bool) -> NoReturn: ...
   def Rollback(self, entityBackup: Optional[EntityBackup.Config]) -> Task: ...
   def AddPortgroup(self, spec: DistributedVirtualPortgroup.ConfigSpec) -> Task: ...
   def UpdateHealthCheckConfig(self, healthCheckConfig: list[HealthCheckConfig]) -> Task: ...
   def LookupPortgroup(self, portgroupKey: str) -> Optional[DistributedVirtualPortgroup]: ...