Instead of passing all things to the client, and forgetting some,
we should directly load the config, and use the cloud
configuration for creating connections.
Change-Id: I8e66ff033b6d49537b161710e983750f40d5e93d
The use of the profile parameter in openstacksdk's connection object has
been deprecated and is currently causing upgrade testing to fail.
Change-Id: If2c0ae577df3e174773b045b7c9efdd285ee1a6d
This reduces the number of direct dependencies, and makes the tests more
uniform.
Since glance was the only remaining test with the direct client
references, the imports and code using the clients directly have been
removed.
Change-Id: I81ac9273ee1646ede23e435da56ff211546a7d04
By using OpenStack SDK, the tests are more uniform, and we reduce the
direct dependencies we have to install.
Change-Id: Ic5ee06367904ba6bc569399432908de1b08233cd
Query the Neutron API for networks.
Added the get_objects helper method since simply listing resources
appears to be a fairly common operation in these tests. Will refactor
existing tests to conform to this standard in a separate patch.
Change-Id: I78fab1083e90bff8db46842b87f73556df153541
Basing Nova work directly on the OpenStackSDK so that there are fewer
(direct) dependencies in this code. Glance is only modified so that the
import naming is more explicit.
We don't create a VM in order to reduce dependencies on external
services such as neutron or cinder.
Change-Id: I5385754d29d5008ab5ea16bf84f4192051c5c70a
Console logging is useful when using the tool interactively, but
generats extra noise when using in a gating scenario. Move this into a
flag that enables it should it be necessary.
As part of this, the failure rate will be printed to stdout regardless
of console logging's status. This is so automated tools can use the
returned number to check for passing or failing.
Also, remove the old `configure_logging` function that was no longer in
use.
Change-Id: I55d410e6d504b03993f90cfd38dcd938390d02d5
In order for the gates to get a meaningful metric to pass/fail against,
write out the percent of failed attempts (that is, attempts that caused
some exception) after receiving a termination/interrupt.
Along with this, change the except clause in the test loop to catch all
failures and log them, rather than aborting the program. This will allow
the program to keep running until explicitly stopped, providing more
accurate results.
Since the exceptions are being caught at the loop level, the tests
themselves can use a 'happy path,' without doing their own error
handling. This makes implementation of tests more straightforward.
Change-Id: I10436d1f3e99234aa167ab7a765e59d46d54eeb8
The test_loop function was only gracefully interrupted with a keyboard
interrupt before. This is fine for interactive testing, but in an
automated scenario the script may be running in the background and need
to receive a signal from some other process, such as Ansible.
This patch adds a handler for SIGINT and SIGTERM that will allow the
current iteration of the loop to finish, then exit the program cleanly
by putting the test_loop function into a class. The test_loop function
is not refactored other than to add the `stop_now` flag, though the
internal variables may be amenable to later refactoring to use the
class.
Change-Id: I0667d2c7093e2821afdfcea987cec6b58515885f
The keystone test relied on the exception handling in the test loop -
this should be brought down into the keystone test since it's
specifically looking for failures there.
Also import the glance exceptions module with a more descriptive name.
Change-Id: Iaed4d3fc411630b506dad4769ccdcecbf6afeb1f
This change moves the tests into classes that handle the logging, set
up, and teardown of necessary data (like files). These classes are
provided to the test loop by a dictionary look up of the test cases.
Currently implemented are Glance and Keystone. There is also
functionality to query the registered tests and provide descriptions.
Change-Id: I164b85f1ca800dd58146c6793696adaf80634621
This single file will become a CLI tool that can launch any test. This
is preliminary work at merging the previous two files together and
getting a running result.
The loop was consolidated into one function, with each test also being a
function. Some utility workers were also provided.
Later work will add a command line interface for choosing a test. For
now, it simply executes the glance test since it's more comprehensive.
Change-Id: I68aa10a6f7126b7a74e474e74b7f0948c6dc20f8