Commit Graph

21 Commits

Author SHA1 Message Date
Ian Wienand e1461659de AWS tests: cleanup image deletion checking
This is a follow-on to I3279c3b5cb8cf26d390835fd0a7049bc43ec40b5

As discussed in the referenced issue, the blank return and
AttributeError here is the correct way to determine a recently deleted
image.  We don't need to catch the ClientError as that won't be raised
any more.  Getting a value for the state would indicate it wasn't
deleted.

This bumps the moto base requirement to ensure we have this behaviour.

Change-Id: I2d5b0ccb9802aa0d4c81555a17f40fe8b8595ebd
2022-04-28 14:16:16 +10:00
James E. Blair 91804a5e16 Azure: switch to Azul
The Azure SDK for Python uses threads to manage async operations.
Every time a virtual machine is created, a new thread is spawned
to wait for it to finish (whether we actually end up polling it or
not).  This will cause the Azure driver to have significant
scalability limits compared to other drivers, possibly limiting
the number of simultaneous nodes to 50% compared to others.

To address this, switch to using a very simple requests-based
REST client I'm calling Azul.  The consistency of the Azure API
makes this simple.  As a bonus, we can use the excellent Azure
REST API documentation directly, rather that mapping attribute
names through the Python SDK (which has subtle differences).

A new fake Azure test fixture is also created in order to make
the current unit test a more thorough exercise of the code.

Finally, the "zuul-private-key" attribute is misnamed since we
have a policy of a one-way dependency from Zuul -> Nodepool.  It's
name is updated to match the GCE driver ("key") and moved to the
cloud-image section so that different images may be given different
keys.

Change-Id: I87bfa65733b2a71b294ebe2cf0d3404d0e4333c5
2021-03-08 14:58:31 -08:00
Monty Taylor 325455dfd6 Stop using hacking for anything
We've had it in here as a way to pin pycodestyle. But that's not
worth the energy to deal with things like hacking now spewing
incorrect messages about our apache license headers not being
right even though they are. (it's because sdague dedcided that
nobody has more than 11 lines of header)

zuul just uses a bare flake8. Match that choice.

Change-Id: I5bc847d151801fd31281389ee65184e964ddd2a5
Depends-On: https://review.opendev.org/712778
2020-03-12 15:03:03 -05:00
Tristan Cacqueray aa16b8b891 Amazon EC2 driver
This change adds an experimental AWS driver. It lacks some of the deeper
features of the openstack driver, such as quota management and image
building, but is highly functional for running tests on a static AMI.

Note that the test base had to be refactored to allow fixtures to be
customized in a more flexible way.

Change-Id: I313f9da435dfeb35591e37ad0bec921c8b5bc2b5
Co-Authored-By: Tristan Cacqueray <tdecacqu@redhat.com>
Co-Authored-By: David Moreau-Simard <dmsimard@redhat.com>
Co-AUthored-By: Clint Byrum <clint@fewbar.com>
2019-01-28 12:08:36 -08:00
Markus Hosch fe6b7ddfca Move sphinx + deps to doc/requirements.txt
Move all doc related requirements to a separate requirements.txt so
that the tests do not install unneccessary dependencies.

Change-Id: I276775ee2d038209f82bfb42dca386a2f5bf02f0
2018-08-16 09:57:52 +02:00
Monty Taylor 0c71102f0e
Switch to stestr
stestr is maintained, while testrepository is not. OpenStack is
migrating to stestr, go ahead and follow suit.

The --no-subunit-trace flag is added to keep the quiet test run
behavior. If we remove it, stestr will by default print the name of each
test as it starts it.

This uses environment inclusions which need tox 2.8.1 due to a bug fix.
So increase the tox minversion.

Change-Id: I08cd4bee86b56d9a68644b049497c34e34e5f226
2018-04-26 11:52:17 -05:00
Monty Taylor e457f0c6da
Add reno releasenotes support
Do it a little bit differently than OpenStack and just put the
releasenotes into the documentation.

Add an initial release note with no contents so that the build flow and docs
integration can be verified. The note file can be removed later.

Change-Id: Iad16b575e2abbea997b64e3c0e5aa1497b4ff0d2
2018-03-28 15:53:08 -05:00
Ian Wienand 89790013f3 Consolidate node_list, add generic filter
node_list takes an argument "detail" which adds a rather arbitrary
list of results to the output.  This comes from the command-line,
where we're trying to keep width under a certain length; but doesn't
make as much sense here (especially for json).

For dashboard type applications, replace this with a simple "fields"
parameter which, if set, will only return those fields it sees in the
common text output function.

Note, this purposely doesn't apply to the JSON output, as it expected
client-side filtering is more appropriate there.  We could also add
generic field support to the command-line tools, if considered
worthwhile.

Add some documentation on all the end-points, and add info about these
parameters.

