[zaphod-v0.4][issue-0.4-001-host-shared-directories]: Implemented getvminfo in zaphodtestutil.py

FEATURE
issue-0.4-001-host-shared-directories

SYNOPSIS
[modified]zaphodtestutil.py: Implemented getvminfo utility function.

DETAILS
Extracting information from the output of vboxmanage showvminfo is
so common, that it merits a utility function that creates a
simple python dictionary that is easily searched. This
is implemented in test. Future code refactorings of zaphodtestutil.py
will use this method to extract information rather than directly parse
the output of showvminfo.
[zaphod-v0.4][issue-0.4-001-host-shared-directories]: Simple way to get VM info.

FEATURE
issue-0.4-001-host-shared-directories

SYNOPSIS
[modified]m42/test/test_zaphod.py: Unit test for _vminfo.
[modified]m42/zaphod.py: Implemented _vminfo to get VM information.

DETAILS
Implemented the functionality for extracting information from
the output of vboxmanage showvminfo as a function. This mirrors the
method implemented in an earlier(commit
c285b47db46a555948b938eb4015bc1760df4171) in zaphodtestutil. This one
implements it for the main library. The improvement here is that
it implements a combination of techinques, which makes
it efficient both for extracting all the parameters at once or
just single parameter.
[zaphod-v0.4][issue-0.4-001]: Fixed bug in test_zaphod.py

FEATURE
issue-0.4-001-host-shared-directories

SYNOPSIS
[modified]m42/test/test_zaphod.py: Bug fix.

DETAILS
Accidentally forgot commit a bug fix made in development.
[zaphod-v0.4][issue-0.4-001]: Fixed bug in zaphodtestutil.set_nat_ssh_forwarding_port

FEATURE
issue-0.4-001-host-shared-directories

SYNOPSIS
[modified]m42/test/zaphod_test_util.py: In correct rule spec in set_nat_ssh_fowarding_port

DETAILS
An extra quote in the string results in inclusion of quote in the name of
the rule. This messes up parsing of showvminfo output.
[zaphod-v0.4][issue-0.4-001]: Refactored code to use _vminfo

FEATURE
issue-0.4-001-host-shared-directories

SYNOPSIS
[modified]m42/test/test_zaphod.py: Beter test__vminfo + new test__macaddress.
[modified]m42/zaphod.py: Refactored code to use VM info.

DETAILS
All code in zaphod.py that previously directly executed the
'showvminfo' command now uses the _vminfo method. Minor changes to
_vminfo to not quote the key string. The quoting needs to be done by
the caller. This is because not all keys are quoted.
[zaphod-v0.4][issue-0.4-001]: Implemented _create_shared_directory

FEATURE
issue-0.4-001-host-shared-directories

SYNOPSIS
[modified]m42/test/test_zaphod.py: Unit tests for _create_shared_directory.
[modified]m42/zaphod.py: Implemented _create_shared_directory.

DETAILS
_create_shared_directory allows a directroy on the host to be mounted
on a VM. This does not actually mount the directory on the VM, but
creates the mapping. The actual mounting must take place during
bootstrap provisioning.
[zaphod-v0.4][issue-0.4-002]: Skeleton for copy file.

FEATURE
issue-0.4-002-scp-support

SYNOPSIS
[modified]m42/test/test_zaphod.py: Skeleton unit test for copy_file.
[modified]m42/zaphod.py: Skeleton for copy_file.

DETAILS
Empty skeletons for copy_file and unit test for it. This function
will be implemented in full in a later commit.
[zaphod-v0.4][issue-0.4-022]: Allow disabling of bridging tests.

FEATURE
issue-0.4-022-allow-disabling-bridge-tests

SYNOPSIS
[modified]m42/test/test_zaphod.py: Skip some tests if bridge-interface:none.
[modified]m42/test/yaml.conf: Comment explaining usage of bridge-interface.

DETAILS
The following tests end without testing if bridge-interface in yaml.conf
is set to none:
  * test__bridged_host_adapter
  * test_login_parameters_bridged are

These tests require that a VM be started on a bridged interface.
[zaphod-v0.4][issue-0.4-002]: Implemented slurp utility function in test.

FEATURE
issue-0.4-002-scp-support

SYNOPSIS
[modified]m42/test/zaphodtestutil.py: Implemeted slurp utility function.

DETAILS
slurp reads in the contents of a file into a string.
[zaphod-v0.4][issue-0.4-002]: Implemented copy_file.

FEATURE
issue-0.4-002-scp-support

SYNOPSIS
[modified]m42/test/test_zaphod.py: Unit test for copy_file.
[modified]m42/zaphod.py: Implemented copy_file.

DETAILS
Implemented Zaphod.copy_file. This copies a file from a host machine to
a VM. This is needed to bootstrap provisioning in future.
[zaphod-v0.4][issue-0.4-002]: Test file for testing copy_file.

FEATURE
issue-0.4-002-scp-support

SYNOPSIS
[new]m42/test/test.txt: Test file for testing copy_file.

DETAILS
A test file named test.txt is needed to test that copy_file works.
The contents of the file do not really matter. It needs to exist
and preferably not be empty.
[zaphod-v0.4][issue-0.4-001]: More robust implementation of getvminfo in test.

FEATURE
issue-0.4-001-host-shared-directories

SYNOPSIS
[modified]m42/test/zaphodtestutil.py: More robust implementation of getvminfo

