pyVmomi stubs are incomplete (#4474)

This commit is contained in:
David Hotham
2020-08-22 19:13:09 +01:00
committed by GitHub
parent 723fcb368a
commit 8bb80c4cb7
7 changed files with 34 additions and 5 deletions

View File

@@ -7,12 +7,15 @@ from .event import EventManager
from .option import OptionManager
from .view import ViewManager
def __getattr__(name: str) -> Any: ... # incomplete
class ManagedObject: ...
class ManagedEntity(ManagedObject):
_moId: str
obj: None
name: str
def __getattr__(self, name: str) -> Any: ... # incomplete
class ServiceInstanceContent:
setting: OptionManager
@@ -21,30 +24,36 @@ class ServiceInstanceContent:
viewManager: ViewManager
perfManager: PerformanceManager
eventManager: EventManager
def __getattr__(self, name: str) -> Any: ... # incomplete
class ServiceInstance:
content: ServiceInstanceContent
def CurrentTime(self) -> Any: ...
def CurrentTime(self) -> datetime: ...
def __getattr__(self, name: str) -> Any: ... # incomplete
class PerformanceManager:
class MetricId:
def __init__(self, counterId: Any, instance: Any): ...
counterId: int
instance: str
def __init__(self, counterId: int, instance: str): ...
class PerfCounterInfo:
key: int
groupInfo: Any
nameInfo: Any
rollupType: Any
def __getattr__(self, name: str) -> Any: ... # incomplete
class QuerySpec:
entity: ManagedEntity
metricId: List[PerformanceManager.MetricId]
intervalId: int
maxSample: int
startTime: datetime
def __getattr__(self, name: str) -> Any: ... # incomplete
class EntityMetricBase:
value: Any
entity: ManagedEntity
def QueryPerfCounterByLevel(self, collection_level: int) -> List[PerformanceManager.PerfCounterInfo]: ...
def QueryPerf(self, querySpec: List[PerformanceManager.QuerySpec]) -> List[PerformanceManager.EntityMetricBase]: ...
def __getattr__(self, name: str) -> Any: ... # incomplete
class ClusterComputeResource(ManagedEntity): ...
class ComputeResource(ManagedEntity): ...

View File

@@ -1,5 +1,7 @@
from datetime import datetime
from typing import List
from typing import Any, List
def __getattr__(name: str) -> Any: ... # incomplete
class Event:
createdTime: datetime

View File

@@ -1,2 +1,7 @@
from typing import Any
def __getattr__(name: str) -> Any: ... # incomplete
class InvalidName(Exception): ...
class RestrictedByAdministrator(Exception): ...
class NoPermission(Exception): ...

View File

@@ -1,5 +1,7 @@
from typing import Any, List
def __getattr__(name: str) -> Any: ... # incomplete
class OptionManager:
def QueryOptions(self, name: str) -> List[OptionValue]: ...

View File

@@ -1,7 +1,9 @@
from typing import List, Type
from typing import Any, List, Type
from pyVmomi.vim import ManagedEntity
def __getattr__(name: str) -> Any: ... # incomplete
class ContainerView:
def Destroy(self) -> None: ...

View File

@@ -1 +1,5 @@
from typing import Any
def __getattr__(name: str) -> Any: ... # incomplete
class InvalidArgument(Exception): ...

View File

@@ -6,12 +6,14 @@ from pyVmomi.vmodl import DynamicProperty
class PropertyCollector:
class PropertySpec:
all: bool
type: Type[ManagedEntity]
pathSet: List[str]
class TraversalSpec:
path: str
skip: bool
type: Type[ContainerView]
def __getattr__(self, name: str) -> Any: ... # incomplete
class RetrieveOptions:
maxObjects: int
class ObjectSpec:
@@ -21,9 +23,11 @@ class PropertyCollector:
class FilterSpec:
propSet: List[PropertyCollector.PropertySpec]
objectSet: List[PropertyCollector.ObjectSpec]
def __getattr__(self, name: str) -> Any: ... # incomplete
class ObjectContent:
obj: ManagedEntity
propSet: List[DynamicProperty]
def __getattr__(self, name: str) -> Any: ... # incomplete
class RetrieveResult:
objects: List[PropertyCollector.ObjectContent]
token: Optional[str]
@@ -31,3 +35,4 @@ class PropertyCollector:
self, specSet: List[PropertyCollector.FilterSpec], options: PropertyCollector.RetrieveOptions
) -> PropertyCollector.RetrieveResult: ...
def ContinueRetrievePropertiesEx(self, token: str) -> PropertyCollector.RetrieveResult: ...
def __getattr__(self, name: str) -> Any: ... # incomplete