-
Notifications
You must be signed in to change notification settings - Fork 766
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit of the pyVmomi stubs for type hinting
- Loading branch information
ddraganov
committed
May 5, 2023
1 parent
6de056e
commit 81d0e9f
Showing
67 changed files
with
29,687 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,210 @@ | ||
from typing import List | ||
from enum import Enum | ||
from pyVmomi import eam, vim, vmodl | ||
from pyVmomi.VmomiSupport import ManagedObject, NoneType | ||
from . import issue, vib | ||
|
||
|
||
class Agency(EamObject): | ||
@property | ||
def solutionId(self) -> str: ... | ||
@property | ||
def owner(self) -> str: ... | ||
@property | ||
def config(self) -> Agency.ConfigInfo: ... | ||
@property | ||
def runtime(self) -> EamObject.RuntimeInfo: ... | ||
@property | ||
def agent(self) -> List[Agent]: ... | ||
def QuerySolutionId(self) -> str: ... | ||
def QueryConfig(self) -> Agency.ConfigInfo: ... | ||
def Update(self, config: Agency.ConfigInfo) -> NoneType: ... | ||
def QueryRuntime(self) -> EamObject.RuntimeInfo: ... | ||
def QueryAgent(self) -> List[Agent]: ... | ||
def RegisterAgentVm(self, agentVm: vim.VirtualMachine) -> Agent: ... | ||
def UnregisterAgentVm(self, agentVm: vim.VirtualMachine) -> NoneType: ... | ||
def Enable(self) -> NoneType: ... | ||
def Disable(self) -> NoneType: ... | ||
def Uninstall(self) -> NoneType: ... | ||
def DestroyAgency(self) -> NoneType: ... | ||
def AddIssue(self, issue: issue.Issue) -> issue.Issue: ... | ||
|
||
|
||
class ComputeResourceScope(Agency.Scope): | ||
@property | ||
def computeResource(self) -> List[vim.ComputeResource]: ... | ||
|
||
|
||
class ConfigInfo(vmodl.DynamicData): | ||
@property | ||
def agentConfig(self) -> List[Agent.ConfigInfo]: ... | ||
@property | ||
def scope(self) -> Agency.Scope: ... | ||
@property | ||
def manuallyMarkAgentVmAvailableAfterProvisioning(self) -> bool: ... | ||
@property | ||
def manuallyMarkAgentVmAvailableAfterPowerOn(self) -> bool: ... | ||
@property | ||
def optimizedDeploymentEnabled(self) -> bool: ... | ||
@property | ||
def agentName(self) -> str: ... | ||
@property | ||
def agencyName(self) -> str: ... | ||
@property | ||
def useUuidVmName(self) -> bool: ... | ||
@property | ||
def manuallyProvisioned(self) -> bool: ... | ||
@property | ||
def manuallyMonitored(self) -> bool: ... | ||
@property | ||
def bypassVumEnabled(self) -> bool: ... | ||
@property | ||
def agentVmNetwork(self) -> List[vim.Network]: ... | ||
@property | ||
def agentVmDatastore(self) -> List[vim.Datastore]: ... | ||
@property | ||
def preferHostConfiguration(self) -> bool: ... | ||
@property | ||
def ipPool(self) -> vim.vApp.IpPool: ... | ||
@property | ||
def resourcePools(self) -> List[Agency.VMResourcePool]: ... | ||
@property | ||
def folders(self) -> List[Agency.VMFolder]: ... | ||
|
||
|
||
class OvfDiskProvisioning(Enum): | ||
none = "none" | ||
thin = "thin" | ||
thick = "thick" | ||
|
||
|
||
class Scope(vmodl.DynamicData): ... | ||
|
||
|
||
class VMFolder(vmodl.DynamicData): | ||
@property | ||
def folderId(self) -> vim.Folder: ... | ||
@property | ||
def datacenterId(self) -> vim.Datacenter: ... | ||
|
||
|
||
class VMResourcePool(vmodl.DynamicData): | ||
@property | ||
def resourcePoolId(self) -> vim.ResourcePool: ... | ||
@property | ||
def computeResourceId(self) -> vim.ComputeResource: ... | ||
|
||
|
||
class Agent(EamObject): | ||
@property | ||
def runtime(self) -> Agent.RuntimeInfo: ... | ||
@property | ||
def config(self) -> Agent.ConfigInfo: ... | ||
def QueryRuntime(self) -> Agent.RuntimeInfo: ... | ||
def MarkAsAvailable(self) -> NoneType: ... | ||
def QueryConfig(self) -> Agent.ConfigInfo: ... | ||
|
||
|
||
class OvfEnvironmentInfo(vmodl.DynamicData): | ||
@property | ||
def ovfProperty(self) -> List[Agent.OvfEnvironmentInfo.OvfProperty]: ... | ||
|
||
|
||
class OvfProperty(vmodl.DynamicData): | ||
@property | ||
def key(self) -> str: ... | ||
@property | ||
def value(self) -> str: ... | ||
|
||
|
||
class RuntimeInfo(EamObject.RuntimeInfo): | ||
@property | ||
def vmPowerState(self) -> vim.VirtualMachine.PowerState: ... | ||
@property | ||
def receivingHeartBeat(self) -> bool: ... | ||
@property | ||
def host(self) -> vim.HostSystem: ... | ||
@property | ||
def vm(self) -> vim.VirtualMachine: ... | ||
@property | ||
def vmIp(self) -> str: ... | ||
@property | ||
def vmName(self) -> str: ... | ||
@property | ||
def esxAgentResourcePool(self) -> vim.ResourcePool: ... | ||
@property | ||
def esxAgentFolder(self) -> vim.Folder: ... | ||
@property | ||
def installedBulletin(self) -> List[str]: ... | ||
@property | ||
def installedVibs(self) -> List[vib.VibInfo]: ... | ||
@property | ||
def agency(self) -> Agency: ... | ||
@property | ||
def vmHook(self) -> Agent.VmHook: ... | ||
|
||
|
||
class GoalState(Enum): | ||
enabled = "enabled" | ||
disabled = "disabled" | ||
uninstalled = "uninstalled" | ||
|
||
|
||
class Status(Enum): | ||
green = "green" | ||
yellow = "yellow" | ||
red = "red" | ||
|
||
|
||
class StoragePolicy(vmodl.DynamicData): ... | ||
|
||
|
||
class VibMatchingRule(vmodl.DynamicData): | ||
@property | ||
def vibNameRegex(self) -> str: ... | ||
@property | ||
def vibVersionRegex(self) -> str: ... | ||
|
||
|
||
class VmHook(vmodl.DynamicData): | ||
@property | ||
def vm(self) -> vim.VirtualMachine: ... | ||
@property | ||
def vmState(self) -> str: ... | ||
|
||
|
||
class VmState(Enum): | ||
provisioned = "provisioned" | ||
poweredOn = "poweredon" | ||
prePowerOn = "prepoweron" | ||
|
||
|
||
class VsanStoragePolicy(Agent.StoragePolicy): | ||
@property | ||
def profileId(self) -> str: ... | ||
|
||
|
||
class EamObject(ManagedObject): | ||
def Resolve(self, issueKey: List[int]) -> List[int]: ... | ||
def ResolveAll(self) -> NoneType: ... | ||
def QueryIssue(self, issueKey: List[int]) -> List[issue.Issue]: ... | ||
|
||
|
||
class EsxAgentManager(EamObject): | ||
@property | ||
def agency(self) -> List[Agency]: ... | ||
@property | ||
def issue(self) -> List[issue.Issue]: ... | ||
def QueryAgency(self) -> List[Agency]: ... | ||
def CreateAgency(self, agencyConfigInfo: Agency.ConfigInfo, initialGoalState: str) -> Agency: ... | ||
def ScanForUnknownAgentVm(self) -> NoneType: ... | ||
def SetMaintenanceModePolicy(self, policy: str) -> NoneType: ... | ||
def GetMaintenanceModePolicy(self) -> str: ... | ||
|
||
|
||
class MaintenanceModePolicy(Enum): | ||
singleHost = "singlehost" | ||
multipleHosts = "multiplehosts" | ||
|
||
|
||
class Task(ManagedObject): ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
from typing import List | ||
from pyVmomi import eam, vim, vmodl | ||
|
||
|
||
class DisabledClusterFault(EamAppFault): | ||
@property | ||
def disabledComputeResource(self) -> List[vim.ComputeResource]: ... | ||
|
||
|
||
class EamAppFault(EamRuntimeFault): ... | ||
|
||
|
||
class EamFault(vmodl.MethodFault): ... | ||
|
||
|
||
class EamIOFault(EamRuntimeFault): ... | ||
|
||
|
||
class EamRuntimeFault(vmodl.RuntimeFault): ... | ||
|
||
|
||
class EamServiceNotInitialized(EamRuntimeFault): ... | ||
|
||
|
||
class EamSystemFault(EamRuntimeFault): ... | ||
|
||
|
||
class InvalidAgencyScope(EamFault): | ||
@property | ||
def unknownComputeResource(self) -> List[vim.ComputeResource]: ... | ||
|
||
|
||
class InvalidAgentConfiguration(EamFault): | ||
@property | ||
def invalidAgentConfiguration(self) -> eam.Agent.ConfigInfo: ... | ||
@property | ||
def invalidField(self) -> str: ... | ||
|
||
|
||
class InvalidLogin(EamRuntimeFault): ... | ||
|
||
|
||
class InvalidState(EamAppFault): ... | ||
|
||
|
||
class InvalidUrl(EamFault): | ||
@property | ||
def url(self) -> str: ... | ||
@property | ||
def malformedUrl(self) -> bool: ... | ||
@property | ||
def unknownHost(self) -> bool: ... | ||
@property | ||
def connectionRefused(self) -> bool: ... | ||
@property | ||
def responseCode(self) -> int: ... | ||
|
||
|
||
class InvalidVibPackage(EamRuntimeFault): ... | ||
|
||
|
||
class NoConnectionToVCenter(EamRuntimeFault): ... | ||
|
||
|
||
class NotAuthorized(EamRuntimeFault): ... |
Oops, something went wrong.