com.vmware.appliance package

Submodules

com.vmware.appliance.access_client module

class com.vmware.appliance.access_client.Consolecli(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Consolecli class provides methods Get/Set enabled state of CLI.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
get()

Get enabled state of the console-based controlled CLI (TTY1).

Return type:bool
Returns:Console-based controlled CLI is enabled.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
set(enabled)

Set enabled state of the console-based controlled CLI (TTY1).

Parameters:enabled (bool) – Console-based controlled CLI is enabled.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
class com.vmware.appliance.access_client.Dcui(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Dcui class provides methods Get/Set enabled state of DCUI.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
get()

Get enabled state of Direct Console User Interface (DCUI TTY2).

Return type:bool
Returns:DCUI is enabled.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
set(enabled)

Set enabled state of Direct Console User Interface (DCUI TTY2).

Parameters:enabled (bool) – DCUI is enabled.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
class com.vmware.appliance.access_client.Shell(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Shell class provides methods Get/Set enabled state of BASH.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class ShellConfig(enabled=None, timeout=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Shell.ShellConfig class Structure that defines shell configuration.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • enabled (bool) – Enabled can be set to true or false
  • timeout (long) – The timeout (in seconds) specifies how long you enable the Shell access. The maximum timeout is 86400 seconds(1 day).
Shell.get()

Get enabled state of BASH, that is, access to BASH from within the controlled CLI.

Return type:Shell.ShellConfig
Returns:Current shell configuration.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
Shell.set(config)

Set enabled state of BASH, that is, access to BASH from within the controlled CLI.

Parameters:config (Shell.ShellConfig) – Shell configuration
Raise:com.vmware.vapi.std.errors_client.Error Generic error
class com.vmware.appliance.access_client.Ssh(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Ssh class provides methods Get/Set enabled state of SSH-based controlled CLI.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
get()

Get enabled state of the SSH-based controlled CLI.

Return type:bool
Returns:SSH-based controlled CLI is enabled.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
set(enabled)

Set enabled state of the SSH-based controlled CLI.

Parameters:enabled (bool) – SSH-based controlled CLI is enabled.
Raise:com.vmware.vapi.std.errors_client.Error Generic error

com.vmware.appliance.health_client module

class com.vmware.appliance.health_client.Applmgmt(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Applmgmt class provides methods Get health status of applmgmt services.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
get()

Get health status of applmgmt services.

Return type:str
Returns:health status.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
class com.vmware.appliance.health_client.Databasestorage(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Databasestorage class provides methods Get database storage health.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class HealthLevel(string)

Bases: vmware.vapi.bindings.enum.Enum

Databasestorage.HealthLevel class Defines health levels

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:string (str) – String value for the HealthLevel instance.
gray = HealthLevel(string=u'gray')

No health data is available for this service.

green = HealthLevel(string=u'green')

Service is healthy.

orange = HealthLevel(string=u'orange')

The service health is degraded. The service might have serious problems

red = HealthLevel(string=u'red')

The service is unavaiable and is not functioning properly or will stop functioning soon.

yellow = HealthLevel(string=u'yellow')

The service is healthy state, but experiencing some levels of problems.

Databasestorage.get()

Get database storage health.

Return type:Databasestorage.HealthLevel
Returns:Database storage health.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
class com.vmware.appliance.health_client.Load(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Load class provides methods Get load health.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class HealthLevel(string)

Bases: vmware.vapi.bindings.enum.Enum

Load.HealthLevel class Defines health levels

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:string (str) – String value for the HealthLevel instance.
gray = HealthLevel(string=u'gray')

No health data is available for this service.

green = HealthLevel(string=u'green')

Service is healthy.

orange = HealthLevel(string=u'orange')

The service health is degraded. The service might have serious problems

red = HealthLevel(string=u'red')

The service is unavaiable and is not functioning properly or will stop functioning soon.

yellow = HealthLevel(string=u'yellow')

The service is healthy state, but experiencing some levels of problems.

Load.get()

Get load health.

Return type:Load.HealthLevel
Returns:Load health.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
class com.vmware.appliance.health_client.Mem(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Mem class provides methods Get memory health.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class HealthLevel(string)

Bases: vmware.vapi.bindings.enum.Enum

Mem.HealthLevel class Defines health levels

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:string (str) – String value for the HealthLevel instance.
gray = HealthLevel(string=u'gray')

No health data is available for this service.

green = HealthLevel(string=u'green')

Service is healthy.

orange = HealthLevel(string=u'orange')

The service health is degraded. The service might have serious problems

red = HealthLevel(string=u'red')

The service is unavaiable and is not functioning properly or will stop functioning soon.

yellow = HealthLevel(string=u'yellow')

The service is healthy state, but experiencing some levels of problems.

Mem.get()

Get memory health.

Return type:Mem.HealthLevel
Returns:Memory health.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
class com.vmware.appliance.health_client.Softwarepackages(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Softwarepackages class provides methods Get information on available software updates available in remote VUM repository.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class HealthLevel(string)

Bases: vmware.vapi.bindings.enum.Enum

Softwarepackages.HealthLevel class Defines health levels

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:string (str) – String value for the HealthLevel instance.
gray = HealthLevel(string=u'gray')

No health data is available for this service.

green = HealthLevel(string=u'green')

Service is healthy.

orange = HealthLevel(string=u'orange')

The service health is degraded. The service might have serious problems

red = HealthLevel(string=u'red')

The service is unavaiable and is not functioning properly or will stop functioning soon.

yellow = HealthLevel(string=u'yellow')

The service is healthy state, but experiencing some levels of problems.

Softwarepackages.get()

Get information on available software updates available in remote VUM repository. red indicates that security updates are available. orange indicates that non security updates are available. green indicates that there are no updates available. gray indicates that there was an error retreiving information on software updates.

Return type:Softwarepackages.HealthLevel
Returns:software updates available.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
class com.vmware.appliance.health_client.Storage(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Storage class provides methods Get storage health.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class HealthLevel(string)

Bases: vmware.vapi.bindings.enum.Enum

Storage.HealthLevel class Defines health levels

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:string (str) – String value for the HealthLevel instance.
gray = HealthLevel(string=u'gray')

No health data is available for this service.

green = HealthLevel(string=u'green')

Service is healthy.

orange = HealthLevel(string=u'orange')

The service health is degraded. The service might have serious problems

red = HealthLevel(string=u'red')

The service is unavaiable and is not functioning properly or will stop functioning soon.

yellow = HealthLevel(string=u'yellow')

The service is healthy state, but experiencing some levels of problems.

Storage.get()

Get storage health.

Return type:Storage.HealthLevel
Returns:Storage health.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
class com.vmware.appliance.health_client.Swap(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Swap class provides methods Get swap health.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class HealthLevel(string)

Bases: vmware.vapi.bindings.enum.Enum

Swap.HealthLevel class Defines health levels

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:string (str) – String value for the HealthLevel instance.
gray = HealthLevel(string=u'gray')

No health data is available for this service.

green = HealthLevel(string=u'green')

Service is healthy.

orange = HealthLevel(string=u'orange')

The service health is degraded. The service might have serious problems

red = HealthLevel(string=u'red')

The service is unavaiable and is not functioning properly or will stop functioning soon.

yellow = HealthLevel(string=u'yellow')

The service is healthy state, but experiencing some levels of problems.

Swap.get()

Get swap health.

Return type:Swap.HealthLevel
Returns:Swap health.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
class com.vmware.appliance.health_client.System(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

System class provides methods Get overall health of system.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class HealthLevel(string)

Bases: vmware.vapi.bindings.enum.Enum

System.HealthLevel class Defines health levels

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:string (str) – String value for the HealthLevel instance.
gray = HealthLevel(string=u'gray')

No health data is available for this service.

green = HealthLevel(string=u'green')

Service is healthy.

orange = HealthLevel(string=u'orange')

The service health is degraded. The service might have serious problems

red = HealthLevel(string=u'red')

The service is unavaiable and is not functioning properly or will stop functioning soon.

yellow = HealthLevel(string=u'yellow')

The service is healthy state, but experiencing some levels of problems.

System.get()

Get overall health of system.

Return type:System.HealthLevel
Returns:System health.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
System.lastcheck()

Get last check timestamp of the health of the system.

Return type:datetime.datetime
Returns:System health last check timestamp.
Raise:com.vmware.vapi.std.errors_client.Error Generic error

com.vmware.appliance.networking_client module

class com.vmware.appliance.networking_client.Interfaces(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Interfaces class provides methods Provides information about network interface.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class InterfaceInfo(name=None, status=None, mac=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Interfaces.InterfaceInfo class Structure that defines properties and status of a network interface.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • name (str) – Interface name, for example, “nic0”, “nic1”.
  • status (Interfaces.InterfaceStatus) – Interface status.
  • mac (str) – MAC address. For example 00:0C:29:94:BB:5A.
class Interfaces.InterfaceStatus(string)

Bases: vmware.vapi.bindings.enum.Enum

Interfaces.InterfaceStatus class Defines interface status

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:string (str) – String value for the InterfaceStatus instance.
down = InterfaceStatus(string=u'down')

The interface is down.

up = InterfaceStatus(string=u'up')

The interface is up.

Interfaces.get(interface_name)

Get information about a particular network interface.

Parameters:interface_name (str) – Network interface, for example, “nic0”. The parameter must be an identifier for the resource type: com.vmware.appliance.networking.interfaces.
Return type:Interfaces.InterfaceInfo
Returns:Network interface information.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
Interfaces.list()

Get list of available network interfaces, including those that are not yet configured.

Return type:list of Interfaces.InterfaceInfo
Returns:List of InterfaceInfo structures.
Raise:com.vmware.vapi.std.errors_client.Error Generic error

com.vmware.appliance.recovery_client module

class com.vmware.appliance.recovery_client.Backup(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Backup class provides methods Performs backup restore operations

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class BackupRequest(parts=None, backup_password=None, location_type=None, location=None, location_user=None, location_password=None, comment=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Backup.BackupRequest class Structure representing requested backup piece

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • parts (list of str) – a list of optional parts. Run backup parts APIs to get list of optional parts and description
  • backup_password (str or None) – a password for a backup piece The backupPassword must adhere to the following password requirements: At least 8 characters, cannot be more than 20 characters in length. At least 1 uppercase letter. At least 1 lowercase letter. At least 1 numeric digit. At least 1 special character (i.e. any character not in [0-9,a-z,A-Z]). Only visible ASCII characters (for example, no space). backupPassword If no password then the piece will not be encrypted
  • location_type (Backup.LocationType) – a type of location
  • location (str) – path or url
  • location_user (str or None) – username for location locationUser User name for this location if login is required.
  • location_password (str or None) – password for location locationPassword Password for the specified user if login is required at this location.
  • comment (str or None) – Custom comment comment an optional comment
class Backup.LocalizableMessage(id=None, default_message=None, args=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Backup.LocalizableMessage class Structure representing message

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • id (str) – id in message bundle
  • default_message (str) – text in english
  • args (list of str) – nested data
class Backup.LocationType(string)

Bases: vmware.vapi.bindings.enum.Enum

Backup.LocationType class Defines type of all locations for backup/restore

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:string (str) – String value for the LocationType instance.
FTP = LocationType(string=u'FTP')

Destination is FTP server

FTPS = LocationType(string=u'FTPS')

Destination is FTPS server

HTTP = LocationType(string=u'HTTP')

Destination is HTTP server

HTTPS = LocationType(string=u'HTTPS')

Destination is HTTPS server

SCP = LocationType(string=u'SCP')

Destination is SSH server

class Backup.ReturnResult(status=None, messages=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Backup.ReturnResult class Structure representing precheck result

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
class Backup.ReturnStatus(string)

Bases: vmware.vapi.bindings.enum.Enum

Backup.ReturnStatus class Defines the state of precheck

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:string (str) – String value for the ReturnStatus instance.
FAIL = ReturnStatus(string=u'FAIL')

Check failed

OK = ReturnStatus(string=u'OK')

Check passed

WARNING = ReturnStatus(string=u'WARNING')

Passed with warnings

Backup.validate(piece)

Check for backup errors without starting backup.

Parameters:piece (Backup.BackupRequest) – BackupRequest Structure
Return type:Backup.ReturnResult
Returns:ReturnResult Structure
Raise:com.vmware.vapi.std.errors_client.FeatureInUse A backup or restore is already in progress
Raise:com.vmware.vapi.std.errors_client.Error Generic error
class com.vmware.appliance.recovery_client.Restore(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Restore class provides methods Performs restore operations

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class LocalizableMessage(id=None, default_message=None, args=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Restore.LocalizableMessage class Structure representing message

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • id (str) – id in message bundle
  • default_message (str) – text in english
  • args (list of str) – nested data
class Restore.LocationType(string)

Bases: vmware.vapi.bindings.enum.Enum

Restore.LocationType class Defines type of all locations for backup/restore

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:string (str) – String value for the LocationType instance.
FTP = LocationType(string=u'FTP')

Destination is FTP server

FTPS = LocationType(string=u'FTPS')

Destination is FTPS server

HTTP = LocationType(string=u'HTTP')

Destination is HTTP server

HTTPS = LocationType(string=u'HTTPS')

Destination is HTTPS server

SCP = LocationType(string=u'SCP')

Destination is SSH server

class Restore.Metadata(timestamp=None, parts=None, version=None, boxname=None, comment=None, applicable=None, messages=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Restore.Metadata class Structure representing metadata

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • timestamp (datetime.datetime) – Time when this backup was completed.
  • parts (list of str) – List of parts included in the backup.
  • version (str) – VCSA version
  • boxname (str) – Box name is PNID/ FQDN etc
  • comment (str) – Custom comment
  • applicable (bool) – Does the VCSA match the deployment type, network properties and version of backed up VC
  • messages (list of Restore.LocalizableMessage) – Any messages if the backup is not aplicable
class Restore.RestoreRequest(backup_password=None, location_type=None, location=None, location_user=None, location_password=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Restore.RestoreRequest class Structure representing requested restore piece

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • backup_password (str or None) – a password for a backup piece backupPassword If no password then the piece will not be decrypted
  • location_type (Restore.LocationType) – a type of location
  • location (str) – path or url
  • location_user (str or None) – username for location locationUser User name for this location if login is required.
  • location_password (str or None) – password for location locationPassword Password for the specified user if login is required at this location.
Restore.validate(piece)

Get metadata before restore

Parameters:piece (Restore.RestoreRequest) – RestoreRequest Structure
Return type:Restore.Metadata
Returns:Metadata Structure
Raise:com.vmware.vapi.std.errors_client.Error Generic error

com.vmware.appliance.system_client module

class com.vmware.appliance.system_client.Storage(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Storage class provides methods Appliance storage configuration

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class StorageMapping(disk=None, partition=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Storage.StorageMapping class FIXME: no docstring

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • disk (str) – NGC disk ID When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.appliance.system.storage. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.appliance.system.storage.
  • partition (str) – Storage partition name
Storage.list()

Get disk to partition mapping

Return type:list of Storage.StorageMapping
Returns:list of mapping items
Raise:com.vmware.vapi.std.errors_client.Error Generic error
Storage.resize()

Resize all partitions to 100 percent of disk size

Raise:com.vmware.vapi.std.errors_client.Error Generic error
class com.vmware.appliance.system_client.Time(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Time class provides methods Gets system time.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class SystemTimeStruct(seconds_since_epoch=None, date=None, time=None, timezone=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Time.SystemTimeStruct class Structure representing the system time.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • seconds_since_epoch (float) – seconds since the epoch
  • date (str) – date format: Thu 07-31-2014
  • time (str) – time format: 18:18:32
  • timezone (str) – timezone
Time.get()

Get system time.

Return type:Time.SystemTimeStruct
Returns:System time
Raise:com.vmware.vapi.std.errors_client.Error Generic error
class com.vmware.appliance.system_client.Uptime(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Uptime class provides methods Get the system uptime.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
get()

Get the system uptime.

Return type:float
Returns:system uptime
Raise:com.vmware.vapi.std.errors_client.Error Generic error
class com.vmware.appliance.system_client.Version(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Version class provides methods Get the appliance version.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class VersionStruct(version=None, product=None, build=None, type=None, summary=None, releasedate=None, install_time=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Version.VersionStruct class Structure representing appliance version information.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • version (str) – Appliance version.
  • product (str) – Appliance name.
  • build (str) – Appliance build number.
  • type (str) – Type of product. Same product can have different deployment options, which is represented by type.
  • summary (str) – Summary of patch (empty string, if the appliance has not been patched)
  • releasedate (str) – Release date of patch (empty string, if the appliance has not been patched)
  • install_time (str) – Display the date and time when this system was first installed. Value will not change on subsequent updates.
Version.get()

Get the version.

Return type:Version.VersionStruct
Returns:version information about the appliance
Raise:com.vmware.vapi.std.errors_client.Error Generic error

com.vmware.appliance.techpreview_client module

class com.vmware.appliance.techpreview_client.Ntp(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Ntp class provides methods Gets NTP configuration status and tests connection to ntp servers.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class Message(message=None, result=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Ntp.Message class Test result and message

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
class Ntp.MessageStatus(string)

Bases: vmware.vapi.bindings.enum.Enum

Ntp.MessageStatus class Individual test result

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:string (str) – String value for the MessageStatus instance.
failure = MessageStatus(string=u'failure')

message indicates the test failed.

success = MessageStatus(string=u'success')

message indicates that the test was successful.

class Ntp.NTPConfig(status=None, servers=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Ntp.NTPConfig class Structure defining the NTP configuration.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • status (Ntp.NTPStatus) – NTP daemon running status
  • servers (list of str) – List of NTP servers.
class Ntp.NTPStatus(string)

Bases: vmware.vapi.bindings.enum.Enum

Ntp.NTPStatus class Defines NTP status

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:string (str) – String value for the NTPStatus instance.
Down = NTPStatus(string=u'Down')

NTP daemon is not running.

Unknown = NTPStatus(string=u'Unknown')

Cannot retrieve NTP daemon status.

Up = NTPStatus(string=u'Up')

NTP daemon is running.

class Ntp.TestStatus(string)

Bases: vmware.vapi.bindings.enum.Enum

Ntp.TestStatus class Health indicator

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:string (str) – String value for the TestStatus instance.
green = TestStatus(string=u'green')

All tests were successful for given data

orange = TestStatus(string=u'orange')

In case data has more than one test, this indicates not all tests were successful

red = TestStatus(string=u'red')

All tests failed for given data

class Ntp.TestStatusInfo(status=None, messages=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Ntp.TestStatusInfo class Overall test result

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
Ntp.get()

Get the NTP configuration status. If you run the ‘timesync.get’ command, you can retrieve the current time synchronization method (NTP- or VMware Tools-based). The ‘ntp’ command always returns the NTP server information, even when the time synchronization mode is not set to NTP. If the time synchronization mode is not NTP-based, the NTP server status is displayed as down.

Return type:Ntp.NTPConfig
Returns:NTP config
Raise:com.vmware.vapi.std.errors_client.Error Generic error
Ntp.test(servers)

Test the connection to a list of ntp servers.

Parameters:servers (list of str) – List of host names or IP addresses of NTP servers.
Return type:Ntp.TestStatusInfo
Returns:NTP connection status
Raise:com.vmware.vapi.std.errors_client.Error Generic error
class com.vmware.appliance.techpreview_client.Services(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Services class provides methods Manages services.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class ServiceInfo(name=None, description=None, operations=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Services.ServiceInfo class Structure that describes a service and the operations you can perform on a service.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • name (str) – The name of the service, for example, “vmware-vpxd”. This name is unique per machine.
  • description (str) – A description of the service. The description can be empty.
  • operations (list of Services.ServiceOps) – The operations encoded in an array, supported by the service.
class Services.ServiceOps(string)

Bases: vmware.vapi.bindings.enum.Enum

Services.ServiceOps class Defines service operations

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:string (str) – String value for the ServiceOps instance.
control = ServiceOps(string=u'control')

The service accepts arbitrary commands and arguments.

restart = ServiceOps(string=u'restart')

The service can be started or restarted.

status = ServiceOps(string=u'status')

The service status can be generated.

stop = ServiceOps(string=u'stop')

The service can be stopped.

Services.control(args, name, timeout)

Manage a service with arbitrary command and arguments.

Parameters:
  • args (list of str) – Array of arguments.
  • name (str) – Name of the service.
  • timeout (long) – Timeout in seconds. Zero (0) means no timeout.
Raise:

com.vmware.vapi.std.errors_client.Error Generic error

Services.list()

Get a list of all known services.

Return type:list of Services.ServiceInfo
Returns:List of services.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
Services.restart(name, timeout)

start or restart a service

Parameters:
  • name (str) – Name of the service to start or restart.
  • timeout (long) – Timeout in seconds. Zero (0) means no timeout.
Raise:

com.vmware.vapi.std.errors_client.Error Generic error

Services.stop(name, timeout)

Stop a service

Parameters:
  • name (str) – Name of service.
  • timeout (long) – Timeout in seconds. Zero (0) means no timeout.
Raise:

com.vmware.vapi.std.errors_client.Error Generic error

class com.vmware.appliance.techpreview_client.Shutdown(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Shutdown class provides methods Performs reboot/shutdow operations on appliance.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class ShutdownConfig(delay=None, reason=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Shutdown.ShutdownConfig class Structure that defines shutdown configuration.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • delay (long) – Delay interval in minutes (optional). if you do not specify delay, then the shutdown starts immediately.
  • reason (str) – Reason for performing shutdown (required).
class Shutdown.ShutdownGetConfig(shutdown_time=None, action=None, reason=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Shutdown.ShutdownGetConfig class Structure that defines shutdown configuration returned by Shutdown.get operation

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • shutdown_time (str) – (UTC) time of shutdown represented in “YYYY-MM-DD HH:MM:SS” format.
  • action (str) – Contains a string that describes the pending shutdown operation. The string values for pending operations can be ‘poweroff’, ‘reboot’ or ‘’
  • reason (str) – This will contain string explaining the reason behind the shutdown action
Shutdown.cancel()

Cancel pending shutdown action.

Raise:com.vmware.vapi.std.errors_client.Error Generic error
Shutdown.get()

Get details about the pending shutdown action.

Return type:Shutdown.ShutdownGetConfig
Returns:Configuration of pending shutdown action.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
Shutdown.poweroff(config)

Power off the appliance.

Parameters:config (Shutdown.ShutdownConfig) – Configuration of poweroff action
Raise:com.vmware.vapi.std.errors_client.Error Generic error
Shutdown.reboot(config)

Reboot the appliance.

Parameters:config (Shutdown.ShutdownConfig) – Configuration of reboot action
Raise:com.vmware.vapi.std.errors_client.Error Generic error
class com.vmware.appliance.techpreview_client.Timesync(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Timesync class provides methods Performs time synchronization configuration.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class TimeSyncConfig(mode=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Timesync.TimeSyncConfig class Structure defining time synchronization configuration.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:mode (Timesync.TimeSyncMode) – Time synchronization mode. Mode can have one of the TimeSyncMode enumeration values.
class Timesync.TimeSyncMode(string)

Bases: vmware.vapi.bindings.enum.Enum

Timesync.TimeSyncMode class Defines different timsync modes

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:string (str) – String value for the TimeSyncMode instance.
Disabled = TimeSyncMode(string=u'Disabled')

Time synchronization is disabled.

NTP = TimeSyncMode(string=u'NTP')

NTP-based time synchronization.

host = TimeSyncMode(string=u'host')

VMware Tool-based time synchronization.

Timesync.get()

Get time synchronization configuration.

Return type:Timesync.TimeSyncConfig
Returns:Time synchronization configuration.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
Timesync.set(config)

Set time synchronization configuration.

Parameters:config (Timesync.TimeSyncConfig) – Time synchronization configuration.
Raise:com.vmware.vapi.std.errors_client.Error Generic error

com.vmware.appliance.vmon_client module

The com.vmware.appliance.vmon_client module provides classes to manage a set of services that are part of the vCenter Server.

class com.vmware.appliance.vmon_client.Service(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Service class provides methods to manage a single/set of services that are managed by vMon.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class Health(string)

Bases: vmware.vapi.bindings.enum.Enum

The Service.Health class defines the possible values for health of a service.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:string (str) – String value for the Health instance.
DEGRADED = Health(string=u'DEGRADED')

Service is in degraded state, it is not functional.

HEALTHY = Health(string=u'HEALTHY')

Service is in a healthy state and is fully functional.

HEALTHY_WITH_WARNINGS = Health(string=u'HEALTHY_WITH_WARNINGS')

Service is healthy with warnings.

class Service.Info(name_key=None, description_key=None, startup_type=None, state=None, health=None, health_messages=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Service.Info class contains information about a service.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
class Service.StartupType(string)

Bases: vmware.vapi.bindings.enum.Enum

The Service.StartupType class defines valid Startup Type for services managed by vMon.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:string (str) – String value for the StartupType instance.
AUTOMATIC = StartupType(string=u'AUTOMATIC')

Service Startup type is Automatic, thus during starting all services or issuing explicit start on the service will start it.

DISABLED = StartupType(string=u'DISABLED')

Service Startup type is Disabled, thus it will not start unless the startup type changes to manual or automatic.

MANUAL = StartupType(string=u'MANUAL')

Service Startup type is Manual, thus issuing an explicit start on the service will start it.

class Service.State(string)

Bases: vmware.vapi.bindings.enum.Enum

The Service.State class defines valid Run State for services.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:string (str) – String value for the State instance.
STARTED = State(string=u'STARTED')

Service Run State is Started, it is fully functional

STARTING = State(string=u'STARTING')

Service Run State is Starting, it is still not functional

STOPPED = State(string=u'STOPPED')

Service Run State is Stopped

STOPPING = State(string=u'STOPPING')

Service Run State is Stopping, it is not functional

class Service.UpdateSpec(startup_type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Service.UpdateSpec class describes the changes to be made to the configuration of the service.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:startup_type (Service.StartupType or None) – Startup Type If unspecified, leaves value unchanged.
Service.get(service)

Returns the state of a service.

Parameters:service (str) – identifier of the service whose state is being queried. The parameter must be an identifier for the resource type: com.vmware.appliance.vmon.Service.
Return type:Service.Info
Returns:Service Info structure.
Raise:com.vmware.vapi.std.errors_client.NotFound if the service associated with service does not exist.
Raise:com.vmware.vapi.std.errors_client.Error if any other error occurs during the execution of the operation.
Service.list_details()

Lists details of services managed by vMon.

Return type:dict of str and Service.Info
Returns:Map of service identifiers to service Info structures. The key in the return value dict will be an identifier for the resource type: com.vmware.appliance.vmon.Service.
Raise:com.vmware.vapi.std.errors_client.Error if any error occurs during the execution of the operation.
Service.restart(service)

Restarts a service

Parameters:service (str) – identifier of the service to restart The parameter must be an identifier for the resource type: com.vmware.appliance.vmon.Service.
Raise:com.vmware.vapi.std.errors_client.NotFound if the service associated with service does not exist.
Raise:com.vmware.vapi.std.errors_client.TimedOut if any timeout occurs during the execution of the restart operation.
Raise:com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the operation is denied in the current state of the service. If a stop or start operation is in progress, issuing a restart operation will lead to this error.
Raise:com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if a restart operation is issued on a service which has startup type Service.StartupType.DISABLED
Raise:com.vmware.vapi.std.errors_client.Error if any other error occurs during the execution of the operation.
Service.start(service)

Starts a service

Parameters:service (str) – identifier of the service to start The parameter must be an identifier for the resource type: com.vmware.appliance.vmon.Service.
Raise:com.vmware.vapi.std.errors_client.NotFound if the service associated with service does not exist.
Raise:com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the operation is denied in the current state of the service. If a stop or restart operation is in progress, the start operation will not be allowed.
Raise:com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if start operation is issued on a service which has startup type Service.StartupType.DISABLED.
Raise:com.vmware.vapi.std.errors_client.TimedOut if any timeout occurs during the execution of the start operation. Timeout occurs when the service takes longer than StartTimeout to start.
Raise:com.vmware.vapi.std.errors_client.Error if any other error occurs during the execution of the operation.
Service.stop(service)

Stops a service

Parameters:service (str) – identifier of the service to stop The parameter must be an identifier for the resource type: com.vmware.appliance.vmon.Service.
Raise:com.vmware.vapi.std.errors_client.NotFound if the service associated with service does not exist.
Raise:com.vmware.vapi.std.errors_client.Error if any other error occurs during the execution of the operation.
Raise:com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the operation is denied in the current state of the service. If a stop operation is in progress, issuing another stop operation will lead to this error.
Service.update(service, spec)

Updates the properties of a service.

Parameters:
  • service (str) – identifier of the service whose properties are being updated. The parameter must be an identifier for the resource type: com.vmware.appliance.vmon.Service.
  • spec (Service.UpdateSpec) – Service Update specification.
Raise:

com.vmware.vapi.std.errors_client.NotFound if the service associated with service does not exist.

Raise:

com.vmware.vapi.std.errors_client.Error if any other error occurs during the execution of the operation.

Raise:

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the operation is denied in the current state of the service. If a start, stop or restart operation is in progress, update operation will fail with this error.

Raise:

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if a request to set the Service.UpdateSpec.startup_type attribute of spec to Service.StartupType.DISABLED comes in for a service that is not in Service.State.STOPPED state.

Module contents