

def add_client(self, base_client_instance):
    'Add a new instance of :class:`BaseClient` descendant.\n\n        `self` will store a reference to `base_client_instance`.\n\n        Example:\n\n        >>> def test_clients():\n        ...     from keystoneclient.auth import keystone\n        ...     from openstack.common.apiclient import client\n        ...     auth = keystone.KeystoneAuthPlugin(\n        ...         username="user", password="pass", tenant_name="tenant",\n        ...         auth_url="http://auth:5000/v2.0")\n        ...     openstack_client = client.HTTPClient(auth)\n        ...     # create nova client\n        ...     from novaclient.v1_1 import client\n        ...     client.Client(openstack_client)\n        ...     # create keystone client\n        ...     from keystoneclient.v2_0 import client\n        ...     client.Client(openstack_client)\n        ...     # use them\n        ...     openstack_client.identity.tenants.list()\n        ...     openstack_client.compute.servers.list()\n        '
    service_type = base_client_instance.service_type
    if (service_type and (not hasattr(base_client_instance, service_type))):
        setattr(self, service_type, base_client_instance)

dataset/ETHPy150Open openstack-infra/python-storyboardclient/storyboardclient/openstack/common/apiclient/client.py HTTPClient.add_client/VarMisuse@28/340 `self`->`base_client_instance`