com.vmware package¶
Subpackages¶
- com.vmware.appliance package
- Subpackages
- Submodules
- com.vmware.appliance.access_client module
- com.vmware.appliance.health_client module
- com.vmware.appliance.local_accounts_client module
- com.vmware.appliance.localaccounts_client module
- com.vmware.appliance.logging_client module
- com.vmware.appliance.monitoring_client module
- com.vmware.appliance.networking_client module
- com.vmware.appliance.ntp_client module
- com.vmware.appliance.recovery_client module
- com.vmware.appliance.shutdown_client module
- com.vmware.appliance.system_client module
- com.vmware.appliance.tymesync_client module
- com.vmware.appliance.update_client module
- com.vmware.appliance.vmon_client module
- com.vmware.cis package
- com.vmware.content package
- com.vmware.vapi package
- Subpackages
- com.vmware.vapi.metadata package
- Subpackages
- Submodules
- com.vmware.vapi.metadata.authentication_client module
- com.vmware.vapi.metadata.cli_client module
- com.vmware.vapi.metadata.metamodel_client module
- com.vmware.vapi.metadata.privilege_client module
- com.vmware.vapi.std package
- com.vmware.vapi.metadata package
- Submodules
- com.vmware.vapi.std_client module
- Subpackages
- com.vmware.vcenter package
- Subpackages
- com.vmware.vcenter.deployment package
- com.vmware.vcenter.hvc package
- com.vmware.vcenter.storage package
- com.vmware.vcenter.vm package
- Submodules
- com.vmware.vcenter.datastore_client module
- com.vmware.vcenter.deployment_client module
- com.vmware.vcenter.hvc_client module
- com.vmware.vcenter.inventory_client module
- com.vmware.vcenter.iso_client module
- com.vmware.vcenter.ovf_client module
- com.vmware.vcenter.services_client module
- com.vmware.vcenter.storage_client module
- com.vmware.vcenter.system_config_client module
- com.vmware.vcenter.vm_client module
- com.vmware.vcenter.vm_template_client module
- Subpackages
Submodules¶
com.vmware.appliance_client module¶
The com.vmware.appliance_client module provides classes for managing
vCenter Appliance configuration. The module is available starting in vSphere
6.7.
-
class
com.vmware.appliance_client.Health(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Healthclass provides methods to retrieve the appliance health information. This class was added in vSphere API 6.7-
messages(item)¶ Get health messages. This method was added in vSphere API 6.7
Parameters: item ( str) – ID of the data item The parameter must be an identifier for the resource type:com.vmware.appliance.health.Return type: listofNotificationReturns: List of the health messages Raise: com.vmware.vapi.std.errors_client.NotFoundUnknown health itemRaise: com.vmware.vapi.std.errors_client.ErrorGeneric error
-
-
class
com.vmware.appliance_client.LocalAccounts(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
LocalAccountsclass provides methods to manage local user account. This class was added in vSphere API 6.7-
class
Config(password=None, old_password=None, full_name=None, email=None, roles=None, enabled=None, password_expires=None, password_expires_at=None, inactive_after_password_expiration=None, days_after_password_expiration=None, min_days_between_password_change=None, max_days_between_password_change=None, warn_days_before_password_expiration=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
LocalAccounts.Configclass defines the information required for the account. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
class
Info(fullname=None, email=None, roles=None, enabled=None, has_password=None, last_password_change=None, password_expires_at=None, inactive_at=None, min_days_between_password_change=None, max_days_between_password_change=None, warn_days_before_password_expiration=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
LocalAccounts.Infoclass defines the local account properties. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
class
UpdateConfig(password=None, old_password=None, full_name=None, email=None, roles=None, enabled=None, password_expires=None, password_expires_at=None, inactive_after_password_expiration=None, days_after_password_expiration=None, min_days_between_password_change=None, max_days_between_password_change=None, warn_days_before_password_expiration=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
LocalAccounts.UpdateConfigclass defines the fields that might be updated. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
create(username, config)¶ Create a new local user account. This method was added in vSphere API 6.7
Parameters: - username (
str) – User login name The parameter must be an identifier for the resource type:com.vmware.appliance.local_accounts. - config (
LocalAccounts.Config) – User configuration
Raise: com.vmware.vapi.std.errors_client.AlreadyExistsIf an account already existsRaise: com.vmware.vapi.std.errors_client.InvalidArgumentIf a username is invalid (username is validated against [a-zA-Z0-9][a-zA-Z0-9-.\@]\*[a-zA-Z0-9] pattern)Raise: com.vmware.vapi.std.errors_client.ErrorGeneric error- username (
-
delete(username)¶ Delete a local user account. This method was added in vSphere API 6.7
Parameters: username ( str) – User login name The parameter must be an identifier for the resource type:com.vmware.appliance.local_accounts.Raise: com.vmware.vapi.std.errors_client.NotFoundIf the account is not foundRaise: com.vmware.vapi.std.errors_client.ErrorGeneric error
-
get(username)¶ Get the local user account information. This method was added in vSphere API 6.7
Parameters: username ( str) – User login nameReturn type: LocalAccounts.InfoReturns: Local user account information Raise: com.vmware.vapi.std.errors_client.NotFoundIf the account is not foundRaise: com.vmware.vapi.std.errors_client.ErrorGeneric error
-
list()¶ Get a list of the local user accounts. This method was added in vSphere API 6.7
Return type: listofstrReturns: List of identifiers The return value will contain identifiers for the resource type: com.vmware.appliance.local_accounts.Raise: com.vmware.vapi.std.errors_client.ErrorGeneric error
-
set(username, config)¶ Set local user account properties. This method was added in vSphere API 6.7
Parameters: - username (
str) – User login name The parameter must be an identifier for the resource type:com.vmware.appliance.local_accounts. - config (
LocalAccounts.Config) – User configuration
Raise: com.vmware.vapi.std.errors_client.NotFoundIf the account is not foundRaise: com.vmware.vapi.std.errors_client.ErrorGeneric error- username (
-
update(username, config)¶ Update selected fields in local user account properties. This method was added in vSphere API 6.7
Parameters: - username (
str) – User login name The parameter must be an identifier for the resource type:com.vmware.appliance.local_accounts. - config (
LocalAccounts.UpdateConfig) – User configuration
Raise: com.vmware.vapi.std.errors_client.NotFoundIf the account is not foundRaise: com.vmware.vapi.std.errors_client.ErrorGeneric error- username (
-
class
-
class
com.vmware.appliance_client.Monitoring(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceMonitoringclass provides methods Get and list monitoring data for requested item.-
class
FunctionType(string)¶ Bases:
vmware.vapi.bindings.enum.EnumMonitoring.FunctionTypeclass Defines aggregation functionNote
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.
-
AVG= FunctionType(string='AVG')¶ Aggregation takes average per period
-
COUNT= FunctionType(string='COUNT')¶ Aggregation takes count per period (sum)
-
MAX= FunctionType(string='MAX')¶ Aggregation takes maximums per period
-
MIN= FunctionType(string='MIN')¶ Aggregation takes minimums per period
-
-
class
IntervalType(string)¶ Bases:
vmware.vapi.bindings.enum.EnumMonitoring.IntervalTypeclass Defines interval between the values in hours and mins, for which aggregation will applyNote
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.
-
DAY1= IntervalType(string='DAY1')¶ 24 hours interval between values. One year has 365 values.
-
HOURS2= IntervalType(string='HOURS2')¶ Two hours interval between values. One month has 360 values.
-
HOURS6= IntervalType(string='HOURS6')¶ Six hour interval between values. One quarter is 360 values.
-
MINUTES30= IntervalType(string='MINUTES30')¶ Thirty minutes interval between values. One week is 336 values.
-
MINUTES5= IntervalType(string='MINUTES5')¶ Five minutes interval between values (finest). One day would have 288 values, one week is 2016.
-
-
class
MonitoredItem(id=None, name=None, units=None, category=None, instance=None, description=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructMonitoring.MonitoredItemclass Structure representing requested monitored item data.Tip
The arguments are used to initialize data attributes with the same names.
-
class
MonitoredItemData(name=None, interval=None, function=None, start_time=None, end_time=None, data=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructMonitoring.MonitoredItemDataclass Structure representing monitored item data.Tip
The arguments are used to initialize data attributes with the same names.
-
class
MonitoredItemDataRequest(names=None, interval=None, function=None, start_time=None, end_time=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructMonitoring.MonitoredItemDataRequestclass Structure representing requested monitored item data.Tip
The arguments are used to initialize data attributes with the same names.
-
get(stat_id)¶ Get monitored item info
Parameters: stat_id ( str) – statistic item id The parameter must be an identifier for the resource type:com.vmware.appliance.monitoring.Return type: Monitoring.MonitoredItemReturns: MonitoredItem structure Raise: com.vmware.vapi.std.errors_client.ErrorGeneric error
-
list()¶ Get monitored items list
Return type: listofMonitoring.MonitoredItemReturns: list of names Raise: com.vmware.vapi.std.errors_client.ErrorGeneric error
-
query(item)¶ Get monitoring data.
Parameters: item ( Monitoring.MonitoredItemDataRequest) – MonitoredItemDataRequest StructureReturn type: listofMonitoring.MonitoredItemDataReturns: list of MonitoredItemData structure Raise: com.vmware.vapi.std.errors_client.ErrorGeneric error
-
class
-
class
com.vmware.appliance_client.Networking(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Networkingclass provides methods Get Network configurations. This class was added in vSphere API 6.7-
class
DNSInfo(mode=None, hostname=None, servers=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Networking.DNSInfoclass contains information about the DNS configuration of a virtual appliance. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
class
DNSMode(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
Networking.DNSInfo.DNSModeclass describes the source of DNS servers. This enumeration was added in vSphere API 6.7Note
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.
-
DHCP= DNSMode(string='DHCP')¶ The DNS servers addresses are obtained from a DHCP server. This class attribute was added in vSphere API 6.7
-
STATIC= DNSMode(string='STATIC')¶ The DNS servers addresses are specified explicitly. This class attribute was added in vSphere API 6.7
-
-
class
-
class
Info(dns=None, interfaces=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Networking.Infoclass contains information about the network configuration of a virtual appliance. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
class
UpdateSpec(ipv6_enabled=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Networking.UpdateSpecclass describes whether to enable or disable ipv6 on interfaces. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
get()¶ Get Networking information for all configured interfaces. This method was added in vSphere API 6.7
Return type: Networking.InfoReturns: The Map of network configuration info for all interfaces. Raise: com.vmware.vapi.std.errors_client.ErrorGeneric error.
-
reset()¶ Reset and restarts network configuration on all interfaces, also this will renew the DHCP lease for DHCP IP address. This method was added in vSphere API 6.7
Raise: com.vmware.vapi.std.errors_client.ErrorGeneric error.
-
update(spec)¶ Enable or Disable ipv6 on all interfaces. This method was added in vSphere API 6.7
Parameters: spec ( Networking.UpdateSpec) – update spec with optional boolean valueRaise: com.vmware.vapi.std.errors_client.ErrorGeneric error.
-
class
-
class
com.vmware.appliance_client.Notification(id=None, time=None, message=None, resolution=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Notificationclass describes a notification that can be reported by the appliance task. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
class
com.vmware.appliance_client.Notifications(info=None, warnings=None, errors=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Notificationsclass contains info/warning/error messages that can be reported be the appliance task. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
class
com.vmware.appliance_client.Ntp(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceNtpclass provides methods Gets NTP configuration status and tests connection to ntp servers. This class was added in vSphere API 6.7-
class
LocalizableMessage(id=None, default_message=None, args=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructNtp.LocalizableMessageclass Structure representing message. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
class
ServerStatus(string)¶ Bases:
vmware.vapi.bindings.enum.EnumNtp.ServerStatusclass Status of server during test. This enumeration was added in vSphere API 6.7Note
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.
-
SERVER_REACHABLE= ServerStatus(string='SERVER_REACHABLE')¶ Server is reachable. This class attribute was added in vSphere API 6.7
-
SERVER_UNREACHABLE= ServerStatus(string='SERVER_UNREACHABLE')¶ Server is unreachable. This class attribute was added in vSphere API 6.7
-
-
class
TestRunStatus(server=None, status=None, message=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructNtp.TestRunStatusclass Status of the test. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
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. This method was added in vSphere API 6.7
Return type: listofstrReturns: List of NTP servers. Raise: com.vmware.vapi.std.errors_client.ErrorGeneric error
-
set(servers)¶ Set NTP servers. This method updates old NTP servers from configuration and sets the input NTP servers in the configuration. If NTP based time synchronization is used internally, the NTP daemon will be restarted to reload given NTP configuration. In case NTP based time synchronization is not used, this method only replaces servers in the NTP configuration. This method was added in vSphere API 6.7
Parameters: servers ( listofstr) – List of host names or ip addresses of ntp servers.Raise: com.vmware.vapi.std.errors_client.ErrorGeneric error
-
test(servers)¶ Test the connection to a list of ntp servers. This method was added in vSphere API 6.7
Parameters: servers ( listofstr) – List of host names or IP addresses of NTP servers.Return type: listofNtp.TestRunStatusReturns: List of test run statuses. Raise: com.vmware.vapi.std.errors_client.ErrorGeneric error
-
class
-
class
com.vmware.appliance_client.Recovery(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Recoveryclass provides methods to invoke an appliance recovery (backup and restore). This class was added in vSphere API 6.7-
class
Info(supported=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Recovery.Infoclass contains the information about the appliance recovery environment. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
get()¶ Gets the properties of the appliance Recovery subsystem. This method was added in vSphere API 6.7
Return type: Recovery.InfoReturns: Structure containing the properties of the Recovery subsystem. Raise: com.vmware.vapi.std.errors_client.Errorif any error occurs during the execution of the operation.
-
class
-
class
com.vmware.appliance_client.Services(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Serviceclass provides methods to manage a single/set of appliance services. This class was added in vSphere API 6.7-
class
Info(description=None, state=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Services.Infoclass contains information about a service. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
class
State(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
Services.Stateclass defines valid Run State for services. This enumeration was added in vSphere API 6.7Note
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.
-
STARTED= State(string='STARTED')¶ Service Run State is Started, it is fully functional. This class attribute was added in vSphere API 6.7
-
STARTING= State(string='STARTING')¶ Service Run State is Starting, it is still not functional. This class attribute was added in vSphere API 6.7
-
STOPPED= State(string='STOPPED')¶ Service Run State is Stopped. This class attribute was added in vSphere API 6.7
-
STOPPING= State(string='STOPPING')¶ Service Run State is Stopping, it is not functional. This class attribute was added in vSphere API 6.7
-
-
get(service)¶ Returns the state of a service. This method was added in vSphere API 6.7
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.services.Return type: Services.InfoReturns: Service Info structure. Raise: com.vmware.vapi.std.errors_client.NotFoundif the service associated withservicedoes not exist.Raise: com.vmware.vapi.std.errors_client.Errorif any other error occurs during the execution of the operation.
-
list()¶ Lists details of vCenter services. This method was added in vSphere API 6.7
Return type: dictofstrandServices.InfoReturns: Map of service identifiers to service Info structures. The key in the return value dictwill be an identifier for the resource type:com.vmware.appliance.services.Raise: com.vmware.vapi.std.errors_client.Errorif any error occurs during the execution of the operation.
-
restart(service)¶ Restarts a service. This method was added in vSphere API 6.7
Parameters: service ( str) – identifier of the service to restart The parameter must be an identifier for the resource type:com.vmware.appliance.services.Raise: com.vmware.vapi.std.errors_client.NotFoundif the service associated withservicedoes not exist.Raise: com.vmware.vapi.std.errors_client.TimedOutif any timeout occurs during the execution of the restart operation.Raise: com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif 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.NotAllowedInCurrentStateif a restart operation is issued on a service which has startup type nullRaise: com.vmware.vapi.std.errors_client.Errorif any other error occurs during the execution of the operation.
-
start(service)¶ Starts a service. This method was added in vSphere API 6.7
Parameters: service ( str) – identifier of the service to start The parameter must be an identifier for the resource type:com.vmware.appliance.services.Raise: com.vmware.vapi.std.errors_client.NotFoundif the service associated withservicedoes not exist.Raise: com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif 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.NotAllowedInCurrentStateif start operation is issued on a service which has startup type null.Raise: com.vmware.vapi.std.errors_client.TimedOutif 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.Errorif any other error occurs during the execution of the operation.
-
stop(service)¶ Stops a service. This method was added in vSphere API 6.7
Parameters: service ( str) – identifier of the service to stop The parameter must be an identifier for the resource type:com.vmware.appliance.services.Raise: com.vmware.vapi.std.errors_client.NotFoundif the service associated withservicedoes not exist.Raise: com.vmware.vapi.std.errors_client.Errorif any other error occurs during the execution of the operation.Raise: com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif 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.
-
class
-
class
com.vmware.appliance_client.Shutdown(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceShutdownclass provides methods Performs reboot/shutdown operations on appliance. This class was added in vSphere API 6.7-
class
ShutdownConfig(shutdown_time=None, action=None, reason=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructShutdown.ShutdownConfigclass Structure that defines shutdown configuration returned by the Shutdown.get operation. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
cancel()¶ Cancel pending shutdown action. This method was added in vSphere API 6.7
Raise: com.vmware.vapi.std.errors_client.ErrorGeneric error
-
get()¶ Get details about the pending shutdown action. This method was added in vSphere API 6.7
Return type: Shutdown.ShutdownConfigReturns: Configuration of pending shutdown action. Raise: com.vmware.vapi.std.errors_client.ErrorGeneric error
-
poweroff(delay, reason)¶ Power off the appliance. This method was added in vSphere API 6.7
Parameters: - delay (
long) – Minutes after which poweroff should start. If 0 is specified, poweroff will start immediately. - reason (
str) – Reason for peforming poweroff.
Raise: com.vmware.vapi.std.errors_client.ErrorGeneric error- delay (
-
reboot(delay, reason)¶ Reboot the appliance. This method was added in vSphere API 6.7
Parameters: - delay (
long) – Minutes after which reboot should start. If 0 is specified, reboot will start immediately. - reason (
str) – Reason for peforming reboot.
Raise: com.vmware.vapi.std.errors_client.ErrorGeneric error- delay (
-
class
-
class
com.vmware.appliance_client.StubFactory(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
-
class
com.vmware.appliance_client.SubtaskInfo(progress=None, result=None, description=None, service=None, operation=None, parent=None, target=None, status=None, cancelable=None, error=None, start_time=None, end_time=None, user=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
SubtaskInfoclass contains information about one of the subtasks that makes up an appliance task. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
class
com.vmware.appliance_client.TaskInfo(progress=None, subtask_order=None, subtasks=None, description=None, service=None, operation=None, parent=None, target=None, status=None, cancelable=None, error=None, start_time=None, end_time=None, user=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
TaskInfoclass contains information about an appliance task and the subtasks of which it consists. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
class
com.vmware.appliance_client.Timesync(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceTimesyncclass provides methods Performs time synchronization configuration. This class was added in vSphere API 6.7-
class
TimeSyncMode(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
Timesync.TimeSyncModeclass defines time synchronization modes. This enumeration was added in vSphere API 6.7Note
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.
-
DISABLED= TimeSyncMode(string='DISABLED')¶ Time synchronization is disabled. This class attribute was added in vSphere API 6.7
-
HOST= TimeSyncMode(string='HOST')¶ VMware Tool-based time synchronization. This class attribute was added in vSphere API 6.7
-
NTP= TimeSyncMode(string='NTP')¶ NTP-based time synchronization. This class attribute was added in vSphere API 6.7
-
-
get()¶ Get time synchronization mode. This method was added in vSphere API 6.7
Return type: Timesync.TimeSyncModeReturns: Time synchronization mode. Raise: com.vmware.vapi.std.errors_client.ErrorGeneric error
-
set(mode)¶ Set time synchronization mode. This method was added in vSphere API 6.7
Parameters: mode ( Timesync.TimeSyncMode) – Time synchronization mode.Raise: com.vmware.vapi.std.errors_client.ErrorGeneric error
-
class
-
class
com.vmware.appliance_client.Update(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Updateclass provides methods to get the status of the appliance update. This class was added in vSphere API 6.7-
class
Info(state=None, task=None, version=None, latest_query_time=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Update.Infoclass describes the state of the appliance update. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
class
State(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
Update.Stateclass defines the various states the appliance update can be in. This enumeration was added in vSphere API 6.7Note
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.
-
INSTALL_FAILED= State(string='INSTALL_FAILED')¶ The appliance update failed and cannot recover. This class attribute was added in vSphere API 6.7
-
INSTALL_IN_PROGRESS= State(string='INSTALL_IN_PROGRESS')¶ The appliance update is in progress of installing an update. This class attribute was added in vSphere API 6.7
-
ROLLBACK_IN_PROGRESS= State(string='ROLLBACK_IN_PROGRESS')¶ The appliance update failed and recovery is in progress. This class attribute was added in vSphere API 6.7
-
STAGE_IN_PROGRESS= State(string='STAGE_IN_PROGRESS')¶ The appliance update is in progress of downloading an update. This class attribute was added in vSphere API 6.7
-
UPDATES_PENDING= State(string='UPDATES_PENDING')¶ A new update is available. This class attribute was added in vSphere API 6.7
-
UP_TO_DATE= State(string='UP_TO_DATE')¶ The appliance is up to date. This class attribute was added in vSphere API 6.7
-
-
cancel()¶ Request the cancellation the update operation that is currently in progress. This method was added in vSphere API 6.7
Raise: com.vmware.vapi.std.errors_client.ErrorGeneric errorRaise: com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateCurrent task is not cancellableRaise: com.vmware.vapi.std.errors_client.Unauthenticatedsession is not authenticatedRaise: com.vmware.vapi.std.errors_client.Unauthorizedsession is not authorized to perform this operation
-
get()¶ Gets the current status of the appliance update. This method was added in vSphere API 6.7
Return type: Update.InfoReturns: Info structure containing the status information about the appliance. Raise: com.vmware.vapi.std.errors_client.ErrorGeneric errorRaise: com.vmware.vapi.std.errors_client.Unauthenticatedsession is not authenticatedRaise: com.vmware.vapi.std.errors_client.Unauthorizedsession is not authorized to perform this operation
-
class
com.vmware.cis_client module¶
The com.vmware.cis_client module provides VMware common infrastructure
classes.
-
class
com.vmware.cis_client.Session(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Sessionclass allows API clients to manage session tokens including creating, deleting and obtaining information about sessions.- The
Session.create()method creates session token in exchange for another authentication token. - The
Session.delete()method invalidates a session token. - The
Session.get()retrieves information about a session token.
The call to the
Session.create()method is part of the overall authentication process for API clients. For example, the sequence of steps for establishing a session with SAML token is:- Connect to lookup service.
- Discover the secure token service (STS) endpoint URL.
- Connect to the secure token service to obtain a SAML token.
- Authenticate to the lookup service using the obtained SAML token.
- Discover the API endpoint URL from lookup service.
- Call the
Session.create()method. TheSession.create()call must include the SAML token.
See the programming guide and samples for additional information about establishing API sessions.
Execution Context and Security ContextTo use session based authentication a client should supply the session token obtained through the
Session.create()method. The client should add the session token in the security context when using SDK classes. Clients using the REST API should supply the session token as a HTTP header.Session LifetimeA session begins with call to the
Session.create()method to exchange a SAML token for a API session token. A session ends under the following circumstances:- Call to the
Session.delete()method. - The session expires. Session expiration may be caused by one of the following situations:
- Client inactivity - For a particular session identified by client requests that specify the associated session ID, the lapsed time since the last request exceeds the maximum interval between requests.
- Unconditional or absolute session expiration time: At the beginning of the session, the session logic uses the SAML token and the system configuration to calculate absolute expiration time.
When a session ends, the authentication logic will reject any subsequent client requests that specify that session. Any operations in progress will continue to completion.
Error Handling
The
Sessionreturns the following exceptions:com.vmware.vapi.std.errors_client.Unauthenticatedexception for any exceptions related to the request.com.vmware.vapi.std.errors_client.ServiceUnavailableexception for all exceptions caused by internal service failure.
-
class
Info(user=None, created_time=None, last_accessed_time=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructRepresents data associated with an API session.
Tip
The arguments are used to initialize data attributes with the same names.
-
create()¶ Creates a session with the API. This is the equivalent of login. This method exchanges user credentials supplied in the security context for a session identifier that is to be used for authenticating subsequent calls. To authenticate subsequent calls clients are expected to include the session key.
Return type: strReturns: Newly created session identifier to be used for authenticating further requests.
Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the session creation fails due to request specific issues. Due to the security nature of the API the details of the error are not disclosed.Please check the following preconditions if using a SAML token to authenticate:
- the supplied token is delegate-able.
- the time of client and server system are synchronized.
- the token supplied is valid.
- if bearer tokens are used check that system configuration allows the API endpoint to accept such tokens.
Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif session creation fails due to server specific issues, for example connection to a back end component is failing. Due to the security nature of this API further details will not be disclosed in the exception. Please refer to component health information, administrative logs and product specific documentation for possible causes.
-
delete()¶ Terminates the validity of a session token. This is the equivalent of log out.
A session identifier is expected as part of the request.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the session id is missing from the request or the corresponding session object cannot be found.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif session deletion fails due to server specific issues, for example connection to a back end component is failing. Due to the security nature of this API further details will not be disclosed in the exception. Please refer to component health information, administrative logs and product specific documentation for possible causes.
-
get()¶ Returns information about the current session. This method expects a valid session identifier to be supplied.
A side effect of invoking this method may be a change to the session’s last accessed time to the current time if this is supported by the session implementation. Invoking any other method in the API will also update the session’s last accessed time.
This API is meant to serve the needs of various front end projects that may want to display the name of the user. Examples of this include various web based user interfaces and logging facilities.
Return type: Session.InfoReturns: Information about the session. Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the session id is missing from the request or the corresponding session object cannot be found.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif session retrieval fails due to server specific issues e.g. connection to back end component is failing. Due to the security nature of this API further details will not be disclosed in the error. Please refer to component health information, administrative logs and product specific documentation for possible causes.
- The
-
class
com.vmware.cis_client.StubFactory(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
com.vmware.content_client module¶
The Content module provides classes and classes for configuring global settings and permissions, and for managing libraries in the Content Library Service.
-
class
com.vmware.content_client.Configuration(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Configurationclass provides methods to configure the global settings of the Content Library Service.The configuration settings are used by the Content Library Service to control the behavior of various operations.
-
get()¶ Retrieves the current configuration values.
Return type: Returns: The
ConfigurationModelinstance representing the configuration of the Content Library Service.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- Method execution requires
ContentLibrary.GetConfiguration.
- Method execution requires
-
update(model)¶ Updates the configuration. The update is incremental. Any attribute in the
ConfigurationModelclass that is None will not be modified. Note that this update method doesn’t guarantee an atomic change of all the properties. In the case of a system crash or failure, some of the properties could be left unchanged while others may be updated.Parameters: model (
ConfigurationModel) – TheConfigurationModelspecifying the settings to update.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif one of the configuration properties is not within the proper range.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- Method execution requires
ContentLibrary.UpdateConfiguration.
- Method execution requires
-
-
class
com.vmware.content_client.ConfigurationModel(automatic_sync_enabled=None, automatic_sync_start_hour=None, automatic_sync_stop_hour=None, maximum_concurrent_item_syncs=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
ConfigurationModelclass defines the global settings of the Content Library Service.Tip
The arguments are used to initialize data attributes with the same names.
-
class
com.vmware.content_client.Library(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Libraryclass provides methods to manage and findLibraryModelentities.The
Libraryclass provides support for generic functionality which can be applied equally to all types of libraries. The functionality provided by this class will not affect the properties specific to the type of library. See alsoLocalLibraryandSubscribedLibrary.-
class
FindSpec(name=None, type=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructSpecifies the properties that can be used as a filter to find libraries. When multiple attributes are specified, all properties of the library must match the specification.
Tip
The arguments are used to initialize data attributes with the same names.
-
RESOURCE_TYPE= 'com.vmware.content.Library'¶ Resource type for library.
-
find(spec)¶ Returns a list of all the visible (as determined by authorization policy) libraries matching the requested
Library.FindSpec.Parameters: spec (
Library.FindSpec) – Specification describing what properties to filter on.Return type: listofstrReturns: The
listof identifiers of all the visible libraries matching the givenspec. The return value will contain identifiers for the resource type:com.vmware.content.Library.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif no properties are specified in thespec.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- Method execution requires
System.Read.
- Method execution requires
-
get(library_id)¶ Returns a given
LibraryModel.Parameters: library_id (
str) – Identifier of the library to return. The parameter must be an identifier for the resource type:com.vmware.content.Library.Return type: Returns: The
LibraryModelinstance with the specifiedlibrary_id.Raise: com.vmware.vapi.std.errors_client.NotFoundif the specified library does not exist.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource
com.vmware.content.Libraryreferenced by the parameterlibrary_idrequiresSystem.Read.
- The resource
-
list()¶ Returns the identifiers of all libraries of any type in the Content Library.
Return type: listofstrReturns: The
listof all identifiers of all libraries in the Content Library. The return value will contain identifiers for the resource type:com.vmware.content.Library.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- Method execution requires
System.Read.
- Method execution requires
-
update(library_id, update_spec)¶ Updates the properties of a library.
This is an incremental update to the library. Any attribute in the
LibraryModelclass that is None will not be modified.This method will only update the common properties for all library types. This will not, for example, update the
LibraryModel.publish_infoof a local library, nor theLibraryModel.subscription_infoof a subscribed library. Specific properties are updated inLocalLibrary.update()andSubscribedLibrary.update().Parameters: - library_id (
str) – Identifier of the library to update. The parameter must be an identifier for the resource type:com.vmware.content.Library. - update_spec (
LibraryModel) – Specification of the new property values to set on the library.
Raise: com.vmware.vapi.std.errors_client.NotFoundif the library associated withlibrary_iddoes not exist.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif theupdate_specis not valid.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif theLibraryModel.versionofupdate_specis not equal to the current version of the library.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource
com.vmware.content.Libraryreferenced by the parameterlibrary_idrequiresContentLibrary.UpdateLibrary.
- library_id (
-
class
-
class
com.vmware.content_client.LibraryModel(id=None, creation_time=None, description=None, last_modified_time=None, last_sync_time=None, name=None, storage_backings=None, type=None, optimization_info=None, version=None, publish_info=None, subscription_info=None, server_guid=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
LibraryModelclass represents a Content Library resource model.A
LibraryModelis a container for a set of items which represent a usable set of files. The Content Library Service allows for multiple libraries to be created with separate authorization and sharing policies.Each
LibraryModelis a container for a set ofcom.vmware.content.library_client.ItemModelinstances. Each item is a logical object in a library, which may have multiple files.A
LibraryModelmay be local or subscribed. A local library has its source of truth about items within this Content Library Service. Items may be added to or removed from the library. A local library may also be private or published. When published, the library is exposed by a network endpoint and can be used by another Content Library Service for synchronization. A private local library cannot be used for synchronization.A subscribed library is a library which gets its source of truth from another library that may be across a network in another Content Library Service. A subscribed library may have a different name and metadata from the library to which it subscribes, but the set of library items is always the same as those in the source library. Library items cannot be manually added to a subscribed library – they can only be added by adding new items to the source library.
Tip
The arguments are used to initialize data attributes with the same names.
-
class
LibraryType(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
LibraryModel.LibraryTypeclass defines the type of aLibraryModel.The type of a library can be used to determine which additional services can be performed with a library.
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.
-
LOCAL= LibraryType(string='LOCAL')¶ The library contents are defined and stored by the local Content Library Service installation.
A local library can be retrieved and managed via the
LocalLibrary.
-
SUBSCRIBED= LibraryType(string='SUBSCRIBED')¶ The library synchronizes its items and content from another published library.
A subscribed library can be retrieved and managed via the
SubscribedLibrary.
-
-
class
-
class
com.vmware.content_client.LocalLibrary(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
LocalLibraryclass manages local libraries.The
LocalLibraryclass provides support for creating and maintaining local library instances. A local library may also use theLibraryclass to manage general library functionality.-
create(create_spec, client_token=None)¶ Creates a new local library.
Parameters: - client_token (
strorNone) – A unique token generated on the client for each creation request. The token should be a universally unique identifier (UUID), for example:b8a2a2e3-2314-43cd-a871-6ede0f429751. This token can be used to guarantee idempotent creation. If not specified creation is not idempotent. - create_spec (
LibraryModel) – Specification for the new local library.
Return type: strReturns: Identifier of the newly created
LibraryModel. The return value will be an identifier for the resource type:com.vmware.content.Library.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif thecreate_specis not valid.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif theclient_tokendoes not conform to the UUID format.Raise: com.vmware.vapi.std.errors_client.Unsupportedif using multiple storage backings.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- Method execution requires
ContentLibrary.CreateLocalLibrary.
- client_token (
-
delete(library_id)¶ Deletes the specified local library.
Deleting a local library will remove the entry immediately and begin an asynchronous task to remove all cached content for the library. If the asynchronous task fails, file content may remain on the storage backing. This content will require manual removal.
Parameters: library_id (
str) – Identifier of the local library to delete. The parameter must be an identifier for the resource type:com.vmware.content.Library.Raise: com.vmware.vapi.std.errors_client.InvalidElementTypeif the library specified bylibrary_idis not a local library.Raise: com.vmware.vapi.std.errors_client.NotFoundif the library specified bylibrary_iddoes not exist.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource
com.vmware.content.Libraryreferenced by the parameterlibrary_idrequiresContentLibrary.DeleteLocalLibrary.
- The resource
-
get(library_id)¶ Returns a given local library.
Parameters: library_id (
str) – Identifier of the local library to return. The parameter must be an identifier for the resource type:com.vmware.content.Library.Return type: Returns: The
LibraryModelinstance associated withlibrary_id.Raise: com.vmware.vapi.std.errors_client.NotFoundif the library specified bylibrary_iddoes not exist.Raise: com.vmware.vapi.std.errors_client.InvalidElementTypeif the library specified bylibrary_idis not a local library.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource
com.vmware.content.Libraryreferenced by the parameterlibrary_idrequiresSystem.Read.
- The resource
-
list()¶ Returns the identifiers of all local libraries in the Content Library.
Return type: listofstrReturns: The
listof identifiers of all local libraries in the Content Library. The return value will contain identifiers for the resource type:com.vmware.content.Library.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- Method execution requires
System.Read.
- Method execution requires
-
update(library_id, update_spec)¶ Updates the properties of a local library.
This is an incremental update to the local library. Attributes that are None in the update specification will be left unchanged.
Parameters: - library_id (
str) – Identifier of the local library to update. The parameter must be an identifier for the resource type:com.vmware.content.Library. - update_spec (
LibraryModel) – Specification of the new property values to set on the local library.
Raise: com.vmware.vapi.std.errors_client.NotFoundif the library specified bylibrary_iddoes not exist.Raise: com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the library specified bylibrary_idis a published library with JSON persistence enabled (seecom.vmware.content.library_client.PublishInfo.persist_json_enabled) and the content of the library has been deleted from the storage backings (seeLibraryModel.storage_backings) associated with it.Raise: com.vmware.vapi.std.errors_client.InvalidElementTypeif the library specified bylibrary_idis not a local library.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif theupdate_specis not valid.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif thecom.vmware.content.library_client.PublishInfo.current_passwordin theupdate_specdoes not match the existing password of the published library.Raise: com.vmware.vapi.std.errors_client.ResourceBusyif theLibraryModel.versionofupdate_specis None and the library is being concurrently updated by another user.Raise: com.vmware.vapi.std.errors_client.ConcurrentChangeif theLibraryModel.versionofupdate_specis not equal to the current version of the library.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource
com.vmware.content.Libraryreferenced by the parameterlibrary_idrequiresContentLibrary.UpdateLocalLibrary.
- library_id (
-
-
class
com.vmware.content_client.StubFactory(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
-
class
com.vmware.content_client.SubscribedLibrary(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface-
class
ProbeResult(status=None, ssl_thumbprint=None, error_messages=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
SubscribedLibrary.ProbeResultclass defines the subscription information probe result. This describes whether using a given subscription URL is successful or if there are access problems, such as SSL errors.Tip
The arguments are used to initialize data attributes with the same names.
-
class
Status(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
SubscribedLibrary.ProbeResult.Statusclass defines the error status constants for the probe 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.
-
CERTIFICATE_ERROR= Status(string='CERTIFICATE_ERROR')¶ Indicates that the provided server certificate thumbprint in
com.vmware.content.library_client.SubscriptionInfo.ssl_thumbprintis invalid. In this case, the returned null should be set incom.vmware.content.library_client.SubscriptionInfo.ssl_thumbprint.
-
HOST_NOT_FOUND= Status(string='HOST_NOT_FOUND')¶ Indicates that the host in the URL could not be found.
-
INVALID_CREDENTIALS= Status(string='INVALID_CREDENTIALS')¶ Indicates that the connection was rejected due to invalid credentials.
-
INVALID_URL= Status(string='INVALID_URL')¶ Indicates that the supplied URL was not valid.
-
RESOURCE_NOT_FOUND= Status(string='RESOURCE_NOT_FOUND')¶ Indicates that the given resource at the URL was not found.
-
SUCCESS= Status(string='SUCCESS')¶ Indicates that the probe was successful.
-
TIMED_OUT= Status(string='TIMED_OUT')¶ Indicates that the probe timed out while attempting to connect to the URL.
-
UNKNOWN_ERROR= Status(string='UNKNOWN_ERROR')¶ Indicates an unspecified error different from the other error cases defined in
SubscribedLibrary.ProbeResult.Status.
-
-
class
-
create(create_spec, client_token=None)¶ Creates a new subscribed library.
Once created, the subscribed library will be empty. If the
LibraryModel.subscription_infoproperty is set, the Content Library Service will attempt to synchronize to the remote source. This is an asynchronous operation so the content of the published library may not immediately appear.Parameters: - client_token (
strorNone) – Unique token generated on the client for each creation request. The token should be a universally unique identifier (UUID), for example:b8a2a2e3-2314-43cd-a871-6ede0f429751. This token can be used to guarantee idempotent creation. If not specified creation is not idempotent. - create_spec (
LibraryModel) – Specification for the new subscribed library.
Return type: strReturns: Identifier of the newly created subscribed library. The return value will be an identifier for the resource type:
com.vmware.content.Library.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif thecreate_specis not valid.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif theclient_tokendoes not conform to the UUID format.Raise: com.vmware.vapi.std.errors_client.Unsupportedif using multiple storage backings.Raise: com.vmware.vapi.std.errors_client.ResourceInaccessibleif subscribing to a published library which cannot be accessed.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- Method execution requires
ContentLibrary.CreateSubscribedLibrary.
- client_token (
-
delete(library_id)¶ Deletes the specified subscribed library.
Deleting a subscribed library will remove the entry immediately and begin an asynchronous task to remove all cached content for the library. If the asynchronous task fails, file content may remain on the storage backing. This content will require manual removal.
Parameters: library_id (
str) – Identifier of the subscribed library to delete. The parameter must be an identifier for the resource type:com.vmware.content.Library.Raise: com.vmware.vapi.std.errors_client.InvalidElementTypeif the library referenced bylibrary_idis not a subscribed library.Raise: com.vmware.vapi.std.errors_client.NotFoundif the library referenced bylibrary_iddoes not exist.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource
com.vmware.content.Libraryreferenced by the parameterlibrary_idrequiresContentLibrary.DeleteSubscribedLibrary.
- The resource
-
evict(library_id)¶ Evicts the cached content of an on-demand subscribed library.
This method allows the cached content of a subscribed library to be removed to free up storage capacity. This method will only work when a subscribed library is synchronized on-demand.
Parameters: library_id (
str) – Identifier of the subscribed library whose content should be evicted. The parameter must be an identifier for the resource type:com.vmware.content.Library.Raise: com.vmware.vapi.std.errors_client.NotFoundif the library specified bylibrary_iddoes not exist.Raise: com.vmware.vapi.std.errors_client.InvalidElementTypeif the library specified bylibrary_idis not a subscribed library.Raise: com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the library specified bylibrary_iddoes not synchronize on-demand, or if the content of the library specified bylibrary_idhas been deleted from the storage backings (seeLibraryModel.storage_backings) associated with it.For instance, this {\@term error) is reported on evicting an on-demand subscribed library that was restored from backup, and the library was deleted after the backup was taken, thus resulting in its content being deleted from the associated storage backings. In this scenario, the metadata of the library is present on a restore, while its content has been deleted.
Raise: com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource
com.vmware.content.Libraryreferenced by the parameterlibrary_idrequiresContentLibrary.EvictSubscribedLibrary.
- The resource
-
get(library_id)¶ Returns a given subscribed library.
Parameters: library_id (
str) – Identifier of the subscribed library to return. The parameter must be an identifier for the resource type:com.vmware.content.Library.Return type: Returns: The
LibraryModelinstance that corresponds tolibrary_id.Raise: com.vmware.vapi.std.errors_client.NotFoundif the library associated withlibrary_iddoes not exist.Raise: com.vmware.vapi.std.errors_client.InvalidElementTypeif the library associated withlibrary_idis not a subscribed library.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource
com.vmware.content.Libraryreferenced by the parameterlibrary_idrequiresSystem.Read.
- The resource
-
list()¶ Returns the identifiers of all subscribed libraries in the Content Library.
Return type: listofstrReturns: The
listof identifiers of all subscribed libraries in the Content Library. The return value will contain identifiers for the resource type:com.vmware.content.Library.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- Method execution requires
System.Read.
- Method execution requires
-
probe(subscription_info)¶ Probes remote library subscription information, including URL, SSL certificate and password. The resulting
SubscribedLibrary.ProbeResultclass describes whether or not the subscription configuration is successful.Parameters: subscription_info (
com.vmware.content.library_client.SubscriptionInfo) – The subscription info to be probed.Return type: Returns: The subscription info probe result.
Raise: com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- Method execution requires
ContentLibrary.ProbeSubscription.
- Method execution requires
-
sync(library_id)¶ Forces the synchronization of the subscribed library.
Synchronizing a subscribed library forcefully with this method will perform the same synchronization behavior as would run periodically for the library. The
com.vmware.content.library_client.SubscriptionInfo.on_demandsetting is respected. Calling this method on a library that is already in the process of synchronizing will have no effect.Parameters: library_id (
str) – Identifier of the subscribed library to synchronize. The parameter must be an identifier for the resource type:com.vmware.content.Library.Raise: com.vmware.vapi.std.errors_client.NotFoundif the library specified bylibrary_iddoes not exist.Raise: com.vmware.vapi.std.errors_client.InvalidElementTypeif the library specified bylibrary_idis not a subscribed library.Raise: com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the content of the library specified bylibrary_idhas been deleted from the storage backings (seeLibraryModel.storage_backings) associated with it.For instance, this {\@term error) is reported on synchronizing a subscribed library that was restored from backup, and the library was deleted after the backup was taken, thus resulting in its content being deleted from the associated storage backings. In this scenario, the metadata of the library is present on a restore, while its content has been deleted.
Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif some parameter in the subscribed library subscription info is invalid.Raise: com.vmware.vapi.std.errors_client.ResourceInaccessibleif the published library cannot be contacted or found.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource
com.vmware.content.Libraryreferenced by the parameterlibrary_idrequiresContentLibrary.SyncLibrary.
- The resource
-
update(library_id, update_spec)¶ Updates the properties of a subscribed library.
This is an incremental update to the subscribed library. Attributes that are None in the update specification will be left unchanged.
Parameters: - library_id (
str) – Identifier of the subscribed library to update. The parameter must be an identifier for the resource type:com.vmware.content.Library. - update_spec (
LibraryModel) – Specification of the new property values to set on the subscribed library.
Raise: com.vmware.vapi.std.errors_client.NotFoundif the library specified bylibrary_iddoes not exist.Raise: com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif theupdate_specupdates the subscription URL (seecom.vmware.content.library_client.SubscriptionInfo.subscription_url) and the content of the library specified bylibrary_idhas been deleted from the storage backings (seeLibraryModel.storage_backings) associated with it.Raise: com.vmware.vapi.std.errors_client.InvalidElementTypeif the library specified bylibrary_idis not a subscribed library.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif theupdate_specis not valid.Raise: com.vmware.vapi.std.errors_client.ResourceInaccessibleif the subscription info is being updated but the published library cannot be contacted or found.Raise: com.vmware.vapi.std.errors_client.ResourceBusyif theLibraryModel.versionofupdate_specis None and the library is being concurrently updated by another user.Raise: com.vmware.vapi.std.errors_client.ConcurrentChangeif theLibraryModel.versionofupdate_specis not equal to the current version of the library.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource
com.vmware.content.Libraryreferenced by the parameterlibrary_idrequiresContentLibrary.UpdateSubscribedLibrary.
- library_id (
-
class
-
class
com.vmware.content_client.Type(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Typeclass exposes thecom.vmware.content.library_client.ItemModeltypes that this Content Library Service supports.A library item has an optional type which can be specified with the
com.vmware.content.library_client.ItemModel.typeattribute. For items with a type that is supported by a plugin, the Content Library Service may understand the files which are part of the library item and can produce metadata for the item.In other cases, uploads may require a process in which one upload implies subsequent uploads. For example, an Open Virtualization Format (OVF) package is composed of an OVF descriptor file and the associated virtual disk files. Uploading an OVF descriptor can enable the Content Library Service to understand that the complete OVF package requires additional disk files, and it can set up the transfers for the disks automatically by adding the file entries for the disks when the OVF descriptor is uploaded.
When a type is not supported by a plugin, or the type is not specified, the Content Library Service can handle a library item in a default way, without adding metadata to the item or guiding the upload process.
-
class
Info(description=None, name=None, type=None, vendor=None, version=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Type.Infoclass describes support for a specific type of data in ancom.vmware.content.library_client.ItemModel. TheType.Infocan be queried through theTypeclass. Type support describes plugins in the Content Library which can provide metadata on library items and help manage the transfer process by adding dependent files when a current file is added.Tip
The arguments are used to initialize data attributes with the same names.
-
list()¶ Returns a
listofType.Infoinstances which describe the type support plugins in this Content Library.Return type: Returns: The
listofType.Infoinstances which describe the type support plugins in this Content Library.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- Method execution requires
ContentLibrary.TypeIntrospection.
- Method execution requires
-
class
com.vmware.vcenter_client module¶
The com.vmware.vcenter_client module provides classes for managing VMware
vSphere environments. The module is available starting in vSphere 6.5.
-
class
com.vmware.vcenter_client.Cluster(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Clusterclass provides methods to manage clusters in the vCenter Server.-
class
FilterSpec(clusters=None, names=None, folders=None, datacenters=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Cluster.FilterSpecclass contains attributes used to filter the results when listing clusters (seeCluster.list()). If multiple attributes are specified, only clusters matching all of the attributes match the filter.Tip
The arguments are used to initialize data attributes with the same names.
-
class
Info(name=None, resource_pool=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Cluster.Infoclass contains information about a cluster in vCenter Server.Tip
The arguments are used to initialize data attributes with the same names.
-
RESOURCE_TYPE= 'ClusterComputeResource'¶ The resource type for the vCenter Cluster
-
class
Summary(cluster=None, name=None, ha_enabled=None, drs_enabled=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Cluster.Summaryclass contains commonly used information about a cluster in vCenter Server.Tip
The arguments are used to initialize data attributes with the same names.
-
get(cluster)¶ Retrieves information about the cluster corresponding to
cluster.Parameters: cluster ( str) – Identifier of the cluster. The parameter must be an identifier for the resource type:ClusterComputeResource.Return type: Cluster.InfoReturns: The Cluster.Infoinstances that corresponds to thecluster.Raise: com.vmware.vapi.std.errors_client.NotFoundif there is no cluster associated withclusterin the system.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the session id is missing from the request or the corresponding session object cannot be found.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t not have the required privileges.
-
list(filter=None)¶ Returns information about at most 1000 visible (subject to permission checks) clusters in vCenter matching the
Cluster.FilterSpec.Parameters: filter ( Cluster.FilterSpecorNone) – Specification of matching clusters for which information should be returned. If None, the behavior is equivalent to aCluster.FilterSpecwith all attributes None which means all clusters match the filter.Return type: listofCluster.SummaryReturns: Commonly used information about the clusters matching the Cluster.FilterSpec.Raise: com.vmware.vapi.std.errors_client.UnableToAllocateResourceif more than 1000 clusters match theCluster.FilterSpec.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
-
class
-
class
com.vmware.vcenter_client.Datacenter(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Datacenterclass provides methods to manage datacenters in the vCenter Server.-
class
CreateSpec(name=None, folder=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Datacenter.CreateSpecclass defines the information used to create a datacenter.Tip
The arguments are used to initialize data attributes with the same names.
-
class
FilterSpec(datacenters=None, names=None, folders=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Datacenter.FilterSpecclass contains attributes used to filter the results when listing datacenters (seeDatacenter.list()). If multiple attributes are specified, only datacenters matching all of the attributes match the filter.Tip
The arguments are used to initialize data attributes with the same names.
-
class
Info(name=None, datastore_folder=None, host_folder=None, network_folder=None, vm_folder=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Datacenter.Infoclass contains information about a datacenter in vCenter Server.Tip
The arguments are used to initialize data attributes with the same names.
-
RESOURCE_TYPE= 'Datacenter'¶ The resource type for the vCenter Datacenter
-
class
Summary(datacenter=None, name=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Datacenter.Summaryclass contains commonly used information about a datacenter in vCenter Server.Tip
The arguments are used to initialize data attributes with the same names.
-
create(spec)¶ Create a new datacenter in the vCenter inventory
Parameters: spec ( Datacenter.CreateSpec) – Specification for the new datacenter to be created.Return type: strReturns: The identifier of the newly created datacenter The return value will be an identifier for the resource type: Datacenter.Raise: com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.Raise: com.vmware.vapi.std.errors_client.AlreadyExistsif the datacenter with the same name is already present.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif the datacenter name is empty or invalid as per the underlying implementation.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif the folder is not specified and the system cannot choose a suitable one.Raise: com.vmware.vapi.std.errors_client.NotFoundif the datacenter folder cannot be found.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
-
delete(datacenter, force=None)¶ Delete an empty datacenter from the vCenter Server
Parameters: - datacenter (
str) – Identifier of the datacenter to be deleted. The parameter must be an identifier for the resource type:Datacenter. - force (
boolorNone) – If true, delete the datacenter even if it is not empty. If None acom.vmware.vapi.std.errors_client.ResourceInUseexception will be reported if the datacenter is not empty. This is the equivalent of passing the value false.
Raise: com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.Raise: com.vmware.vapi.std.errors_client.NotFoundif there is no datacenter associated withdatacenterin the system.Raise: com.vmware.vapi.std.errors_client.ResourceInUseif the datacenter associated withdatacenteris not empty.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.- datacenter (
-
get(datacenter)¶ Retrieves information about the datacenter corresponding to
datacenter.Parameters: datacenter ( str) – Identifier of the datacenter. The parameter must be an identifier for the resource type:Datacenter.Return type: Datacenter.InfoReturns: The Datacenter.Infoinstances that corresponds to thedatacenter.Raise: com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.Raise: com.vmware.vapi.std.errors_client.NotFoundif there is no datacenter associated withdatacenterin the system.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
-
list(filter=None)¶ Returns information about at most 1000 visible (subject to permission checks) datacenters in vCenter matching the
Datacenter.FilterSpec.Parameters: filter ( Datacenter.FilterSpecorNone) – Specification of matching datacenters for which information should be returned. If None, the behavior is equivalent to aDatacenter.FilterSpecwith all attributes None which means all datacenters match the filter.Return type: listofDatacenter.SummaryReturns: Commonly used information about the datacenters matching the Datacenter.FilterSpec.Raise: com.vmware.vapi.std.errors_client.UnableToAllocateResourceif more than 1000 datacenters match theDatacenter.FilterSpec.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
-
class
-
class
com.vmware.vcenter_client.Datastore(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe Datastore class provides methods for manipulating a datastore.
-
class
FilterSpec(datastores=None, names=None, types=None, folders=None, datacenters=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Datastore.FilterSpecclass contains attributes used to filter the results when listing datastores (seeDatastore.list()). If multiple attributes are specified, only datastores matching all of the attributes match the filter.Tip
The arguments are used to initialize data attributes with the same names.
-
class
Info(name=None, type=None, accessible=None, free_space=None, multiple_host_access=None, thin_provisioning_supported=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Datastore.Infoclass contains information about a datastore.Tip
The arguments are used to initialize data attributes with the same names.
-
RESOURCE_TYPE= 'Datastore'¶ The resource type for the vCenter datastore
-
class
Summary(datastore=None, name=None, type=None, free_space=None, capacity=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Datastore.Summaryclass contains commonly used information about a datastore.Tip
The arguments are used to initialize data attributes with the same names.
-
class
Type(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
Datastore.Typeclass defines the supported types of vCenter datastores.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.
-
CIFS= Type(string='CIFS')¶ Common Internet File System.
-
NFS= Type(string='NFS')¶ Network file system v3 (linux & esx servers only).
-
NFS41= Type(string='NFS41')¶ Network file system v4.1 (linux & esx servers only).
-
VFFS= Type(string='VFFS')¶ Flash Read Cache (ESX Server only).
-
VMFS= Type(string='VMFS')¶ VMware File System (ESX Server only).
-
VSAN= Type(string='VSAN')¶ Virtual SAN (ESX Server only).
-
VVOL= Type(string='VVOL')¶ vSphere Virtual Volume (ESX Server only).
-
-
get(datastore)¶ Retrieves information about the datastore indicated by
datastore.Parameters: datastore ( str) – Identifier of the datastore for which information should be retrieved. The parameter must be an identifier for the resource type:Datastore.Return type: Datastore.InfoReturns: information about the datastore. Raise: com.vmware.vapi.std.errors_client.NotFoundif the datastore indicated bydatastoredoes not exist.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
-
list(filter=None)¶ Returns information about at most 1000 visible (subject to permission checks) datastores in vCenter matching the
Datastore.FilterSpec.Parameters: filter ( Datastore.FilterSpecorNone) – Specification of matching datastores for which information should be returned. If None, the behavior is equivalent to aDatastore.FilterSpecwith all attributes None which means all datastores match the filter.Return type: listofDatastore.SummaryReturns: Commonly used information about the datastores matching the Datastore.FilterSpec.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif theDatastore.FilterSpec.typesattribute contains a value that is not supported by the server.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif theDatastore.FilterSpec.typesattribute contains a value that is not supported by the server.Raise: com.vmware.vapi.std.errors_client.UnableToAllocateResourceif more than 1000 datastores match theDatastore.FilterSpec.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
-
class
-
class
com.vmware.vcenter_client.Deployment(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Deploymentclass provides methods to get the status of the vCenter appliance deployment. This class was added in vSphere API 6.7-
class
Info(state=None, progress=None, subtask_order=None, subtasks=None, description=None, service=None, operation=None, parent=None, target=None, status=None, cancelable=None, error=None, start_time=None, end_time=None, user=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Deployment.Infoclass contains attributes to describe the state of the appliance. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
class
Task(progress=None, result=None, description=None, service=None, operation=None, parent=None, target=None, status=None, cancelable=None, error=None, start_time=None, end_time=None, user=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Deployment.Taskclass contains attributes to describe a particular deployment task. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
get()¶ Get the current status of the appliance deployment. This method was added in vSphere API 6.7
Return type: Deployment.InfoReturns: Info structure containing the status information about the appliance. Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the caller is not authenticated.Raise: com.vmware.vapi.std.errors_client.NotFoundif appliance state cannot be determined.
-
rollback()¶ Rollback a failed appliance so it can be configured once again. This method was added in vSphere API 6.7
Raise: com.vmware.vapi.std.errors_client.Unsupportedif the appliance is not in FAILED state.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the caller is not authenticated.
-
class
-
class
com.vmware.vcenter_client.Folder(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe Folder class provides methods for manipulating a vCenter Server folder.
-
class
FilterSpec(folders=None, names=None, type=None, parent_folders=None, datacenters=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Folder.FilterSpecclass contains attributes used to filter the results when listing folders (seeFolder.list()). If multiple attributes are specified, only folders matching all of the attributes match the filter.Tip
The arguments are used to initialize data attributes with the same names.
-
RESOURCE_TYPE= 'Folder'¶ The resource type for the vCenter folder
-
class
Summary(folder=None, name=None, type=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Folder.Summaryclass contains commonly used information about a folder.Tip
The arguments are used to initialize data attributes with the same names.
-
class
Type(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
Folder.Typeclass defines the type of a vCenter Server folder. The type of a folder determines what what kinds of children can be contained in the folder.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.
-
DATACENTER= Type(string='DATACENTER')¶ A folder that can contain datacenters.
-
DATASTORE= Type(string='DATASTORE')¶ A folder that can contain datastores.
-
HOST= Type(string='HOST')¶ A folder that can contain compute resources (hosts and clusters).
-
NETWORK= Type(string='NETWORK')¶ A folder that can contain networkds.
-
VIRTUAL_MACHINE= Type(string='VIRTUAL_MACHINE')¶ A folder that can contain virtual machines.
-
-
list(filter=None)¶ Returns information about at most 1000 visible (subject to permission checks) folders in vCenter matching the
Folder.FilterSpec.Parameters: filter ( Folder.FilterSpecorNone) – Specification of matching folders for which information should be returned. If None, the behavior is equivalent to aFolder.FilterSpecwith all attributes None which means all folders match the filter.Return type: listofFolder.SummaryReturns: Commonly used information about the folders matching the Folder.FilterSpec.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif theFolder.FilterSpec.typeattribute contains a value that is not supported by the server.Raise: com.vmware.vapi.std.errors_client.UnableToAllocateResourceif more than 1000 folders match theFolder.FilterSpec.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
-
class
-
class
com.vmware.vcenter_client.Host(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Hostclass provides methods to manage hosts in the vCenter Server.-
class
ConnectionState(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
Host.ConnectionStateclass defines the connection status of a host.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.
-
CONNECTED= ConnectionState(string='CONNECTED')¶ Host is connected to the vCenter Server
-
DISCONNECTED= ConnectionState(string='DISCONNECTED')¶ Host is disconnected from the vCenter Server
-
NOT_RESPONDING= ConnectionState(string='NOT_RESPONDING')¶ VirtualCenter is not receiving heartbeats from the server. The state automatically changes to connected once heartbeats are received again.
-
-
class
CreateSpec(hostname=None, port=None, user_name=None, password=None, folder=None, thumbprint_verification=None, thumbprint=None, force_add=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Host.CreateSpecclass defines the information used to create a host.Tip
The arguments are used to initialize data attributes with the same names.
-
class
ThumbprintVerification(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
Host.CreateSpec.ThumbprintVerificationclass defines the thumbprint verification schemes for a host’s SSL certificate.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.
-
NONE= ThumbprintVerification(string='NONE')¶ Accept the host’s thumbprint without verifying it.
-
THUMBPRINT= ThumbprintVerification(string='THUMBPRINT')¶ Host’s SSL certificate verified by checking its thumbprint against the specified thumbprint.
-
-
class
-
class
FilterSpec(hosts=None, names=None, folders=None, datacenters=None, standalone=None, clusters=None, connection_states=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Host.FilterSpecclass contains attributes used to filter the results when listing hosts (seeHost.list()). If multiple attributes are specified, only hosts matching all of the attributes match the filter.Tip
The arguments are used to initialize data attributes with the same names.
-
class
PowerState(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
Host.PowerStateclass defines the power states of a host.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.
-
POWERED_OFF= PowerState(string='POWERED_OFF')¶ The host was specifically powered off by the user through vCenter server. This state is not a cetain state, because after vCenter server issues the command to power off the host, the host might crash, or kill all the processes but fail to power off.
-
POWERED_ON= PowerState(string='POWERED_ON')¶ The host is powered on. A host that is entering standby mode is also in this state.
-
STANDBY= PowerState(string='STANDBY')¶ The host was specifically put in standby mode, either explicitly by the user, or automatically by DPM. This state is not a cetain state, because after VirtualCenter issues the command to put the host in standby state, the host might crash, or kill all the processes but fail to enter standby mode. A host that is exiting standby mode is also in this state.
-
-
RESOURCE_TYPE= 'HostSystem'¶ The resource type for the vCenter Host.
-
class
Summary(host=None, name=None, connection_state=None, power_state=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Host.Summaryclass contains commonly used information about a host in vCenter Server.Tip
The arguments are used to initialize data attributes with the same names.
-
connect(host)¶ Connect to the host corresponding to
hostpreviously added to the vCenter server.Parameters: host ( str) – Identifier of the host to be reconnected. The parameter must be an identifier for the resource type:HostSystem.Raise: com.vmware.vapi.std.errors_client.AlreadyInDesiredStateif the host associated withhostis already connected.Raise: com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.Raise: com.vmware.vapi.std.errors_client.NotFoundif there is no host associated withhostin the system.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
-
create(spec)¶ Add a new standalone host in the vCenter inventory. The newly connected host will be in connected state. The vCenter Server will verify the SSL certificate before adding the host to its inventory. In the case where the SSL certificate cannot be verified because the Certificate Authority is not recognized or the certificate is self signed, the vCenter Server will fall back to thumbprint verification mode as defined by
Host.CreateSpec.ThumbprintVerification.Parameters: spec ( Host.CreateSpec) – Specification for the new host to be created.Return type: strReturns: The newly created identifier of the host in vCenter. The return value will be an identifier for the resource type: HostSystem.Raise: com.vmware.vapi.std.errors_client.AlreadyExistsif the host with the same name is already present.Raise: com.vmware.vapi.std.errors_client.Errorif installation of VirtualCenter agent on a host fails.Raise: com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif the host name is invalid.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif the host folder is invalid.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif the SSL thumbprint specified is invalid.Raise: com.vmware.vapi.std.errors_client.InvalidElementTypeif the host folder id does not support vSphere compute resource as its children type.Raise: com.vmware.vapi.std.errors_client.NotFoundif there is no folder associated with thefolderattribute in the system.Raise: com.vmware.vapi.std.errors_client.ResourceInUseif the host is already being managed by another vCenter ServerRaise: com.vmware.vapi.std.errors_client.UnableToAllocateResourceif there are not enough licenses to add the host.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user name or password for the administration account on the host are invalid.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.Raise: com.vmware.vapi.std.errors_client.Unsupportedif the software version on the host is not supported.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
-
delete(host)¶ Remove a standalone host from the vCenter Server.
Parameters: host ( str) – Identifier of the host to be deleted. The parameter must be an identifier for the resource type:HostSystem.Raise: com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.Raise: com.vmware.vapi.std.errors_client.NotFoundif there is no host associated withhostin the system.Raise: com.vmware.vapi.std.errors_client.ResourceInUseif the host associated withhostis in a vCenter clusterRaise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
-
disconnect(host)¶ Disconnect the host corresponding to
hostfrom the vCenter serverParameters: host ( str) – Identifier of the host to be disconnected. The parameter must be an identifier for the resource type:HostSystem.Raise: com.vmware.vapi.std.errors_client.AlreadyInDesiredStateif the host associated withhostis already disconnected.Raise: com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.Raise: com.vmware.vapi.std.errors_client.NotFoundif there is no host associated withhostin the system.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
-
list(filter=None)¶ Returns information about at most 1000 visible (subject to permission checks) hosts in vCenter matching the
Host.FilterSpec.Parameters: filter ( Host.FilterSpecorNone) – Specification of matching hosts for which information should be returned. If None, the behavior is equivalent to aHost.FilterSpecwith all attributes None which means all hosts match the filter.Return type: listofHost.SummaryReturns: Commonly used information about the hosts matching the Host.FilterSpec.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif theHost.FilterSpec.connection_statesattribute contains a value that is not supported by the server.Raise: com.vmware.vapi.std.errors_client.UnableToAllocateResourceif more than 1000 hosts match theHost.FilterSpec.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
-
class
-
class
com.vmware.vcenter_client.Network(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe Network class provides methods for manipulating a vCenter Server network.
-
class
FilterSpec(networks=None, names=None, types=None, folders=None, datacenters=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Network.FilterSpecclass contains attributes used to filter the results when listing networks (seeNetwork.list()). If multiple attributes are specified, only networks matching all of the attributes match the filter.Tip
The arguments are used to initialize data attributes with the same names.
-
RESOURCE_TYPE= 'Network'¶ The resource type for the vCenter network
-
class
Summary(network=None, name=None, type=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Network.Summaryclass contains commonly used information about a network.Tip
The arguments are used to initialize data attributes with the same names.
-
class
Type(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
Network.Typeclass defines the type of a vCenter Server network. The type of a network can be used to determine what features it supports and which APIs can be used to find more information about the network or change its configuration.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.
-
DISTRIBUTED_PORTGROUP= Type(string='DISTRIBUTED_PORTGROUP')¶ XXX: vCenter based (create and managed through vCenter)
-
OPAQUE_NETWORK= Type(string='OPAQUE_NETWORK')¶ A network for whose configuration is managed outside of vSphere. The identifer and name of the network is made available through vSphere so that host and virtual machine virtual ethernet devices can connect to them.
-
STANDARD_PORTGROUP= Type(string='STANDARD_PORTGROUP')¶ XXX: ESX based (created and managed on ESX)
-
-
list(filter=None)¶ Returns information about at most 1000 visible (subject to permission checks) networks in vCenter matching the
Network.FilterSpec.Parameters: filter ( Network.FilterSpecorNone) – Specification of matching networks for which information should be returned. If None, the behavior is equivalent to aNetwork.FilterSpecwith all attributes None which means all networks match the filter.Return type: listofNetwork.SummaryReturns: Commonly used information about the networks matching the Network.FilterSpec.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif theNetwork.FilterSpec.typesattribute contains a value that is not supported by the server.Raise: com.vmware.vapi.std.errors_client.UnableToAllocateResourceif more than 1000 networks match theNetwork.FilterSpec.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
-
class
-
class
com.vmware.vcenter_client.ResourcePool(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe ResourcePool class provides methods for manipulating a vCenter Server resource pool.
This class does not include virtual appliances in the inventory of resource pools even though part of the behavior of a virtual appliance is to act like a resource pool.
-
class
FilterSpec(resource_pools=None, names=None, parent_resource_pools=None, datacenters=None, hosts=None, clusters=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
ResourcePool.FilterSpecclass contains attributes used to filter the results when listing resource pools (seeResourcePool.list()). If multiple attributes are specified, only resource pools matching all of the attributes match the filter.Tip
The arguments are used to initialize data attributes with the same names.
-
class
Info(name=None, resource_pools=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
ResourcePool.Infoclass contains information about a resource pool.Tip
The arguments are used to initialize data attributes with the same names.
-
RESOURCE_TYPE= 'ResourcePool'¶ The resource type for the vCenter resource pool
-
class
Summary(resource_pool=None, name=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
ResourcePool.Summaryclass contains commonly used information about a resource pool in vCenter Server.Tip
The arguments are used to initialize data attributes with the same names.
-
get(resource_pool)¶ Retrieves information about the resource pool indicated by
resource_pool.Parameters: resource_pool ( str) – Identifier of the resource pool for which information should be retrieved. The parameter must be an identifier for the resource type:ResourcePool.Return type: ResourcePool.InfoReturns: information about the resource pool. Raise: com.vmware.vapi.std.errors_client.NotFoundif the resource pool indicated byresource_pooldoes not exist.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
-
list(filter=None)¶ Returns information about at most 1000 visible (subject to permission checks) resource pools in vCenter matching the
ResourcePool.FilterSpec.Parameters: filter ( ResourcePool.FilterSpecorNone) – Specification of matching resource pools for which information should be returned. If None, the behavior is equivalent to aResourcePool.FilterSpecwith all attributes None which means all resource pools match the filter.Return type: listofResourcePool.SummaryReturns: Commonly used information about the resource pools matching the ResourcePool.FilterSpec.Raise: com.vmware.vapi.std.errors_client.UnableToAllocateResourceif more than 1000 resource pools match theResourcePool.FilterSpec.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
-
class
-
class
com.vmware.vcenter_client.StubFactory(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
-
class
com.vmware.vcenter_client.VM(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
VMclass provides methods for managing the lifecycle of a virtual machine.-
class
CreateSpec(guest_os=None, name=None, placement=None, hardware_version=None, boot=None, boot_devices=None, cpu=None, memory=None, disks=None, nics=None, cdroms=None, floppies=None, parallel_ports=None, serial_ports=None, sata_adapters=None, scsi_adapters=None, storage_policy=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructDocument-based creation spec.
Tip
The arguments are used to initialize data attributes with the same names.
-
class
FilterSpec(vms=None, names=None, folders=None, datacenters=None, hosts=None, clusters=None, resource_pools=None, power_states=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
VM.FilterSpecclass contains attributes used to filter the results when listing virtual machines (seeVM.list()). If multiple attributes are specified, only virtual machines matching all of the attributes match the filter.Tip
The arguments are used to initialize data attributes with the same names.
-
class
Info(guest_os=None, name=None, power_state=None, hardware=None, boot=None, boot_devices=None, cpu=None, memory=None, disks=None, nics=None, cdroms=None, floppies=None, parallel_ports=None, serial_ports=None, sata_adapters=None, scsi_adapters=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructDocument-based info.
Tip
The arguments are used to initialize data attributes with the same names.
-
class
PlacementSpec(folder=None, resource_pool=None, host=None, cluster=None, datastore=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
VM.PlacementSpecclass contains information used to place a virtual machine onto resources within the vCenter inventory.Tip
The arguments are used to initialize data attributes with the same names.
-
class
StoragePolicySpec(policy=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
VM.StoragePolicySpecclass contains information about the storage policy to be associated with a virtual machine object. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
class
Summary(vm=None, name=None, power_state=None, cpu_count=None, memory_size_mib=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
VM.Summaryclass contains commonly used information about a virtual machine.Tip
The arguments are used to initialize data attributes with the same names.
-
create(spec)¶ Creates a virtual machine.
Parameters: spec ( VM.CreateSpec) – Virtual machine specification.Return type: strReturns: ID of newly-created virtual machine. The return value will be an identifier for the resource type: VirtualMachine.Raise: com.vmware.vapi.std.errors_client.AlreadyExistsif a virtual machine with the specified name already exists.Raise: com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif any of the specified parameters are invalid.Raise: com.vmware.vapi.std.errors_client.NotFoundif any of the resources specified in spec could not be foundRaise: com.vmware.vapi.std.errors_client.ResourceInaccessibleif a specified resource (eg. host) is not accessible.Raise: com.vmware.vapi.std.errors_client.ResourceInUseif any of the specified storage addresses (eg. IDE, SATA, SCSI) result in a storage address conflict.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.UnableToAllocateResourceif any of the resources needed to create the virtual machine could not be allocated.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.Raise: com.vmware.vapi.std.errors_client.UnsupportedifguestOSis not supported for the requested virtual hardware version and spec includes None attributes that default to guest-specific values.
-
delete(vm)¶ Deletes a virtual machine.
Parameters: vm ( str) – Virtual machine identifier. The parameter must be an identifier for the resource type:VirtualMachine.Raise: com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.Raise: com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is running (powered on).Raise: com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.Raise: com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.Raise: com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
-
get(vm)¶ Returns information about a virtual machine.
Parameters: vm ( str) – Virtual machine identifier. The parameter must be an identifier for the resource type:VirtualMachine.Return type: VM.InfoReturns: Information about the specified virtual machine. Raise: com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.Raise: com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.Raise: com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
-
list(filter=None)¶ Returns information about at most 1000 visible (subject to permission checks) virtual machines in vCenter matching the
VM.FilterSpec.Parameters: filter ( VM.FilterSpecorNone) – Specification of matching virtual machines for which information should be returned. If None, the behavior is equivalent to aVM.FilterSpecwith all attributes None which means all virtual machines match the filter.Return type: listofVM.SummaryReturns: Commonly used information about the virtual machines matching the VM.FilterSpec.Raise: com.vmware.vapi.std.errors_client.InvalidArgumentif theVM.FilterSpec.power_statesattribute contains a value that is not supported by the server.Raise: com.vmware.vapi.std.errors_client.UnableToAllocateResourceif more than 1000 virtual machines match theVM.FilterSpec.Raise: com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.Raise: com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.Raise: com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
-
class