### Navigation

- index
- modules |
- next |
- previous |
- vSphere Automation SDK for Python 6.5.0 documentation »
- vmware Package »
- vapi Package »
- protocol Package »

# client Package

## `client` Package

## `connector` Module

Connecter interface

class `vmware.vapi.protocol.client.connector.``Connector`

  Bases: `object`

  Connector interface

  Connector interface init

  `connect`()

    rpc provider connect

  `disconnect`()

    rpc provider disconnect

  `get_api_provider`()

    get api provider

    Return type: | `vmware.vapi.core.ApiProvider`
    Returns: | api provider

  `new_context`()

    create new execution context object

    Return type: | `vmware.vapi.core.ExecutionContext`
    Returns: | execution context

  `set_application_context`(ctx)

    Set the application context

    All the subsequent calls made using this connector will use this as the application context in the ExecutionContext

    Parameters: | ctx (`vmware.vapi.core.ApplicationContext`) – New application context

  `set_security_context`(ctx)

    Set the security context

    All the subsequent calls made using this connector will use this as the security context in the ExecutionContext

    Parameters: | ctx (`vmware.vapi.core.SecurityContext`) – New security context

## `local_connector` Module

Local connector

class `vmware.vapi.protocol.client.local_connector.``LocalConnector`(api_provider)

  Bases: `vmware.vapi.protocol.client.connector.Connector`

  Protocol connection class to get direct access to ApiProvider instead of going over the wire

  Initialize LocalConnector

  Parameters: | api_provider (`vmware.vapi.core.ApiProvider`) – ApiProvider instance to be used

  `connect`()

    Create a connection. No-op for LocalConnector

  `disconnect`()

    Disconnect from a connection. No-op for LocalConnector

  `get_api_provider`()

    Returns the ApiProvider instance backing this connection

    Return type: | `vmware.vapi.core.ApiProvider`
    Returns: | ApiProvider instance

  `new_context`()

    create new execution context object

    Return type: | `vmware.vapi.core.ExecutionContext`
    Returns: | execution context

  `set_application_context`(ctx)

    Set the application context

    All the subsequent calls made using this connector will use this as the application context in the ExecutionContext

    Parameters: | ctx (`vmware.vapi.core.ApplicationContext`) – New application context

  `set_security_context`(ctx)

    Set the security context

    All the subsequent calls made using this connector will use this as the security context in the ExecutionContext

    Parameters: | ctx (`vmware.vapi.core.SecurityContext`) – New security context

`vmware.vapi.protocol.client.local_connector.``get_local_connector`(api_provider)

  Creates and returns a local connection for the input ApiProvider

  Parameters: | api_provider (`vmware.vapi.core.ApiProvider`) – ApiProvider instance
  Return type: | `vmware.vapi.protocol.client.local_connector.LocalConnector`
  Returns: | Newly created protocol connection for the given ApiProvider

## Subpackages

- msg Package
  - `msg` Package
  - `connector_factory` Module
  - `generic_connector` Module
  - `json_connector` Module
- rpc Package
  - `rpc` Package
  - `http_provider` Module
  - `provider` Module
  - `provider_factory` Module
  - `requests_provider` Module

### Navigation

- index
- modules |
- next |
- previous |
- vSphere Automation SDK for Python 6.5.0 documentation »
- vmware Package »
- vapi Package »
- protocol Package »