This is a bundle of disparate changes that enable testing the
creating of a guest instance. At a high level these are:
* Add helpers for downloading ubuntu images.
* Add method for setting up a basic overcloud network. This is very
similar to zaza.configure.network.run_from_cli
* Add nova setup module that includes create_flavors and
manage_ssh_key
* Add nova test base class for launching an instance and two
derived classes for launching a cirros and lts image respectively.
* Fixes to zaza.charm_tests.test_utils after the refactor of the model
argument in zaza.models
* New certs.is_keys_valid function to check if a public and private
key are a pair.
* Methods in utilities.openstack for managing ssh keys. On creation of
a new key the private key is stored locally and the public key is
retrieved from Openstack
* Methods in utilities.openstack for testing guests at various points
of the creation process.
The local overlay ('local-charm-overlay.yaml') is generated on the
fly during deploy time and it assumes that the application name
will match the charm name. However this is not always the case so
allow charms to override the deploy time generated template with
one from the local tests/bundle/overlay directory.
This is really another stop-gap until the whole bundle generation
piece is rewritten.
Some charms never implemented the workload status messages, these
charms have a wl status of unknown and wls message of ''. This fix
allows a wls of '' to be specified.
At present the check for which transport to use references a
configuration option that has been removed.
Update check to test for current configuration option plus
add a check for presence of `tls-certificates` relation.
Also remove insecure option and add verify option to allow
control of verification including providing own CA certificate
bundle.
Reference for verify option:
https://docs.openstack.org/keystoneauth/latest/api/keystoneauth1.html#keystoneauth1.session.Session
Currently interacting with functions in zaza.model requires the
model to be passed in. This has resulted in multiple calls to
get_juju_model(). It is cleaner to push these calls down into
the model wrapper and make the model_name an optional
argument. In addition, the current model name is now cached
without having to check the os.env each time.
Unfortunately this has resulted in the signature changing on a
great many function so this diff is bigger than would normally
be desirable.
Recently functions were added to zaza.model for adding and removing
models. These duplicated existing functions in zaza.controller.
Given these functions act against the controller, zaza.controller
feels like the correct location. In addition the implementations in
zaza.controller correctly handle disconnects which the new ones
did not.
This PR removes the duplicates and points any existing references
from zaza.model to zaza.controller. Finally, docstrings were added
and documentation links.