client Package

client Package

factories Module

StubConfiguration factory

class vmware.vapi.stdlib.client.factories.StubConfigurationFactory[source]

Bases: object

Factory class for creating stub configuration objects

static new_configuration(connector, *errorTypes)[source]

Return a stub configuration using the specified connection, with no registered errors.

@type connector: L{vmware.vapi.protocol.client.connector.Connector} @param connector: Connection to be used to talk to the remote

ApiProvider

@type error_types: C{list} of L{vmware.vapi.bindings.type.ErrorType} @param error_types: error types to be registered in the configuration

static new_runtime_configuration(connector, *errorTypes)[source]

Return a stub configuration using the specified connection, with the errors reported by the vAPI runtime registered.

@type connector: L{vmware.vapi.protocol.client.connector.Connector} @param connector: Connection to be used to talk to the remote

ApiProvider

@type error_types: C{list} of L{vmware.vapi.bindings.type.ErrorType} @param error_types: additional error types to be registered in the

configuration
static new_std_configuration(connector, *errorTypes)[source]

Return a stub configuration using the specified connection, with all the standard errors registered.

@type connector: L{vmware.vapi.protocol.client.connector.Connector} @param connector: Connection to be used to talk to the remote

ApiProvider

@type error_types: C{list} of L{vmware.vapi.bindings.type.ErrorType} @param error_types: additional error types to be registered in the

configuration

introspection Module

l10n Module

Helper classes for client side localization.

class vmware.vapi.stdlib.client.l10n.MessageLocalizer(bundle, formatter=<class 'vmware.vapi.l10n.formatter.StringFormatter'>)[source]

Bases: object

Helper class to localize vAPI LocalizableMessages.

Before initializating the MessageLocalizer, locale has to be explicitly set if the user wants a locale other than English (U.S.).

Typically, at the start of the application, the following two lines are required to set the locale.

import locale locale.setlocale(locale.LC_ALL,<locale_type>)

If the locale_type is empty string, locale is set to user’s default setting (typically specified in the LANG environment variable). Otherwise, the specified locale type has to be installed in the system.

Initialize MessageLocalizer

Parameters:
localize(msg)[source]

Localize a given LocalizableMessage.

Parameters:msg (com.vmware.vapi.std_client.LocalizableMessage) – LocalizableMessage
Return type:str
Returns:Localized string

Table Of Contents

Previous topic

stdlib Package

This Page