DETAILS
Getvm info breaks on some VMs because of the way the lines returned
by showvminfo are parsed. This implementation is more robust and
also store integer values as integers in the returned dictionary.
This implementation will form the basis for improving the _vminfo method
in zaphod.py.
[zaphod-v0.4][issue-0.4-001]: Robust implementation of _vminfo.

FEATURE
issue-0.4-001-host-shared-directories

SYNOPSIS
[modified]m42/test/test_zaphod.py: Modifications for changes in _vminfo output.
[modified]m42/test/zaphodtestutil.py: Make getvminfo consistent with _vminfo.
[modified]m42/zaphod.py: More robust implementation of _vminfo.

DETAILS
This makes Zaphod._vminfo more robust. (Although somewhat slower.)The
earlier version was breaking on Macs for some types of VM. The
implementation is almost identical to getvminfo implementation in
commit 474a6d9.  However, the conversion to int valuse has been
dropped.  All values are string. This makes dealing with the
output of _vminfo easier. Also There are no quotes surrounding
either keys or values (Unless the quote is part of the value or key
itself.).  So code that encloses keys in quotes has been changed.
[zaphod-v0.4][issue-023]: Detailed design of bootstrap-scp. First pass.

FEATURE
issue-023-bootstrap-scp

SYNOPSIS
[modified]doc/design-specification.html: Bootstrap-scp config directives + firstcut detailed design.
[modified]doc/zaphod.css: Remove declaration as a class.

DETAILS
This commit defines the details of the bootstrap-scp provisioning
process. This includes details of the configuration directives as well
as a first cut description of how the bootstrap-scp process works in
detail. Further design work is needed.
[zaphod-v0.4][issue-038]: Move cmd line processing defaults into separate files.

FEATURE
issue-038-refactor-test-zaphod-initialization

SYNOPSIS
[new]m42/test/cmdparam.py: Contains refactored process_command_line_arguments.
[new]m42/test/defaults.py: Contains refacored g_test_parameters
[modified]m42/test/test_zaphod.py: Removed functions described above.
[modified]m42/test/all_tests.py: Change references to process_command_line...

DETAILS
This commit is the first step of the refactoring process for removing
the tight connection between test_zaphod and command line argument
processing. The process_command_line function has been modified slightly
to use the name of the program from sys.argv, rather than the hard
coded string test-virtualbox in help. Further modification to
give help for a real test_function ina file has not been done, so
the example in the help part (epilog) is not useful for anything
other than test_zaphod. This will change in a future commit.
[zaphod-v0.4][issue-038]: Support script specific example names in test.cmdparam

FEATURE
issue-038-refactor-test-zaphod-initialization

SYNOPSIS
[modified]m42/test/all_tests.py: Pass example names to process_command_line...
[modified]m42/test/cmdparam.py: Require example names passed to process_...
[modified]m42/test/test_zaphod.py: Pass example names to process_command_line...

DETAILS
The help example printed by process_command_line_params
(via the epilog string) can now by customized to show an example
relevant to the script that is being run. Earlier, it would
print a misleading message.
[zaphod-v0.4][merge]: issue-038-refactor-test-zaphod-initialization ->  issue-037-refactor-zaphod-into-zaphodvm

FEATURE
issue-038-refactor-test-zaphod-initialization

SYNOPSIS
[modified]m42/test/all_tests.py: Modified call to process_command_line...
[new]m42/test/cmdparam.py: Refactored code: defines process_command_line...
[new]m42/test/defaults.py: Refactored code: defines g_test_parameters
[modified]m42/test/test_zaphod.py: Removed g_test_parameters, process_comm...

DETAILS
This merges the refactoring of test code (issue-038) into the main refactoring
effort of issue-037.
[zaphod-v0.4][issue-037]: Refactored executed_vboxmanage_command from zaphod.py

FEATURE
issue-037-refactor-zaphod-into-zaphodvm

SYNOPSIS
[modified]m42/test/all_tests.py: Add test_vbox to the list of tests.
[new]m42/test/test_vbox.py: Unit tests for vbox.py
[new]m42/vbox.py: Refactored execute_vboxmanage_command from zaphod.py.

DETAILS
vbox.py contains code copied out of zaphod.py for execution of vboxmanage
commands. Hence class VBox provides a low-level, but simple Python API to
interact with VirtualBox. This will be used by Zaphod and other classes
in future refactorings and new code.
[zaphod-v0.4][issue-037]: Call vbox function instead of own method in zaphoy.py

FEATURE
issue-037-refactor-zaphod-into-zaphodvm

SYNOPSIS
[modified]m42/zaphod.py: Call vbox.execute_vboxmanage_command instead of
                         self._execute_vboxmanage_command.

DETAILS
This is the next step in this refactoring exercise. The previously implemented
vbox.execute_vboxmanage_command function is called for all operations involving
vboxmanage rather than the internal _execute_vboxmanage_command.
[zaphod-v0.4][issue-037]: Remove unused Zaphod._execute_vboxmanage_command

FEATURE
issue-037-refactor-zaphod-into-zaphodvm

SYNOPSIS
[modified]m42/zaphod.py: Remove unused Zaphod._execute_vboxmanage_command.

DETAILS
In this step of the refactoring exercise, the internal, now unused
implementation of _executed_vboxmanage_command is removed. Now there
is a common vbox implementation that a refactored zaphodvm class
could use to manipulate VirtualBox.