62 Commits

Author SHA1 Message Date
Andrey Kurilin
45207d2922 Fix check for tempest tests name
All tests except `tempest.api.*` are invalid.

Change-Id: Ic8cbc64ce43fec982cc7d60c1301a4b1fece7632
Closes-bug: #1316986
2014-05-08 18:19:24 +03:00
Mikhail Dubov
019eccb3d3 Create utils module for processing task results
Here we create a special rally.benchmark.processing.utils module for
computing a couple of useful functions on the benchmark data.

Change-Id: I9f3e6e50b9ba37946fbb56d7546b87b30beb0233
2014-04-29 12:06:13 +04:00
chen-li
51c8707415 Integrate the new oslotest library
There is a new support library named 'oslotest'
extracted from oslo incubator. So, we add it to
test-requirements.txt and remove deprecated modules
from rally.openstack.common

Change-Id: I1d9efaf2f8a5a4948c454ea3f2e75262479133e8
2014-04-25 23:18:30 +04:00
Jenkins
8b272caa4d Merge "Allow to provide a list of uuids for rally task delete" 2014-04-25 14:51:28 +00:00
Bruno Semperlotti
3c89038bb0 Allow to provide a list of uuids for rally task delete
Task delete command now accept a list of uuids :
  rally task delete --force --uuid uuid_1 uuid_2 uuid_3
Previous usages are still available:
  rally task delete --force
  rally task delete --force task_uuid
  rally task delete --force --uuid task_uuid

Change-Id: I85a6225476dab3ff27718d3dadf73810f8da3ebf
2014-04-25 04:58:09 -07:00
Sergey Skripnick
b0a2a14e47 Add scenarios directory for ci
This directoy contains scenarios to be run by jenkins.

Add script which runs specified scenario and plot graph.

Add abbility to specify cloud by --name in "rally use deployment"

Removed rally/exercises

Change-Id: I7803a6950ec5fce3be11277ae0e4d830f0cf6bad
Related: blueprint rally-gate-jobs
2014-04-23 20:45:52 +03:00
Jenkins
58a8679e6e Merge "Clean rally ENV after recreate database" 2014-04-18 23:26:31 +00:00
chen-li
a274ee5ca7 Clean rally ENV after recreate database
Closes-Bug: #1293211

Change-Id: I44e943ee1bde33ba920b06fdcff90068d4fb2d28
2014-04-18 18:22:38 +08:00
Carlos L. Torres
c8240bc260 Changed all deploy engine's 'name' property to 'type'
Updated unit tests and other places accordingly.

Change-Id: I3e8a986376b2075a97b05cf38cbb919a0e25efc2
2014-04-18 04:15:08 +00:00
Jenkins
cb9c9c9da1 Merge "Remove createfromenv test environment dependency" 2014-04-16 12:42:16 +00:00
Bruno Semperlotti
73fe0d31bd Allow to call task delete without specifying --uuid parameter
This patch restore the previous usage of the delete command.

Change-Id: I43edf5df7dae50faa71ad60b8760636705493a8e
closes-bug: #1301360
2014-04-16 04:00:34 -07:00
Hugh Saunders
3ab1e85cf6 Remove createfromenv test environment dependency
The createfromenv deployment function uses the environment variable
OS_REGION_NAME, but the tests did not correctly mock this variable.
Consequently setting this env var before running tests would cause the
tests to fail. This patch corrects the mock.

Change-Id: I15fe174cd9700ff34791c6980fa52ff975055e02
Closes-Bug: #1308029
2014-04-15 12:30:50 +00:00
Olga Kopylova
a3cac9dad9 Improve tempest.conf generation
Class TempestConf is added that generates tempest configuration file
for specific OpenStack deployment.

Co-Authored-By: Alexander Maretskiy <amaretskiy@mirantis.com>

blueprint tempest-improve-autoconfig

Change-Id: Id0a33998f99820f8a108305eea14b9bb9918c102
2014-04-15 13:07:59 +03:00
liyingjun
f7ad364c3a Region support
When there are multiple regions shared with one keystone, we should be
able to specify the region for the endpoint.

