Methods {create,get}_timestamp now have possibility to
pass "server" variable to it.
That allows to log instance's console output in case if
SSH to instance would not be available.
Change-Id: I1352e9d559e67510917c2eecd9ecbbb387fdfdb6
services and extension decorators are based on CONF and needed by
Tempest only, so moving them to tempest.common.
Since a few plugnis use them today, use debtcollector to avoid
breaking all dependencies.
Change-Id: Ibd52153d00b8e60fb8c89e38d94e358ddc787251
I think it's a good idea to move all utility decorators into
tempest/lib/decorators.py. This patch does that for the `attr`
decorator.
Change-Id: Iaafbb112b6eee458089cc49918359a8a8d0485e2
The scenario tests end up generating a large load on target
environments. In most cases this means the whole system is running at
an extremely unrealisticly high load, and many of our scenario
failures are probably traceable back to this.
This classifies many more scenario tests as slow so that during normal
full runs they are not run, they are still accessible for running with
the tox -e all flag.
Selection based on https://ethercalc.openstack.org/nu56u2wrfb2b
Depends-on: Ia303773cabffc25d910cd1c0950d6739592bade6
Change-Id: I35cf4a77ff61d04ed8be58acff3edf47b1ae36f7
If public_network_id is not specified in tempest.conf,
the testcases using it should be skipped, otherwize we will
get errors like:
BadRequest: Bad request
Details: {u'message': u"Invalid input for external_gateway_info.
Reason: '' is not a valid UUID.",
u'type': u'HTTPBadRequest', u'detail': u''}
Besides, _create_router in dynamic_creds will try to create_router
using self.public_network_id as external_gateway_info, which will also
raise Error when self.public_network_id is None, so here is to pass
external_gateway_info to create_router only when self.public_network_id
is not None.
Change-Id: I567f9a51d301bcfea782d549298dbd3a598f3b85
It's unnessesary to specify 'image_id', 'flavor' and 'wait_until'
parameters, since those parameters are already specified in the
common wrapper utility 'create_test_server'.
Change-Id: I9e070fd9122bcb083f1621b82cb1adc502f9986b
All callings to manager.create_server pass wait_until='ACTIVE',
so this is to make wail_until default as 'ACTIVE', not None.
Change-Id: I630cf047ed419fbf0cc073b5984fa29b456da451
So many modules are using test.idempotent_id and this is for
switching to decorators.idempotent_id on scenario.
Change-Id: Ieae5a2ee6937ad4339aff531eadc5e4986d7ec42
Related-Bug: #1616913
test_shelve_volume_backed_instance actually created an instance with the
volume attached as a data disk rather than the root disk. This fix makes
it create an instance with the volume as the root disk.
Change-Id: I719aa7ec2507b7936c08d17108511260830ad099
Closes-Bug: 1613946
All testcases in TestShelveInstance should be skipped if
CONF.compute_feature_enabled.shelve is false, so this is to
use skip_checks to avoid adding skipUnless decorator for
each testcase individually.
Change-Id: I41f57fc92cf0294e922b87667b84d4aa3ac87663
shelve server logic has been duplicated many place and
also needed by more tests.
It better to make that a utils function and used from there.
Change-Id: I391f0bb92da1ddc76efcf026e8dea536edfd3706
The entire mechanism for ssh validation is a mess. The fact that there
is a parameter which is server_or_ip, so you never know if it's an
object or an address, and that every one of 7 layers need to handle
either case, makes doing any enhancements here for failure detection
impossible.
This change implements a get_server_ip method that gets the fixed or
floating IP address before passing it to the remote client.
Change-Id: I76d818bf9e1bd26b1e499464fc9213764afee279
Migrate the scenario tests to the new ssh-auth-strategy.
Partially implements: blueprint ssh-auth-strategy
Change-Id: I50759d32e47d975ec64ca129a13b2ae4459917e4
Moved to common class duplicate part of code for "get server or IP"
which used in few scenario tests.
Change-Id: I6368c24764e2515dc8bbcd82d1b0623c24bc77cd
There is a lot of H404/405 violations in Tempest now, and that leads
difficult to migrate the code to tempest-lib or the other projects'
repos. This patch fixes these violations for scenario tests.
Change-Id: Ia2b3cdbd0da49eeb16742c1eed05ea56ca41a8f7
This removes the class variables for keypair and security group
so we don't rely on tight coupling between method calls.
Change-Id: I8cdec35cbf3ca168c3d9979a771caa7221d4b511
Related-Bug: #1482299
Moved methods "write_timestamp" and "get_timestamp",
which are duplicated in few scenarios, to the common class.
Change-Id: I527557a3cf3618ffa6589dbd1dbc92f2268ed50e
Currently compute floating_ips_client returns Response by removing
top key from Response.
For example-
return service_client.ResponseBody(resp, body['floating_ip'])
As service clients are in direction to move to Tempest-lib, all
service clients should return Response without any truncation.
One good example is Resource pagination links which are lost with current
way of return value. Resource pagination links are present in parallel
(not inside) to top key of Response.
This patch makes compute floating_ips_lient to return complete
Response body.
Implements: blueprint method-return-value-and-move-service-clients-to-lib
Change-Id: Ib11e815a944321589dd618c7696249f0e0eb3938
wait_for_server_status of compute client just calls the one of waiters
module and the method is a wrapper.
So the method seems redundant and it doesn't fit as service clients.
This patch removes wait_for_server_status from compute client and
replaces it with waiters' one.
Partially implements blueprint consistent-service-method-names
Change-Id: Ie821ea4ba0924b71caba80132e1c383fb5bb125d
Use graduated libraries where available and update the incubated modules
that remain.
Update imports for libraries that were being used already to avoid the
'oslo' namespace package.
Update config file for creating example configuration files and provide
a new sample file based on the options defined in the libraries.
Note: because of the number of libraries involved there is no real way
to break this change up into smaller pieces. Fortunately, most of the
changes are just to import statements.
Change-Id: Ia0de957b681cb924a57af98d99a9389ee234ed5b
Adds uuid4 as a decorator of the form:
@test.idempotent_id('12345678-1234-1234-1234-123456789abc')
to every test in the Tempest tree. Includes a gate check to
ensure the existence and uniqueness of the ids.
Modify check tool to ignore Tempest unit tests.
Change-Id: I19e3c7dd555a3ea09d585fb9091c357a300e6559
Co-Authored-By: Sergey Slipushenko <sslypushenko@mirantis.com>
Implements: bp test-uuid
Add ResponseBodyData for cases like delete_floating_ips_bulk where a
string is returned as the body. The client has to dereference the data
but I think this is a bit cleaner than having some methods return two values.
Partially implements: blueprint clients-return-one-value
Change-Id: I87b092b2dd2a231049fc39312038f2a2d5101028
Nova "create a server" API refers a security group name only in
security group attributes, but current scenario tests pass the
other attributes(rules, tenant_id, description) also.
That will be a problem on Nova v2.1 API because the API denies
unnecessary attributes for strict validation.
This patch removes them.
Change-Id: I764f00fc1e6a5486367a95a44976e41293aa84c0
Current test of shelve/unshelve in api/compute/servers/test_server_actions
only checks the API. Nova Bug #1257594 shows that shelve was once not
reliable. This addition should prevent this bug from ever coming back.
Change-Id: Ie9c28e0f17e25f75ce435ac574244cd3c3c69c9a