To support commands requesting a reboot of a VM after execution, the
query of ssh_info needs to avoid triggering an error when the IP address
is not yet retrievable as this indicates the VM would not be reachable.
Wrap the returning of the state in the driver to distinguish between the
following states:
- :running - indicates the machine is available
- :inaccessible - the machine is running but not yet available to
connect
This is based on the behaviour from the virtualbox provider.
Includes some rudimentary tests to exercise the driver state code.
Closes: #1366
Save the variables on the instance to allow for different connection
settings to be specified on a per machine basis.
Provide some rudimentary tests that ensure that the different URIs are
used when constructing connections, and additionally the connection is
created only once, no matter how many times it is subsequently called.
Fixes: #1358