original_docstring: Attempts to load Docker registry information.
  
      Args:
          duthost (SonicHost): The target device.
          creds (dict): Credentials used to access the docker registry.
  
      Raises:
          ValueError: If the registry information is missing from both the
              Ansible inventory and the registry file.
  
      Returns:
          DockerRegistryInfo: The registry information that was loaded.
      
docstring: Attempts to load Docker registry information.
docstring_tokens: Attempts to load Docker registry information .
code: def load_docker_registry_info(duthost, creds):
      """Attempts to load Docker registry information.
  
      Args:
          duthost (SonicHost): The target device.
          creds (dict): Credentials used to access the docker registry.
  
      Raises:
          ValueError: If the registry information is missing from both the
              Ansible inventory and the registry file.
  
      Returns:
          DockerRegistryInfo: The registry information that was loaded.
      """
      host = creds.get("docker_registry_host")
      username = creds.get("docker_registry_username")
      password = creds.get("docker_registry_password")
  
      if not host:
          error_message = ("Could not find hostname for docker registry; "
                           "please check that the `docker_registry_host` ansible variable is defined.")
          logger.error(error_message)
          raise ValueError(error_message)
  
      return DockerRegistryInfo(host, username, password)
code_tokens: def load_docker_registry_info ( duthost , creds ) : host = creds . get ( "docker_registry_host" ) username = creds . get ( "docker_registry_username" ) password = creds . get ( "docker_registry_password" ) if not host : error_message = ( "Could not find hostname for docker registry; " "please check that the `docker_registry_host` ansible variable is defined." ) logger . error ( error_message ) raise ValueError ( error_message ) return DockerRegistryInfo ( host , username , password )
short_docstring: Attempts to load Docker registry information.
short_docstring_tokens: Attempts to load Docker registry information .
comment: """Attempts to load Docker registry information.
  
      Args:
          duthost (SonicHost): The target device.
          creds (dict): Credentials used to access the docker registry.
  
      Raises:
          ValueError: If the registry information is missing from both the
              Ansible inventory and the registry file.
  
      Returns:
          DockerRegistryInfo: The registry information that was loaded.
      """