Change-Id: Ifbf1019b77368124961e7aa28dae403cabe50de1
2018-03-01 11:14:03 +11:00
Monty Taylor 0cc383f3d3
Block sphinx 1.6
Our docs jobs are broken due to a sphinx release. Issues around it are
being worked elsewhere.

Change-Id: I363865a35ba01a2f7dddce0a684b9b2f235207c8
2017-05-16 16:35:51 -05:00
Clark Boylan e63f67c2f7 Fix internal doc refs to renamed section
Providers no longer have "images" they have "diskimages". Update the
refs to reflect that. Also bump sphinx version and enforce warnings as
errors to catch these problems in the future.

Change-Id: I367e36243ff928e194986cb6dc3c68e0d48bbcd0
Story: 2000790
2017-04-05 11:07:03 -07:00
Jenkins 5350b48395 Merge "Remove discover from test-requirements" 2016-11-16 14:33:35 +00:00
James E. Blair 1b6fc223ff Remove testresources
This is unused.

Change-Id: Idf1356c8532b19bf5ef3c7835888021559900193
2016-08-15 10:27:07 -07:00
Swapnil Kulkarni (coolsvap) 3af17da693 Remove discover from test-requirements
It's only needed for python < 2.7 which is not supported

Change-Id: Id3a0b2a4ea7e10782b51534cebdf79a2bf2f98d4
2016-07-22 04:57:43 +00:00
Paul Belanger 286065ebbc Bump pbr requirements to >=1.3
This is to fix a downstream issue between nodepool and
diskimage-builder pip dependencies. Since nodepool depends on
diskimage-builder, it would be nice to have common depends.

We also bump hacking to deal with pbr version issues.

Change-Id: I0efa395bc66c9e50bfe4a13e971232ad9184ad48
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-09-14 16:19:13 -04:00
Gregory Haynes b3090b525b Check image-list output in cmd tests
We are performing smoke tests for image update commands now. Lets
also assert their effects on the image-list command.

Change-Id: I322845e159e81315b1b5f75cbb998d4c795793c4
2015-03-17 23:34:15 +00:00
Andreas Jaeger 5b013507ac Remove docutils pin
This was added to work around bug 1091333.  A new sphinx has been
released and so this is no longer necessary.

Also update sphinx requirement with global requirements.

Change-Id: I9107884d964757a9154bdd1feb4ea6df4e9df43e
2014-10-14 20:33:04 +02:00
James E. Blair faef2431a7 Finish initial docs
Finish the initial sections defined in the documentation index.
Add sphinxcontrib-programoutput to document command line utils.
Add py27 to the list of default tox targets.

Change-Id: I254534032e0706e410647b023249fe3af4f3a35f
2014-03-31 09:21:56 -07:00
James E. Blair 22961c5ba5 Add tests for the allocator
And fix a bug in it that caused too-small allocations in some
circumstances.

The main demonstration of this failure was:
  nodepool.tests.test_allocator.TwoLabels.test_allocator(two_nodes)

Which allocated 1,2 instead of 2,2.  But the following tests also
failed:

  nodepool.tests.test_allocator.TwoProvidersTwoLabels.test_allocator(four_nodes_over_quota)
  nodepool.tests.test_allocator.TwoProvidersTwoLabels.test_allocator(four_nodes)
  nodepool.tests.test_allocator.TwoProvidersTwoLabels.test_allocator(three_nodes)
  nodepool.tests.test_allocator.TwoProvidersTwoLabels.test_allocator(four_nodes_at_quota)
  nodepool.tests.test_allocator.TwoProvidersTwoLabels.test_allocator(one_node)

Change-Id: Idba0e52b2775132f52386785b3d5f0974c5e0f8e
2014-03-31 09:20:16 -07:00
Clark Boylan 841750fdea Depend on hacking for its dependencies.
flake8 does not pin its pep8 and pyflakes dependencies which makes it
possible for new sets of rules to suddenly apply whenever either of
those projects pushes a new release. Fix this by depending on hacking
instead of flake8, pep8, and pyflakes directly. This will keep nodepool
in sync with the rest of openstack even if it doesn't use the hacking
rules (H*).

Change-Id: Ice9198e9439ebcac15e76832835e78f72344425c
2014-03-26 12:39:41 -07:00
James E. Blair 6842a877a9 Pin Sphinx to <1.2
1.2 was just released and has a bug that causes builds to fail with
the error:

  error: 'source_dir' must be a directory name (got `...doc/source`)

See: http://bugs.python.org/issue19570
and: https://bitbucket.org/birkenfeld/sphinx/pull-request/193/builddoc-shouldnt-fail-on-unicode-paths/diff

Change-Id: I8a27127dd298f0c8a905c4ab17b3112e010059fd
2013-12-10 08:42:24 -08:00
James E. Blair 5866f10601 Initial commit
Much of this comes from devstack-gate.

Change-Id: I7af197743cdf9523318605b6e85d2cc747a356c7
2013-08-15 09:47:23 -07:00