mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-03-01 21:06:53 +08:00
Re-organize directory structure (#4971)
See discussion in #2491 Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
This commit is contained in:
3
stubs/pyvmomi/METADATA.toml
Normal file
3
stubs/pyvmomi/METADATA.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
version = "0.1"
|
||||
python2 = true
|
||||
requires = ["types-enum34"]
|
||||
0
stubs/pyvmomi/pyVmomi/__init__.pyi
Normal file
0
stubs/pyvmomi/pyVmomi/__init__.pyi
Normal file
69
stubs/pyvmomi/pyVmomi/vim/__init__.pyi
Normal file
69
stubs/pyvmomi/pyVmomi/vim/__init__.pyi
Normal file
@@ -0,0 +1,69 @@
|
||||
from datetime import datetime
|
||||
from enum import Enum
|
||||
from typing import Any, List
|
||||
|
||||
from ..vmodl.query import PropertyCollector
|
||||
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
|
||||
propertyCollector: PropertyCollector
|
||||
rootFolder: Folder
|
||||
viewManager: ViewManager
|
||||
perfManager: PerformanceManager
|
||||
eventManager: EventManager
|
||||
def __getattr__(self, name: str) -> Any: ... # incomplete
|
||||
|
||||
class ServiceInstance:
|
||||
content: ServiceInstanceContent
|
||||
def CurrentTime(self) -> datetime: ...
|
||||
def __getattr__(self, name: str) -> Any: ... # incomplete
|
||||
|
||||
class PerformanceManager:
|
||||
class MetricId:
|
||||
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:
|
||||
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): ...
|
||||
class Datacenter(ManagedEntity): ...
|
||||
class Datastore(ManagedEntity): ...
|
||||
class Folder(ManagedEntity): ...
|
||||
class HostSystem(ManagedEntity): ...
|
||||
class VirtualMachine(ManagedEntity): ...
|
||||
|
||||
class VirtualMachinePowerState(Enum):
|
||||
poweredOff: int
|
||||
poweredOn: int
|
||||
suspended: int
|
||||
16
stubs/pyvmomi/pyVmomi/vim/event.pyi
Normal file
16
stubs/pyvmomi/pyVmomi/vim/event.pyi
Normal file
@@ -0,0 +1,16 @@
|
||||
from datetime import datetime
|
||||
from typing import Any, List
|
||||
|
||||
def __getattr__(name: str) -> Any: ... # incomplete
|
||||
|
||||
class Event:
|
||||
createdTime: datetime
|
||||
|
||||
class EventFilterSpec:
|
||||
class ByTime:
|
||||
def __init__(self, beginTime: datetime): ...
|
||||
time: EventFilterSpec.ByTime
|
||||
|
||||
class EventManager:
|
||||
latestEvent: Event
|
||||
def QueryEvents(self, filer: EventFilterSpec) -> List[Event]: ...
|
||||
7
stubs/pyvmomi/pyVmomi/vim/fault.pyi
Normal file
7
stubs/pyvmomi/pyVmomi/vim/fault.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
from typing import Any
|
||||
|
||||
def __getattr__(name: str) -> Any: ... # incomplete
|
||||
|
||||
class InvalidName(Exception): ...
|
||||
class RestrictedByAdministrator(Exception): ...
|
||||
class NoPermission(Exception): ...
|
||||
9
stubs/pyvmomi/pyVmomi/vim/option.pyi
Normal file
9
stubs/pyvmomi/pyVmomi/vim/option.pyi
Normal file
@@ -0,0 +1,9 @@
|
||||
from typing import Any, List
|
||||
|
||||
def __getattr__(name: str) -> Any: ... # incomplete
|
||||
|
||||
class OptionManager:
|
||||
def QueryOptions(self, name: str) -> List[OptionValue]: ...
|
||||
|
||||
class OptionValue:
|
||||
value: Any
|
||||
15
stubs/pyvmomi/pyVmomi/vim/view.pyi
Normal file
15
stubs/pyvmomi/pyVmomi/vim/view.pyi
Normal file
@@ -0,0 +1,15 @@
|
||||
from typing import Any, List, Type
|
||||
|
||||
from pyVmomi.vim import ManagedEntity
|
||||
|
||||
def __getattr__(name: str) -> Any: ... # incomplete
|
||||
|
||||
class ContainerView:
|
||||
def Destroy(self) -> None: ...
|
||||
|
||||
class ViewManager:
|
||||
# Doc says the `type` parameter of CreateContainerView is a `List[str]`,
|
||||
# but in practice it seems to be `List[Type[ManagedEntity]]`
|
||||
# Source: https://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/vim.view.ViewManager.html
|
||||
@staticmethod
|
||||
def CreateContainerView(container: ManagedEntity, type: List[Type[ManagedEntity]], recursive: bool) -> ContainerView: ...
|
||||
6
stubs/pyvmomi/pyVmomi/vmodl/__init__.pyi
Normal file
6
stubs/pyvmomi/pyVmomi/vmodl/__init__.pyi
Normal file
@@ -0,0 +1,6 @@
|
||||
from typing import Any
|
||||
|
||||
class DynamicProperty:
|
||||
def __init__(self, *, name: str = ..., val: Any = ...) -> None: ...
|
||||
name: str
|
||||
val: Any
|
||||
5
stubs/pyvmomi/pyVmomi/vmodl/fault.pyi
Normal file
5
stubs/pyvmomi/pyVmomi/vmodl/fault.pyi
Normal file
@@ -0,0 +1,5 @@
|
||||
from typing import Any
|
||||
|
||||
def __getattr__(name: str) -> Any: ... # incomplete
|
||||
|
||||
class InvalidArgument(Exception): ...
|
||||
57
stubs/pyvmomi/pyVmomi/vmodl/query.pyi
Normal file
57
stubs/pyvmomi/pyVmomi/vmodl/query.pyi
Normal file
@@ -0,0 +1,57 @@
|
||||
from typing import Any, List, Optional, Type
|
||||
|
||||
from pyVmomi.vim import ManagedEntity
|
||||
from pyVmomi.vim.view import ContainerView
|
||||
from pyVmomi.vmodl import DynamicProperty
|
||||
|
||||
class PropertyCollector:
|
||||
class PropertySpec:
|
||||
def __init__(self, *, all: bool = ..., type: Type[ManagedEntity] = ..., pathSet: List[str] = ...) -> None: ...
|
||||
all: bool
|
||||
type: Type[ManagedEntity]
|
||||
pathSet: List[str]
|
||||
class TraversalSpec:
|
||||
def __init__(
|
||||
self, *, path: str = ..., skip: bool = ..., type: Type[ContainerView] = ..., **kwargs: Any # incomplete
|
||||
) -> None: ...
|
||||
path: str
|
||||
skip: bool
|
||||
type: Type[ContainerView]
|
||||
def __getattr__(self, name: str) -> Any: ... # incomplete
|
||||
class RetrieveOptions:
|
||||
def __init__(self, *, maxObjects: int) -> None: ...
|
||||
maxObjects: int
|
||||
class ObjectSpec:
|
||||
def __init__(
|
||||
self, *, skip: bool = ..., selectSet: List[PropertyCollector.TraversalSpec] = ..., obj: Any = ...
|
||||
) -> None: ...
|
||||
skip: bool
|
||||
selectSet: List[PropertyCollector.TraversalSpec]
|
||||
obj: Any
|
||||
class FilterSpec:
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
propSet: List[PropertyCollector.PropertySpec] = ...,
|
||||
objectSet: List[PropertyCollector.ObjectSpec] = ...,
|
||||
**kwargs: Any, # incomplete
|
||||
) -> None: ...
|
||||
propSet: List[PropertyCollector.PropertySpec]
|
||||
objectSet: List[PropertyCollector.ObjectSpec]
|
||||
def __getattr__(self, name: str) -> Any: ... # incomplete
|
||||
class ObjectContent:
|
||||
def __init__(
|
||||
self, *, obj: ManagedEntity = ..., propSet: List[DynamicProperty] = ..., **kwargs: Any # incomplete
|
||||
) -> None: ...
|
||||
obj: ManagedEntity
|
||||
propSet: List[DynamicProperty]
|
||||
def __getattr__(self, name: str) -> Any: ... # incomplete
|
||||
class RetrieveResult:
|
||||
def __init__(self, *, objects: List[PropertyCollector.ObjectContent] = ..., token: Optional[str] = ...) -> None: ...
|
||||
objects: List[PropertyCollector.ObjectContent]
|
||||
token: Optional[str]
|
||||
def RetrievePropertiesEx(
|
||||
self, specSet: List[PropertyCollector.FilterSpec], options: PropertyCollector.RetrieveOptions
|
||||
) -> PropertyCollector.RetrieveResult: ...
|
||||
def ContinueRetrievePropertiesEx(self, token: str) -> PropertyCollector.RetrieveResult: ...
|
||||
def __getattr__(self, name: str) -> Any: ... # incomplete
|
||||
Reference in New Issue
Block a user