.. _yumrepoinfo_directive: yumrepoinfo_directive - translate Koji tags into YUM repository URLs ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. versionadded:: 0.4 Translate a Koji tag into a set of YUM repositories. This is useful when you want to work with YUM metadata for a specific Fedora repository, but you only know its Koji tag. Parameters ---------- .. raw:: html
parameter required description type default choices

arch

yes

list of architectures. In this list, all "meta architectures" like all, src and noarch are ignored, list of "real architectures" is expected there (e.g. x86_64 or i386).

list of str

    koji_tag

    yes

    name of the Koji tag, e.g. f20, f20-updates, f20-updates-testing, or rawhide.

    If the tag ends with -pending suffix, this suffix is stripped (because pending tags are not real repositories), and the resulting tag is used.

    str

      Return Values ------------- A dictionary of dictionaries. Main key is ``koji_tag`` with value of dictionary that contains ``arch`` as key and URL for the respective repository is its value. If the repository in question has some parent repositories (e.g. ``f20-updates`` is a child of ``f20``), all its parents names and their repository URLs are returned in the dictionary as well as additional keys. Example:: {'f20': {'x86_64': 'http://...', 'i386': 'http://...'}, 'f20-updates': {'x86_64': 'http://...', 'i386': 'http://...'}} Exceptions ---------- * :class:`.TaskotronDirectiveError`: if there are zero "real architectures" inside ``arch`` or when ``koji_tag`` is not found among known repositories. Examples -------- For a koji tag received from the command line, get a list of its YUM repositories and save it to a variable:: - name: get yum repos yumrepoinfo: koji_tag: ${koji_tag} arch: ${arch} export: yumrepos Now you can pass ``${yumrepos}`` dictionary to your python script and run your check:: - name: run my check python: file: my_check.py callable: run repos: ${yumrepos} arch: ${arch} export: my_check_output