Example #1
0
 def _units_local(self):
     """
     Fetch the local units using the conduit.  The conduit will
     restrict this search to only those associated with the repository
     to which it is pre-configured.
     :return: A dictionary of units keyed by UnitKey.
     :rtype: dict
     """
     units = self.conduit.get_units()
     return unit_dictionary(units)
Example #2
0
 def _units_upstream(self):
     """
     Fetch the list of units published by the upstream citrus distributor.
     This is performed by reading the manifest at the URL defined in
     the configuration.
     :param repo_id: The repository ID.
     :type repo_id: str
     :return: A dictionary of units keyed by UnitKey.
     :rtype: dict
     """
     url = self.config.get("manifest_url")
     manifest = Manifest()
     units = manifest.read(url, self.downloader)
     return unit_dictionary(units)