Пример #1
0
def Client(api_version, *args, **kwargs):
    """Return an OCAS client.
    @param api_version: only 2.0 is supported now
    """
    rm_client = utils.get_client_class(
        API_NAME,
        api_version,
        API_VERSIONS,
    )
    return rm_client(*args, **kwargs)
Пример #2
0
def make_client(instance):
    """Returns OCAS client.
    """
    rm_client = utils.get_client_class(
        instance._app_name,
        instance._app_name,
        APP_CLASSES,
    )
    instance.initialize()
    url = instance._url
    #url = url.rstrip("/")
    client = rm_client()
    return client