def _child_units(self): """ Fetch the child 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)
def _parent_units(self): """ Fetch the list of units published by the parent nodes 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)