27 Commits

Author SHA1 Message Date
Boris Pavlovic
a2d28d1f9f Input task templates and task cmd cleanup
Implement task templates based on jinja2.

This allow us to pass as a task jinja2 template
and it's argument via arguments --task-args and
--task-args-file that should be dict in JSON or YAML
presentations.

So now command looks like:

rally task start <file> --task-args <template-args-json-or-yaml> \
  --task-args-file <file-with-args-in-json-yaml>

If both --task-args and --task-args-file then file dict is updated
by task args file.

Extend rally CI performance job. Now we can set template args
via file with name: ${TASK}_args.yaml

Bonus:
* Better message on InvalidTask format
* Remove redudant catch of "keyboardinterrupt"
  it should be implement in different way.
* Replace ' -> " in rally.cmd.commands.task
  and tests.unit.cmd.commands.task
* Imporve a bit CLI messages on rally task start
* Remove old plot2html command (it's enough deprecated)
* Improve test coverage of rally/cmd/commands/task
* Fix rally/cmd/commands/validate return 1 if bad format
* Write errors to stderr (in whole cmd/commands/task.py)

Change-Id: I7dadf2986bb10407865bc73bb2fb8c96a5162d9a
2015-01-15 16:29:34 +03:00
Oleh Anufriiev
fc823a6922 Support generation of report from N task
Added ability to build one report from
  results of multiple tasks. Tasks may be passed as UUID or as previously
  saved json results. Also it may be mixed list of UUIDs and file pathes.

  Closes bug 1406585

Change-Id: I11f2ca3ee6b868b79f91a4fa95e6a9ea918a79b0
2015-01-08 16:17:31 +02:00
temujin
e9f5ceeb33 add 'rally task list' filters
Add ability to filter tasks by status and/or deployment.

Change-Id: I663bddf73a4d5be1b24e712ddcde9efdf494f005
2014-12-02 13:16:53 +02:00
Mikhail Dubov
83d0ee1a40 Further improvements in rally info
* Add more info about basic entities in rally, add samples
* Fix wrong multiline :param: handling
* Fix "rally info BenchmarkScenarios" output so that it contains
  no base classes with no scenarios
* Sort entity tables (BenchmarkScenarios/DeployEngines/...) by names
* Enable search for SLA by config option name (not only by class name)
  and print this config option name in "rally info SLA"
* Fix SLA desciption in the basic "rally info" call
* Rename "rally info DeployEngines" -> "rally info DeploymentEngines",
  but leave an alias (so that "DeployEngines" still works)
* Handle unicode bugs
* Modify the cliutils code so that it does not print traces in case of
  excessive CLI arguments
* Other cosmetic improvements

Change-Id: I2ca2b5e7f00b503a1b60d2103596ab1dfa64ac46
Closes-Bug: #1392895
2014-12-01 18:29:05 +04:00
Oleh Anufriiev
9611927787 add ability to refer deployment by uuid or name
also deployment name turned unique in db

Change-Id: I513b5259e0cfa66780b4ce00cf78dc57aeeb57db
2014-11-19 23:37:38 +02:00
Jenkins
fa7d92635f Merge "Add ability to compare two verification results" 2014-11-07 07:16:09 +00:00
Mikhail Dubov
91acc1c039 Enhance rally info
* Add "rally info BenchmarkScenario", "rally info DeployEgnine" etc.
* Simplify the default "rally info" output
* Add SLA support

Change-Id: I85259e7cf61b2b435b416b9618064f8ec22fe778
2014-10-30 13:40:49 +04:00
Tzanetos Balitsaris
b439b4d127 Modify rally commands deployment, task, and verify
Small modifications to the rally commands 'deployment', 'task', and
'verify'.
In deployment, rename the subcommand endpoint to show, and remove
the pprint and json output options in subcommand config in favor of
pretty-printed json output only.
In task, perform the same in subcommand results as in config.
In verify, perform the same in subcommand results as in config.

Change-Id: I9686abf5088782e68111638da10be72c0e1135fa
2014-10-29 01:41:55 +02:00
Mikhail Dubov
16fca90da3 Simplify and improve "rally info"
1. Typing "rally info list" now results in a list of entities available in Rally:

    $ rally info list
    Benchmark scenario groups:
    ----------------------------------------------------------------------------------
     Name                       Description
    ----------------------------------------------------------------------------------
     Authenticate               This class should contain authentication mechanism.
     CeilometerAlarms           ...

    ...

   The same info appears on just "rally info" (we've monkey-patched InfoCommands
   docstring to achieve this).

2. "rally info find" called for benchmark scenario groups now prints a list of benchmark
   scenarios available there with short descriptions.

    $ rally info find NovaServers
    NovaServers (benchmark scenario group).

    Benchmark scenarios:
    --------------------------------------------------------------------------------
     Name                                             Description
    --------------------------------------------------------------------------------
     NovaServers.boot_and_bounce_server               Test booting a server (...)
     NovaServers.boot_and_delete_server               Tests booting and then (...)
     NovaServers.boot_and_list_server                 Tests booting an image (...)

3. Minor local code & UTs improvements

Change-Id: Ib954796245d12ee0aed793984233c3d36ad24ad5
2014-10-28 01:46:18 +04:00
David Paterson
5910775a6c Add ability to compare two verification results
Currently there is no built-in way in Rally to see the differences
between two verification runs. This feature adds a compare sub-command
to rally verify that takes two verification IDs as input and output the
differences between two verifications in the desired format, html, csv,
json or pprint. Output may be printed to std out or directed to file
destination specified.

Tasks
- Add compare sub-command to rally verify.
- Add ability to specify output format and file name of comparison
  report.
  Initial support will allow for output to either HTML, pretty print
  or CSV.
- Create rally/verification/verifiers/tempest/diff.py that handles all
  the comparing and output of results.
- Create required mako template (compare.mako) and renderer
  (compare2html.py) class for HTML output.
- Added percentage threshold argument for determining execution time
  differences

Change-Id: I0276e431d7d1ad89b1b28306cd0e0ea7e1174217
Implements: blueprint tempest-compare
2014-10-25 01:10:32 -04:00
Andrey Kurilin
ff9c4ac151 Refactor tempest verification and tests for it
Class `verification.verifiers.tempest.Tempest` contains next changes:
  Output from installation of virtual environment is not useful for users,
  so visibility of this output was changed and now only in debug mode it
  will be printed.

  The status of verification will be changed to 'FAILED' if something will
  go wrong in subproccess.call

  Two variables contain word 'tempest' in their names. This is redundant,
  so they were renamed:
    Tempest.tempest_base_path => Tempest.base_repo
    Tempest.tempest_path => Tempest._path

  Construction "os.path.join(Tempest.path, some_path)" was moved to method
  `Tempest.path`, since it used in many places.

  Method `Tempest.parse_results` should not be static, because it needed
  inner variable `Tempest.log_file_raw`, so this was fixed.

  "git remote update" is not needed in Tempest installation, so we can
  remove this call and decrease time of installation.

In `rally.cmd.commands.verify.start` command, several issues were fixed:
  First function argument changed to "set_name" instead of "deploy_id".
  Reason: "deploy_id" have default value, so it should be the first in
          arguments. It will simplify command for end-users(launch
          'rally verify start <set_name>' instead of
          'rally verify start --set <set_name>').

  Task commands have cool feature: save task_id in global variables, so
  results cmd can print the last task, without setting it id. This feature
  is ported in verification.

Tests for verification contains a lot of tests, so they are splitted
to separate classes(TempestVerifyTestCase, TempestInstallAndUninstallTestCase
and etc). Also, new tests were added.

Change-Id: I08a52a1e3ceb468ba619049573bcfe642aecbcaf
2014-10-24 17:32:01 +03:00
Sergey Skripnick
e8da962c1b Make full bash-completion
Also removed some unused code in cliutils
Now `rally bash-completion' prints out bash completion script
Added test for checking completion script is up-to-date

Change-Id: I7e89baf71313da45e264fe344ff69be0e93a96d1
2014-10-22 17:09:37 +03:00
Kun Huang
7ef742af1b add bash completion script
This patch add a script rally.bash_completion which enables
auto-completion of rally CLI in bash environmnet when running:

python setup.py install
or
python setup.py develop

test:
rally [tab]
rally ta[tab]
rally task [tab]
rally task de[tab]

to-do:
adding a cache to bash-completion result could speed up auto-completion

Change-Id: Ia4c68ccf3faea73da87a93ce64b36545d9d8411c
2014-10-08 16:52:58 +03:00
Boris Pavlovic
b11235b83e Remove run_tests.sh
This is a bunch of code that actually does nothing.
"tox" command is much powerfull and it is actually used in gates.

In other words end users should use only "tox" command.

Change-Id: I2463434223c82e6eb59479cc00ee34014a5fe178
2014-10-04 14:10:52 +04:00
liyingjun
3995f1fcd0 use oslo.db module
* Use oslo.db module instead of rally.openstack.common.db
* Remove rally/openstack/common/db

Change-Id: I78e29810f4bf6cc624417744dd74f15ef2281edf
2014-06-25 06:05:15 +08:00
Hugh Saunders
4d8c820cc7 Sync code from oslo incubator
Includes updates in config generator, db.sqlalchemy, gettext utils and
log. New script added: tools/config/check_uptodate.sh

Change-Id: I0afaeb593e1b3425d7953b2a11711801299fe1f9
2014-04-28 12:19:27 +00:00
Kun Huang
2acebe6a71 move install script to project root dir
This is helpful for new guys who can't or wouldn't find this file.

Change-Id: I9239a388ba7831a4f6c9b70e938a805903238796
2014-04-06 11:59:15 +08:00
Victor Sergeyev
634b56e929 Sync common db code from Oslo
This sync brings the latest openstack/common/db code from
olso-incubator until commit
9fed4ed Fix Keystone doc build errors with SQLAlchemy 0.9

Changes in  Rally caused by API changes in openstack.common.db code -
oslo.db no longer stores SQLAlchemy Engine and sessionmaker instances
globally and it's up to applications to create them. So we should add
methods for work with engine and session to Rally code.

Config database options was modified, so rally.conf.sample was updated.

Change-Id: Ia00f2c5fb54bb86f88440233f9bf79eab7b07589
2014-04-03 16:45:40 +03:00
Sergey Skripnick
b2988f06f6 Fix dependencies for rpm based systems
Add gmp-devel to rhel dependencies in install_rally.sh
Also add +x permissions to test_install.sh

Related: blueprint rally-gate-jobs
Change-Id: I9effe4d70e6f7d43b52640cea96bf129071064bb
2014-04-01 21:39:56 +03:00
Hugh Saunders
eb6302a891 Sync modules from oslo, excluding db related
The following modules are updated:
cliutils,gettextutils,importutils,log,test,fixture,config

The following modules are new:
uuidutils

Other chnages:
 * Added uuidutils to openstack-common.conf
 * excluded rally/openstack* from pep8 check in tox.ini

Change-Id: I46fd3dc2e04bb9b5b74721a47689b860a9c68bdb
2014-03-28 15:58:25 +00:00
Tzanetos Balitsaris
b06fee6840 Add the install_rally.sh file
The install_rally.sh file is a Bash script that installs Rally on a
Unix system. Specifically, it is able to install and configure Rally
either globally (system-wide, the default behavior), or isolated in a
virtual environment using the virtualenv tool.

Change-Id: I4b6498a52cb1105fd8e27593ac482038ddcff702
Implements: blueprint rally-installation-script
2014-03-11 22:39:02 +00:00
Boris Pavlovic
5f0e55488d Update oslo code
Just update to the last version oslo code

Change-Id: I51519dadef383ea73b462760fdf4de62678596b9
2013-12-23 10:24:35 +04:00
Boris Pavlovic
30592bbe9a Update oslo code
Change-Id: I90b7488c12dca10a0ba5d46f809ed448b17035e4
2013-10-15 11:53:54 +04:00
Boris Pavlovic
f6e6f16dd9 Add run_tests.sh as alternative for tox
Add run_tests.sh and tools that depends from it from oslo-incubator.

run_tests.sh has much more siplier interface, works much more faster and
display infromation in much more human readable format.
2013-08-24 18:10:32 +04:00
Boris Pavlovic
b6c4416a9c Add venv tools 2013-08-24 13:53:34 +04:00
Boris Pavlovic
36c49518c5 Update gettextuils and jsonutils form oslo 2013-08-24 01:24:47 +04:00
Boris Pavlovic
8e31103305 Add tox, pep and requirements to project
Adding minimal amount of things to be able to run
tox against code and check all unit tests + pep
2013-08-14 12:23:42 +04:00