From 23be307949169156795030b37e70a309b33717be Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Jan 09 2020 02:53:41 +0000 Subject: Fix some docstrings describing parameters Signed-off-by: Chenxiong Qi --- diff --git a/freshmaker/handlers/__init__.py b/freshmaker/handlers/__init__.py index 2cd25b6..c5a77d9 100644 --- a/freshmaker/handlers/__init__.py +++ b/freshmaker/handlers/__init__.py @@ -439,11 +439,15 @@ class ContainerBuildHandler(BaseHandler): """ Build a container in Koji. - :param str name: container name. - :param str branch: container branch. - :param str rev: revision. - :param str namespace: namespace of container in dist-git. By default, - it is container. + :param str scm_url: refer to ``KojiService.build_container``. + :param str branch: refer to ``KojiService.build_container``. + :param str target: refer to ``KojiService.build_container``. + :param list[str] repo_urls: refer to ``KojiService.build_container``. + :param bool isolated: refer to ``KojiService.build_container``. + :param str release: refer to ``KojiService.build_container``. + :param str koji_parent_build: refer to ``KojiService.build_container``. + :param str arch_override: refer to ``KojiService.build_container``. + :param list[int] compose_ids: refer to ``KojiService.build_container``. :return: task id returned from Koji buildContainer API. :rtype: int """ @@ -472,8 +476,10 @@ class ContainerBuildHandler(BaseHandler): Submits ArtifactBuild of 'image' type to Koji. :param build: ArtifactBuild of 'image' type. - :rtype: number + :param list[str] repo_urls: list of YUM repository URLs that will be + passed to the ``buildContainer`` eventually as a build option. :return: Koji build id. + :rtype: int """ if build.state != ArtifactBuildState.PLANNED.value: build.transition( diff --git a/freshmaker/kojiservice.py b/freshmaker/kojiservice.py index 94f61c0..8ddd412 100644 --- a/freshmaker/kojiservice.py +++ b/freshmaker/kojiservice.py @@ -141,7 +141,24 @@ class KojiService(object): scratch=None, repo_urls=None, isolated=False, release=None, koji_parent_build=None, arch_override=None, compose_ids=None): - """Build container by buildContainer""" + """Build container by buildContainer + + :param str source_url: the container repository URL. + :param str target: specify a specific build target. + :param str branch: a build option passed to ``buildContainer``. + :param bool scratch: a build option passed to ``buildContainer``. + :param list[str] repo_urls: a build option passed to ``buildContainer``. + :param bool isolated: a build option passed to ``buildContainer``. + :param str release: a build option passed to ``buildContainer``. + :param str koji_parent_build: a build option passed to ``buildContainer``. + :param str arch_override: a build option passed to ``buildContainer``. + :param list[str] compose_ids: a build option passed to ``buildContainer``. + For details of these build options, please refer to + ``PARAMS_SCHEMA`` defined inside ``BuildContainerTask`` in the + koji-containerbuild plugin. + :return: the container build task ID returned from ``buildContainer``. + :rtype: int + """ build_target = target build_opts = {