def configure_registry_client():
 global _CLIENT_KWARGS, _CLIENT_HOST, _CLIENT_PORT, _METADATA_ENCRYPTION_KEY
 try:
  (host, port) = (CONF.registry_host, CONF.registry_port)
 except cfg.ConfigFileValueError:
  msg = _('Configuration option was not valid')
  LOG.error(msg)
  raise exception.BadRegistryConnectionConfiguration(msg)
 except IndexError:
  msg = _('Could not find required configuration option')
  LOG.error(msg)
  raise exception.BadRegistryConnectionConfiguration(msg)
 _CLIENT_HOST = host
 _CLIENT_PORT = port
 _METADATA_ENCRYPTION_KEY = CONF.metadata_encryption_key
 _CLIENT_KWARGS = {'use_ssl': (CONF.registry_client_protocol.lower() == 'https'), 'key_file': CONF.registry_client_key_file, 'cert_file': CONF.registry_client_cert_file, 'ca_file': CONF.registry_client_ca_file, 'insecure': CONF.registry_client_insecure, 'timeout': CONF.registry_client_timeout}

def configure_registry_client ( ) : global _CLIENT_KWARGS , _CLIENT_HOST , _CLIENT_PORT , _METADATA_ENCRYPTION_KEY try : ( host , port ) = ( CONF . registry_host , CONF . registry_port ) except cfg . ConfigFileValueError : msg = _ ( 'Configuration option was not valid' ) LOG . error ( msg ) raise exception . BadRegistryConnectionConfiguration ( msg ) except IndexError : msg = _ ( 'Could not find required configuration option' ) LOG . error ( msg ) raise exception . BadRegistryConnectionConfiguration ( msg ) _CLIENT_HOST = host _CLIENT_PORT = port _METADATA_ENCRYPTION_KEY = CONF . metadata_encryption_key _CLIENT_KWARGS = { 'use_ssl' : ( CONF . registry_client_protocol . lower ( ) == 'https' ) , 'key_file' : CONF . registry_client_key_file , 'cert_file' : CONF . registry_client_cert_file , 'ca_file' : CONF . registry_client_ca_file , 'insecure' : CONF . registry_client_insecure , 'timeout' : CONF . registry_client_timeout }
sets up a registry client for use in registry lookups .