Change-Id: I18bb2c7630d0b1927969f6e06f30998644902020
Implements: blueprint region-support
2014-04-15 04:32:07 +00:00
Andrey Kurilin
8a2f62f483 Adds commands for verification results
Command `rally verify list` displays list of verifications
Command `rally verify results` prints raw tests results
Command `rally verify show` prints verification results.
Command `rally verify detailed` prints verification results
with traceback of failed tests.

Blueprint tempest-verification

Change-Id: I19991219c2f184c5158fecc0d234c7a40031e092
2014-04-07 21:37:42 +00:00
Jenkins
2635c1edfa Merge "rename DummyEngine to ExistingCloud" 2014-03-27 15:03:25 +00:00
Pierre Padrixe
fa86db1884 Add default task_id management by using @default_from_global
* Scenario methods now use @with_default_task_id which initialize
the task_id parameter: it sets task_id to the 'RALLY_TASK' env var
available in the global file ~/.rally/globals
* Added @with_default_task_id global to use @default_from_global
decorator with task_id, so we can use directly @with_default_task_id
and don't have to use @default_from_global that requires parameters.

Implements blueprint: cli-use-task-subcommand

Change-Id: I3fdd80b0fa89354ba24aa78b2b7db84d8a6d58c1
2014-03-27 15:34:09 +01:00
Kun Huang
5ebfbdded7 rename DummyEngine to ExistingCloud
fix one task:
https://trello.com/c/0UoJd645/181-rename-dummyengine-to-existingcloud

Change-Id: I8ac4e4120f9dbe2f9f365055d3328dd8c1e0b948
2014-03-27 18:01:52 +08:00
Pierre Padrixe
c85cb350cc Fix envutils.get_global (prev. default_deployment_id) errors management
* Since envutils.get_global doesn't raise anymore 'InvalidArgumentsException'
(due to this fix https://launchpad.net/rally/+bug/1291298) we are encountering
issues when get_global simply returns None. That's why the bool parameter
doRaise was added to get_global, so when needed the method will raise
'InvalidArgumentsException' and in the case of #1291298 get_global won't raise
any exception and will simply return None.
* Fixed unit test of Tempest Install command, deploy_id was always None in the
unit test and once the above modification applied, an InvalidArgumentsException
was raised which caused the failing of the test.

Change-Id: I18e2ac99e6412c3ae67769390e390d4210243381
Closes-Bug: #1293454
2014-03-26 17:32:39 +01:00
Pierre Padrixe
b9555bb787 Refactor the decorator which sets a default deploy_id
* The decorator is now more generic and is able to manage any default id.
* Refactored _deployment_default_id in the generic function _get_global
The function was simplified by avoiding the use of 'except KeyError' and
it makes it more readable.

Change-Id: I4b822f954059f604cf5248550df1e20ef94a8d64
2014-03-17 14:52:12 +01:00
Boris Pavlovic
d7635776d7 New task config and verification refactoring
*) Change task config format
   . Split "context" & "runner" stuff

*) Refactor Verification
   . Move validation to context.base, runner.base and scenario.base
   . Validate whole config fully before starting any of tasks
   .  Optimize scenario args validation (create only one time clients)
   . Optimize order of validation:
     1) Validate names of benchmarks
     2) Validate all static parameters, e.g. configuration of runner
        and context
     3) If everything is ok in all benchmarks, then start validation
        of scenario args.
   . Store validation result (exception) in task["verification_log"]
   . Remove verification logic from BenchmarkEngine.__exit__
   . Remove scenario args verification results from task["results"]

*) Fix & Swtich to new format doc/samples/tasks
   . Switch to new fromat
   . Add missing task configratuion
   . Better formatting
   . json & yaml samples

*) Refactored unit tests
   . tests.rally.benchmark.test_engine
   . tests.rally.benchmark.context.base
   . tests.orcestrator.test_api.start_task
       cover validation step as well and new change format

*) Refactor orchestrator api start task
   . Remove benchmark engine context
   . Call verify explicity
   . Do not raise any excpetion in case of validation error
   . Catch in start task any unexcepted Exceptions a set deployment
     in incosistance state

