* Move general function out of the testing class. This will make them
easy to be reused.
* Properly organize the tests, and add tons of docstrings and comments
to have them as clear as possible.
* Add `failover_cinder_volume_host` to the Zaza `utilities/openstack.py`,
since this is a general purpose function.
The current approach of storing the deployment CA certificate in
the 'test/' relative path does not allow for executing tests for
multiple targets from the same environment.
We have previously moved (7a90110) the local copy of the SSH
private key for similar reasons.
Remove the global constants as we cannot build them without making
function calls, and we'd rather avoid doing that at module import
time. Code using the location of the local CA certificate has
already been changed to use helper functions.
When on MAAS support doing charm based configuration of OVS by
retrieving MAC address of ports attached to external network
from MAAS.
Note that we should extend the MAAS support to also work with
deployments where MAAS does the OVS configuration for us.
The function does three separate things today, and two of its
tasks are useful for other provider types such as MAAS.
Also fix create_additional_port_for_machines idempotency.
We previously added a run time assertion to fail early when
attempting to configure networking for an invalid bundle. The
check had the side effect of prohibiting subsequent runs on
already configured models.
This patch modifies the existing openstack upgrade tests so that they
work with focal (by explicitly supporting mysql-innodb-cluster), and are
also interruptable and resumable (at a charm level). It also makes them
work with the udpated 'get_upgrade_groups()' that ultimately gets a List
of Tuples rather than a dictionary.
Ceph deployments may not contain a keystone service which causes
calls to get_os_release to fail as it calls get_current_os_release_pair
without sepecifying an application (keystone is the default).
The resource_reaches_status assumes that the attribute to be checked
is called 'status' but this can vary between resource types so allow
the name of the attribute to specified.
A recent change introduced a configuration option in the
./tests/test.yaml file (default location) which allows juju wait to be
used rather than waiting on various workload messages. This,
unfortunately, breaks mojo tests as they don't use a tests.yaml. This
change refactors that code, and enables a 'use_juju_wait' to be passed
into the relevant functions, and a new command line option (default
true) to disable using juju wait.
To support OVS to OVN migration checks we want the basic overcloud
configure job to set up N-OVS and/or N-GW when present and the
OVN pre migration configure job will copy the configuration for us.
When configuring the address to use to talk to Keystone,
the format_addr helper should be used to ensure that an
IPv4 or IPv6 address can be correctly handled.
For compatibility with existing scenario tests the
`configure_gateway_ext_port` helper currently make use of
`juju_wait` when configuring the deployed cloud.
This does not work well if the model you are testing has
applications with non-standard workload status messaging.
Allow to override the behaviour through config step options.
A recent change to allow multiple zazas to run at the same time fixed
the cacert file into a local 'tests/' directory. Unfortunately, that
doesn't exist for every environment where zaza runs (e.g. mojo) and so
this patch ensures that the path exists prior to trying to download into
it.
Fix paramiko.ssh_exception.BadAuthenticationType when SSHing to a new Ubuntu instance.
Note that paramiko still has a few issues around authentication:
https://github.com/paramiko/paramiko/pull/1106/files
This paramiko PR also shows that password='' isn't the same as
password=None
At present the overcloud CACERT is copied to /tmp and as such it
is not possbile to run multiple tests at once without them
stepping on each other.
Store the copy in a path relative to where the test is executed,
in line with how the SSH keys are stored etc.
Fixes#331