← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1177956] Re: Verify registry's client parameters

 

Closing due the lack of response.

** Changed in: glance
       Status: Incomplete => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1177956

Title:
  Verify registry's client parameters

Status in OpenStack Image Registry and Delivery Service (Glance):
  Invalid

Bug description:
  Registry's client parameters are currently partially verified. It
  needs a stronger verification and perhaps move the duplicated code
  between v1 and 2 to a common place. For example:

  
  def configure_registry_client():
      """
      Sets up a registry client for use in registry lookups
      """
      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(reason=msg)
      except IndexError:
          msg = _("Could not find required configuration option")
          LOG.error(msg)
          raise exception.BadRegistryConnectionConfiguration(reason=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,
      }

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1177956/+subscriptions