*) Refactor CLI
   . Properly handle new behaviour of verification
   . Replace table on task start to just message
   . Add HINTs to task detailed command

*) Add unit test for checking doc samples

*) Improve benchmark engine LOGing

blueprint benchmark-new-task-config

Change-Id: I23d3f6b3439fdb44946a7c2491d5a9b3559dc671
2014-03-17 17:19:53 +04:00
Pierre Padrixe
1d7c943ef0 Add unit test for deployment list subcommand
Change-Id: Ie32cb8f2b81626a22107e3e52afd5d6218bd125d
2014-03-15 13:11:50 +01:00
Hugh Saunders
2050b20e0c Don't raise exception if deploy_id not found
Currently envutuils.default_deployment_id raises an exception if there
is no active deployment (one that has been recorded previously with use
ore create). This patch changes the method to return None instead.

Change-Id: I57052e5d4862d80b95a45eb582702ce009a4f22f
Closes-Bug: #1291298
2014-03-12 13:59:07 +00:00
Marco Morais
6aa03f304e Expose clients directly from osclients.Clients
* Lazy load client handles instead of eager instantiation.
* Update all client handle references to use osclients.Clients.

Change-Id: Iffd17eb37886ca07190d1e2fbb6c02ff6081f69a
2014-03-11 20:33:28 +00:00
Kun Huang
d8715510ab catch exception when deployment not found
When running "rally use deployment", use try...except to avoid exposing
exceptions to end users.

Change-Id: I5b005e140784374f9a2d68da9b32fa57b2ca86a8
Closes-Bug: #1289789
2014-03-10 20:54:13 +08:00
Marcin Iwinski
6f8c3e0c55 Added "active" column on deployment list
When running 'rally deployment list' curent active deployment is being
higlighted by a "*" on a new column called "active".  Active deployment id is
comming from envutils._default_deployment_id() so this function is now public.

Change-Id: Ib911f10ee320d1ae6536f69587361fe1e35d8208
Trello: https://trello.com/c/d4wMvMsl
2014-03-08 01:56:54 +01:00
Kumar Rishabh
113e246df7 added decorator-based mocks declaration to
* test_abort
    * test_list

Change-Id: Ib8ee8378c1ec19a95931cb5f4f65052cfc9b1a8b
2014-03-06 07:59:03 +00:00
Jenkins
7c1507940f Merge "Add unit tests for the show command" 2014-03-04 20:41:44 +00:00
Tzanetos Balitsaris
f427f8d797 Add unit tests for the show command
Add unit tests for the methods of the ShowCommands class that it has
been committed without tests.

Change-Id: I94e3f4bc8c166a612c653065c6f032eb5d71a231
2014-03-04 18:52:52 +00:00
Kumar Rishabh
f03190307b Changed import statement
changed import to use test.py in tests

Change-Id: If0642797724d3edbfed772417de3708785f71a8f
2014-03-04 18:06:53 +00:00
Neependra Khare
35a0ed7302 Add support to tag a task
This would add support to tag a task with a human friendly name.
e.g.
rally  task start  --task doc/samples/tasks/authenticate/keystone.json \
						--tag  "keystone test"

Change-Id: I93aa43b12a6a6e2488c3db223e65337d2556b388
2014-03-04 16:20:42 +05:30
Marcin Iwinski
f17e71ab38 Removes old obsolete task.plot function and all related code
As per trello request: https://trello.com/c/tqjav3dY remove task.plot function
and related rally/processing.py and tests/test_processing.py files.

Change-Id: I255e13db294928c76d42541cea24e001b2f41071
2014-03-03 23:43:24 +01:00
Pierre Padrixe
cecf111806 Add use task subcommand
Added a new subcommand in use command: 'rally use task <task_id>'
which sets a RALLY_TASK global var in ~/.rally/use_command
Hence the user does not need to specify a task UUID in commands
requiring this parameter.

Partially implements blueprint: use-task-subcommand

