Fix update hang.

Don't check ssh keys of VM (attempting to update them) if we are
changing the state of the host (up/down) as there is a good chance
it will be down and will never return any keys.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
Added suggested comment.

Signed-off-by: Sandon Van Ness <sandon@redhat.com>
port the argument parsing for teuthology.run to docopt

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
Adds a FakeNamespace object to teuthology.config that mimics
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>
Creates a merge_configs function in teuthology.misc that will be used
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>
Ports the teuthology.run command to docopt instead of argparse.

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>
Various bug fixes while running tests on this branch in the octo lab.

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>
simple documentation update

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
modified __getattr__ for FakeNamespace so that it raises AttributeError on a missing attr.  This allows a FakeNamespace instance to work correctly with getattr(). Also removed .get() from YamlConfig as we decided it was unnecessary

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
Fixed a bug where I wasn't setting machine_type correctly.  Also, made
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>
Replaced the TeuthologyConfig instance in FakeNamespace with a dict, all the tasks expect that to be a dict

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
fixing some docs

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
Merge pull request #370 from andrewschoen/docopt-run

refactor of teuthology.run
add a reference so we can link installation and setup from readme

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
added autogenerated rst files from sphinx-apidoc in .gitignore

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
Merge pull request #382 from andrewschoen/doc-tweaks

Doc tweaks
Merge pull request #322 from ceph/wip-fix-update-hang

Fix update hang.
Correctly handle explicit None values

With test.

Signed-off-by: Zack Cerza <zack@redhat.com>
Re-store improvised owner value

Signed-off-by: Zack Cerza <zack@redhat.com>
Use FQDN in downburst yaml.

As newer rhel's like to default to localdomain screwing with things
if its not set. Older cloud-init/distros appear to just ignore the
domain.

Signed-off-by: Sandon Van Ness <sandon@redhat.com>