forked from python/typeshed
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
448c4e1
commit a8834fc
Showing
9 changed files
with
155 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
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,67 @@ | ||
from datetime import datetime | ||
from enum import Enum | ||
from typing import Any, List | ||
|
||
from . import event | ||
from . import fault | ||
from . import view | ||
from ..vmodl.query import PropertyCollector | ||
from .event import EventManager | ||
from .option import OptionManager | ||
from .view import ViewManager | ||
|
||
class ManagedObject: ... | ||
|
||
class ManagedEntity(ManagedObject): | ||
_moId: str | ||
obj: None | ||
name: str | ||
|
||
class ServiceInstanceContent: | ||
setting: OptionManager | ||
propertyCollector: PropertyCollector | ||
rootFolder: Folder | ||
viewManager: ViewManager | ||
perfManager: PerformanceManager | ||
eventManager: EventManager | ||
|
||
class ServiceInstance: | ||
content: ServiceInstanceContent | ||
def CurrentTime(self) -> Any: ... | ||
|
||
class PerformanceManager: | ||
class MetricId: | ||
def __init__(self, counterId: Any, instance: Any): ... | ||
|
||
class PerfCounterInfo: | ||
key: int | ||
groupInfo: Any | ||
nameInfo: Any | ||
rollupType: Any | ||
class QuerySpec: | ||
entity: ManagedEntity | ||
metricId: List[PerformanceManager.MetricId] | ||
intervalId: int | ||
maxSample: int | ||
startTime: datetime | ||
|
||
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]: ... | ||
|
||
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 |
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,14 @@ | ||
from datetime import datetime | ||
from typing import List | ||
|
||
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]: ... |
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,2 @@ | ||
class InvalidName(Exception): ... | ||
class RestrictedByAdministrator(Exception): ... |
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,7 @@ | ||
from typing import Any, List | ||
|
||
class OptionManager: | ||
def QueryOptions(self, name: str) -> List[OptionValue]: ... | ||
|
||
class OptionValue: | ||
value: Any |
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,15 @@ | ||
from typing import List, Type | ||
|
||
from pyVmomi.vim import ManagedEntity | ||
|
||
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: ... |
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,8 @@ | ||
from typing import Any | ||
|
||
from . import fault | ||
from . import query | ||
|
||
class DynamicProperty: | ||
name: str | ||
val: Any |
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 @@ | ||
class InvalidArgument(Exception): ... |
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,41 @@ | ||
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: | ||
type: Type[ManagedEntity] | ||
pathSet: List[str] | ||
|
||
class TraversalSpec: | ||
path: str | ||
skip: bool | ||
type: Type[ContainerView] | ||
|
||
class RetrieveOptions: | ||
maxObjects: int | ||
|
||
class ObjectSpec: | ||
skip: bool | ||
selectSet: List[PropertyCollector.TraversalSpec] | ||
obj: Any | ||
|
||
class FilterSpec: | ||
propSet: List[PropertyCollector.PropertySpec] | ||
objectSet: List[PropertyCollector.ObjectSpec] | ||
|
||
class ObjectContent: | ||
obj: ManagedEntity | ||
propSet: List[DynamicProperty] | ||
|
||
class RetrieveResult: | ||
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: ... |