StubConfiguration factory
Bases: object
Factory class for creating stub configuration objects
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
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
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
Helper classes for client side localization.
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 a given LocalizableMessage.
Parameters: | msg (com.vmware.vapi.std_client.LocalizableMessage) – LocalizableMessage |
---|---|
Return type: | str |
Returns: | Localized string |