Change-Id: I51fffa017c56321493d1a5eba866d7163b9fc813
2014-02-27 18:12:03 +01:00
Pierre Padrixe
36c74dd872 Refactor use deployment command
* Renamed 'deployment' filename in 'globals' in order to
use this file with other use subcommands such as 'task'
* Refactored by moving code into new generic functions that
  * check if the 'use_command' file exists:
  _ensure_rally_configuration_dir_exists(self)
  * update env var in the 'use_comand' file:
  _update_attribute_in_use_file(self, attribute, value)

Change-Id: I7734d34f99b468001bd431f98d97e4dade2236cd
2014-02-26 18:40:07 +01:00
Pierre Padrixe
1cdff0f5cb Add unit test for use deployment with a deployment_id not found
Change-Id: I5554d1e2f41c444d3a9922779395a5dbdb18f31a
2014-02-25 17:58:50 +01:00
Maksym Iarmak
5d70eb5463 Rally & Tempest integration (base) - part 2
Add ability to specify sets of tempest tests and regexps for tests.

Usage:
rally verify start --deploy-id=<deploy_id> --set=<set_name> --regex=<regex>

Available sets: smoke (by default), full, baremetal, compute, data_processing,
identity, image, network, object_storage, orchestration, telemetry, volume.

Change-Id: Icc9cb24e3feeb4ad6f80b311cf30bc2cf5ba9c65
Related: blueprint tempest-verification
2014-02-22 11:43:45 +00:00
Neependra Khare
70acc8dd6b Show 90 and 95 percentile results
Show 90 and 95 percentile as well while showing detailed result of a task.

