Up until now I didn't see the point of using spaces for indentation.
However, the previous commit (a18bec3) was quite eye opening.
Given that python is an indentation aware language, the amount of
mistakes that went unnoticed because tabs and spaces were used
at the same time (tabs for indentation and spaces for alignment)
were unacceptable.
E101,W191 have been re-enable in the tox flake8 checker and
the documentation has been modified accordingly.
The following files have been left as-is:
* bootstrapvz/common/assets/extlinux/extlinux.conf
* bootstrapvz/common/assets/init.d/expand-root
* bootstrapvz/common/assets/init.d/generate-ssh-hostkeys
* bootstrapvz/common/assets/init.d/squeeze/generate-ssh-hostkeys
* bootstrapvz/plugins/docker_daemon/assets/init.d/docker
* bootstrapvz/providers/ec2/assets/bin/growpart
* bootstrapvz/providers/ec2/assets/grub.d/40_custom
* bootstrapvz/providers/ec2/assets/init.d/ec2-get-credentials
* bootstrapvz/providers/ec2/assets/init.d/ec2-run-user-data
* docs/_static/taskoverview.coffee
* docs/_static/taskoverview.less
* tests/unit/subprocess.sh
We can now press Ctrl+C remotely while any subprocess of the bootstrapping process is running,
previously SIGINTs weren't propagated to the bootstrapping process because there was a thread
in between it all. Now the bootstrapping process is in it's own process group.
The work consists of three parts:
* Allow for bootstrapping remotely,
this makes it possible to run the tests
on e.g. OSX with VirtualBox installed
* Make bootstrapping a fully automated process
where the manifests can be generated by the tests
and the tests can call the bootstrapper directly in python
* Create a framework wherein instances can be booted up
using the bootstrapped images and subsequently tested
Make sure it's either `auto' (the default), `always' or `never'. If it
does not match any of the values, raise a Docopt exception that causes
it to print usage and exit.
Tested:
- $ sudo ./bootstrap-vz --color=invalid manifests/gce.manifest.yml
Value of --color must be one of auto, always or never.
Usage: bootstrap-vz [options] MANIFEST
Signed-off-by: Filipe Brandenburger <filbranden@google.com>
Mimic the behavior of the --color=<auto|always|never> found in tools
like `ls' and `grep'. Default to `auto' which checks whether stderr is a
tty to define whether colors are used.
Tested:
- Ran ./boostrap-vz --color=never and --color=always, confirmed
colorization worked as expected.
- Ran ./boostrap-vz --color=auto ${manifest_file} 2>bootstrap.log,
confirmed colors were not added to boostrap.log by default, repeated
the test with --color=always and confirmed escape sequences were
output.
Signed-off-by: Filipe Brandenburger <filbranden@google.com>