def add_repo_section(context, parent_section): """ add a repo section to the docker section :type context: pulp.client.extensions.core.ClientContext :param parent_section: section of the CLI to which the repo section should be added :type parent_section: pulp.client.extensions.extensions.PulpCliSection """ repo_section = parent_section.create_subsection(SECTION_REPO, DESC_REPO) repo_section.add_command(CreateDockerRepositoryCommand(context)) repo_section.add_command(cudl.DeleteRepositoryCommand(context)) repo_section.add_command(UpdateDockerRepositoryCommand(context)) repo_section.add_command(ListDockerRepositoriesCommand(context)) repo_section.add_command(TagUpdateCommand(context)) add_search_section(context, repo_section) add_copy_section(context, repo_section) add_remove_section(context, repo_section) return repo_section
def setUp(self): self.context = mock.MagicMock() self.context.config = test_config self.command = TagUpdateCommand(self.context)