local variables for each of the keys in args to help readability.
Wrote tests for teuthology.run.main. Coverage increased to 94%
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
Made YamlConfig work more closely like a dictionary by extending
collections.MutableMapping. It still needs some work to be able to be
used interchangeably with a dict - most noteably with yaml.safe_dump.
Decided to just use a dict instead of JobConfig for args['<config>'].
Too many other codepaths are assuming that config is a dict.
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
This is a pretty massive refactor to make the code more testable as
well. The coverage on teuthology.run was increased from 0% to 86% and
the overall project coverage increased to 24%.
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
by run and schedule, nuke will need this eventually as well. The old
way of doing this was too tightly coupled with argparse. Wrote some
tests around the new function; increased coverage on misc by 4%.
Random lint fixes as well.
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
what an argparse Namespace looks like when teuthology.misc.read_config
is used on it. This allows us to refactor our commands to use docopt
but still all all the tasks to be passed one big namespace.
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
forgot to break from the loop. I guess I was mainly testing git
kernels and not distro when I did this before.
Signed-off-by: Sandon Van Ness <sandon@redhat.com>
Fixed a typo causing grub list to not incrament and other issues
with finding a reliable uname string via inspecting RPM directly.
Signed-off-by: Sandon Van Ness <sandon@redhat.com>
The codename can be reliably set by parsing
platform.linux_distribution() or lsb_release -a. We now default to
trying the former first.
Signed-off-by: Zack Cerza <zack@redhat.com>
Commit 293c2bd49c ("Be more informative if owner info is missing")
introduced --owner but it is still pulled from job_info no matter what.
Fix it.
Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
We don't need to install a new kernel if the "want" (version) commit
hash and the "have" (cur_sha1) commit hash match but the former is
shorter than the latter.
Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
Dump _get_relmap() and _RELEASE_MAP in favor of common code.
Also remove the repo management stuff; it was only used by the
now-obsolete calamari task.
Fixes: #10236
Signed-off-by: Dan Mick <dan.mick@redhat.com>
Calamari-server has been added to the list of installed packages
to be removed. Also added salt-common and salt-minion to the list
of rpms to be removed.
Fixes#10034
Signed-off-by: Warren Usui <warren.usui@inktank.com>
This should allow a more consistent experience between reading
Sphinx-generated HTML docs and just using GitHub's renderer.
Signed-off-by: Zack Cerza <zack@redhat.com>