Change-Id: I11c9b03cb3e449eff7f5b12503385df351f3125b
2014-02-20 11:58:22 +05:30
Maksym Iarmak
66cdcc4b63 Rally & Tempest integration (base) - part 1
Use tempest (https://github.com/openstack/tempest) inside rally to
organize base for verification functionality & for benchmarks scenario
based on tempest.

This patch adds ability to install Tempest tests (no parameters needs)
and to verify the specified cloud (takes a deploy_id as parameter, this
parameter is now optional). For now, there are smoke tests.

Usage:
rally-manage tempest install - install tempest tests
rally verify start --deploy-id=<deploy_id> - start cloud verification

Change-Id: I70bb37476dd2d12370ea77156adab3ceaddb93cb
Related: blueprint tempest-verification
2014-02-14 17:34:59 +02:00
Mikhail Dubov
5576ba789c Add support for user/admin permissions in endpoints
Instead of storing the endpoints as a single admin credentials dictionary
(containing the username, password etc.) we should be able to store several
endpoints which can be possibly returned from the deploy object, as well as
the information whether these endpoints have the admin permission or not.
If not, then the deployment is going to be used with the predefined set of
users (that will be implemented next). If there is an admin endpoint, then
the users for benchmarking will be generated (the "admin" role).
This information now gets stored in a dictionary of form:

    "endpoints": [
        {"username": ..., "password": ...,
         "tenant_name": ..., "auth_url": ..., "permission": "admin|user"},
        {"username": ..., "password": ...,
         "tenant_name": ..., "auth_url": ...,
         "permission": "admin|user"},
        ...
    ]

Blueprint benchmarking-with-predefined-users

Change-Id: If36e33e89daa036bd4b0d7db8e2d3b5b5b0f4aca
2014-02-14 01:19:22 +04:00
Tzanetos Balitsaris
d674da2222 Move every rally command to its own module
Move all the currently supported rally commands (i.e. deployment, task,
use) and their equivalent tests that are described as classes in
the 'main.py' module (and 'test_main.py' module), to separate modules in
a new directory. This is done for organizing the code of the rally command
line utility, before it become too big.

Implements: blueprint rally-show-command
Change-Id: I5982f854dfe64604ae112d93fb7ea68f72657b98
2014-02-13 17:49:47 +00:00
Julien Vey
56ae78dfbb Replace the call to default_deployment_id() by a decorator
I simply moved the logic of this method which was called at the
beginning of each method in a decorator

Implements blueprint: rally-use-command

Change-Id: I0fd41399933c0c12dbe7d58fe06dcba2452daf6d
2014-02-11 11:11:15 +01:00
Hugh Saunders
163fb04945 Show whether task failed when printing detailed information
Currently 'task detailed' shows status, config and results, but not whether
the task failed.

Change-Id: I9f58ebff0ef6dc289a317c482272403afe73c797
Trello: https://trello.com/c/Qjq5iQqW
2014-02-09 13:39:19 +00:00
Julien Vey
e61269ef33 Add rally use command - part 2
This completes the behaviour of the 'rally use' command.
when the command is called, it creates a file called openrc-{deployid}
in ~/.rally/ which contains instructions to export deployment specific
environment variables

It also creates a symlink ~/.rally/openrc that refers to the latest
deployment called with 'rally use'

It becomes simple to just do 'source ~/.rally/openrc' and then
'nova list'

Implements blueprint: rally-use-command

Change-Id: I51ddfdbf7b8ab41b5b26685dd7b671468d306fe1
2014-02-04 10:25:05 +01:00
Hugh Saunders
d956c02918 Add option to use deployment on creation
Call use deployment when a deployment is created so that the newly
created deployment is default for future operations.

Change-Id: I3d223336d221f4794b3912fea8a381a0c4934aa5
2014-01-24 12:25:26 +00:00
Hugh Saunders
9b07731419 Create rally deployment from OS_* environment variables
This saves users from creating dummy config json files when they already
have an openrc for use with the other openstack clients.

Change-Id: I487af60e0c6a5eadfc12f04fbba9c4a4186740e0
Trello: https://trello.com/c/5ZkMb9zL
2014-01-24 12:20:55 +00:00
Julien Vey
b74ea2e4f8 Add rally use command
This adds a new group of commands : 'rally use'
the first implemented is 'rally use deployment <deploy_id>'

As it is not possible in python to export globaly an env var,it saves the
variable in a file at ~/.rally/deployment like :
RALLY_DEPLOYMENT=1234abcd

For each command that takes a deploy_id as parameter, this
parameter is now optional.

The algorithm to find the deploy_id is as follows :
- If the --deploy-id param is set, use it
- If the environ contains the key 'RALLY_DEPLOYMENT', use it
- load the content of ~/.rally/deployment and if it contains the key
RALLY_DEPLOYMENT, use it
- Else, raise an InvalidArgumentException

Note that I have not been able to use the default arg in @cliutils.args
because it is called before the effective method call. Setting
deploy_id=envutils.default_deployment_id() has the same problem

Partially implements blueprint: rally-use-command

Change-Id: I1e62e26d259bd9e81f1c008058ee9ce91cc3290c
2014-01-23 22:14:01 +01:00
Hugh Saunders
e4832ed29e Print task information when creating task from CLI
Summary line is printed when task has been created but not started,
detailed information is printed once the task has completed.

Change-Id: I8a3cbb81d7fccffe158517d3023ad47d28d7ebc1
Trello: https://trello.com/c/wJbH8DqG
2014-01-22 14:07:12 +00:00
Julien Vey
f4937ce3c2 Added missing test for rally.cmd.main.task.results
Unit test for ‘results’ method in TaskCommands class was missing
followed advices from Ilya Kharin

Change-Id: I5a4f110933d855994172716b3607b0ef5e24599f
2014-01-20 19:21:22 +01:00
Julien Vey
677f86f330 Fix CLI output on task detailed command
Change the output of the detailed command when this one is called
with a non-existing id. Instead of having an error stacktrace, we now
have a message saying "The task %s can not be found"

Change-Id: I889831b0efeba451df429680007bae52987e8271
Closes-Bug: #1270153
2014-01-20 14:22:57 +01:00
Hugh Saunders
1046a985b7 Move rally.test to tests.test
This will separate totally tests/code base directories

Change-Id: I2089f13d9f7e864ee7bb03ebfd937049c7acb0a5
trello: https://trello.com/c/2pzdYz6Z
2014-01-06 16:24:00 +00:00