Ejemplo n.º 1
0
def test_list_empty_roles_paths(galaxy_context):

    try:
        list_action.list_action(galaxy_context,
                                display_callback=display_callback)
    except exceptions.GalaxyError as e:
        log.debug(e, exc_info=True)
        raise
Ejemplo n.º 2
0
def test_list_no_content_dir(galaxy_context):
    galaxy_context.content_path = os.path.join(galaxy_context.content_path,
                                               'doesntexist')
    res = list_action.list_action(galaxy_context,
                                  display_callback=display_callback)

    # TODO: list should probably return non-zero if galaxy_context.content_path doesnt exist,
    #       but should probaly initially check that when creating galaxy_context
    assert res == 0
Ejemplo n.º 3
0
    def execute_list(self):
        """
        List repositories, roles, and collections installed on the local file system.
        """

        galaxy_context = self._get_galaxy_context(self.options, self.config)

        match_filter = matchers.MatchAll()

        list_content = self.options.list_content
        if self.args:
            match_filter = matchers.MatchNamespacesOrLabels(self.args)

        return list_action.list_action(galaxy_context,
                                       repository_match_filter=match_filter,
                                       list_content=list_content,
                                       display_callback=self.display)
Ejemplo n.º 4
0
    def execute_list(self):
        """
        List collections installed on the local file system.
        """

        galaxy_context = self._get_galaxy_context(self.options, self.config)

        match_filter = matchers.MatchAll()

        list_content = self.options.list_content
        if self.args:
            match_filter = matchers.MatchNamespacesOrLabels(self.args)

        return list_action.list_action(galaxy_context,
                                       repository_spec_match_filter=match_filter,
                                       list_content=list_content,
                                       lockfile_format=self.options.list_lockfile_format,
                                       lockfile_freeze=self.options.list_lockfile_freeze,
                                       fully_qualified=self.options.list_fully_qualified,
                                       display_callback=self.display)