azure-keyvault/azure/keyvault/key_vault_client.py
def _create_client_impl(self, api_version):
        """
        Creates the client implementation corresponding to the specifeid api_version.
        :param api_version:
        :return:
        """
        if api_version == v7_0_VERSION:
            from azure.keyvault.v7_0 import KeyVaultClient as ImplClient
        elif api_version == v2016_10_01_VERSION:
            from azure.keyvault.v2016_10_01 import KeyVaultClient as ImplClient
        else:
            raise NotImplementedError("APIVersion {} is not available".format(api_version))

        impl = ImplClient(credentials=self._credentials)
        impl.config = self.config

        # if __enter__ has previously been called and the impl client has __enter__ defined we need to call it
        if self._entered and hasattr(impl, '__enter__'):
            impl.__enter__()

        self._client_impls[api_version] = impl
        return impl
def _create_client_impl(self, api_version):
        """
        Creates the client implementation corresponding to the specifeid api_version.
        :param api_version:
        :return:
        """
        if api_version == v7_0_VERSION:
            from azure.keyvault.v7_0 import KeyVaultClient as ImplClient
        elif api_version == v2016_10_01_VERSION:
            from azure.keyvault.v2016_10_01 import KeyVaultClient as ImplClient
        else:
            raise NotImplementedError("APIVersion {} is not available".format(api_version))

        impl = ImplClient(credentials=self._credentials)
        impl.config = self.config

        # if __enter__ has previously been called and the impl client has __enter__ defined we need to call it
        if self._entered and hasattr(impl, '__enter__'):
            impl.__enter__()

        self._client_impls[api_version] = impl
        return impl
def _create_client_impl ( self , api_version ) : if api_version == v7_0_VERSION : from azure . keyvault . v7_0 import KeyVaultClient as ImplClient elif api_version == v2016_10_01_VERSION : from azure . keyvault . v2016_10_01 import KeyVaultClient as ImplClient else : raise NotImplementedError ( "APIVersion {} is not available" . format ( api_version ) ) impl = ImplClient ( credentials = self . _credentials ) impl . config = self . config # if __enter__ has previously been called and the impl client has __enter__ defined we need to call it if self . _entered and hasattr ( impl , '__enter__' ) : impl . __enter__ ( ) self . _client_impls [ api_version ] = impl return impl
Creates the client implementation corresponding to the specifeid api_version.
        :param api_version:
        :return:
Creates the client implementation corresponding to the specifeid api_version . : param api_version : : return :