877 Commits

Author SHA1 Message Date
liyingjun
a7e2a8e4f5 Move files to common lib(Part 3)
Move utils to common directory.

Change-Id: Ifaf71ea4a2a1acc85ceb2af6ed978d3e08666b41
2014-12-31 09:21:14 +08:00
li,chen
6d57a3be02 Use string.ascii_lowercase and string.ascii_uppercase only
"string.lowercase" and "string.uppercase" were removed in Python 3,
we can use only "string.ascii_lowercase" and "string.ascii_uppercase".

Change-Id: I97ddac01af7070129ad8baf5960c841482c346a2
Closes-Bug: #1405918
2014-12-30 08:28:43 +08:00
li,chen
af3914e100 Use six.moves.range instead of xrange
In Python 3, module "xrange" doesn't exist any more.
To support both Python 2 and Python 3, "six.moves.range"
should be used instead.

Change-Id: I9dcf79011a4b2672e4ba55298aa22cab5e2292ff
Closes-Bug: #1403447
2014-12-27 09:38:38 +08:00
li,chen
b8a416a71d Use six.moves.map instead of itertools.imap
In Python 3, module "itertools" doesn't contain "imap" object.
To support both Python 2 and Python 3, "six.moves.map"
should be used instead.

Change-Id: I5b82020d0721a91aa6d6090a42073a3285b80ff9
Closes-Bug: #1403434
2014-12-26 21:28:09 +08:00
li,chen
f5e1917bbf Use from six.moves.urllib.parse instead of urlparse
In Python 3, urlparse module is gone.
To support both Python 2 and Python 3, "six.moves.urllib.parse"
should be used instead.

Change-Id: I0adddbdea5a80606907a1b78ca1a04d15f61452b
Closes-Bug: #1403433
2014-12-26 08:27:56 +08:00
Jenkins
8b3b52c199 Merge "Refactor validation (part 1)" 2014-12-25 19:49:05 +00:00
Yair Fried
a6a08118bd Fix router GW creation
Routers created without setting GW properly.

Closes-bug: #1405559
Change-Id: I99da8572f1ec82e8e820168d20577239f6d7b6fb
2014-12-25 10:08:21 +02:00
Boris Pavlovic
a2ef39ac10 Refactor validation (part 1)
* Remove semantic validation mechanism for context. We will use same
  approach as for current scenarios (via decorators)

* Pass "deployment" instead of "tasks" to validators. This allow us to
  remove access to DB from validators + we can call validation without
  creating tasks

* Add hacking rule to force using construction "from rally import objects"

* Fix unit tests

Change-Id: Ibf08183b28479cc49ab6adfd12298612f6b4397f
2014-12-24 18:27:17 +04:00
li,chen
8f06a5bcdc syntax change for py3 incompatible
In python 3, the raise syntax no longer accepts comma-separated
arguments, instead working with exception instances.

Also, python 3 is more strict, tuple must be created explicit.

Change-Id: Ib56b6bdf9266c0a2ed410729dc1f33ca08921005
Closes-bug:#1405145
2014-12-24 21:09:23 +08:00
li,chen
f97dac6d25 Use six.moves.StringIO instead of StringIO.StringIO
In Python 3, StringIO module is gone.
Class StringIO.StringIO is not available from io module.
To support both Python 2 and Python 3, "six.moves.StringIO" should be used instead.

Change-Id: I17e79d8625c75d6903f024c648d3ef62e21d0c51
Closes-bug:#1403076
2014-12-24 18:34:08 +08:00
Jenkins
6db0bde36a Merge "Use six.string_types instead of basestring" 2014-12-24 09:51:02 +00:00
li,chen
91b45d6fcf Use six.string_types instead of basestring
There is no global variable "basestring" in Python 3.
"six.string_types" should be used to support both Python 2 and Python 3

Change-Id: I556fef0e98d00ab819e3dea961666b403b927b06
Closes-bug:#1403077
2014-12-24 15:54:16 +08:00
liyingjun
99ab385138 Move files to common lib(Part 2)
Move i18n to common directory.

Change-Id: I23ecfd161648d71a9581160e104d4efe39fc782b
2014-12-24 10:21:32 +08:00
Jenkins
76e0fb7bad Merge "Move files to common lib(Part 1)" 2014-12-24 01:40:32 +00:00
liyingjun
9aec997bf7 Move files to common lib(Part 1)
Move broker.py, fileutils.py, sshutils.py and version.py to common
directory.

Change-Id: Ic18dc90820a518828344db8891744d26173a9855
2014-12-24 08:25:33 +08:00
Boris Pavlovic
31851cb0dc Fix docstring checker
We should test docstrings only for plugins that are described in rally.*

Change-Id: I2c3719dfb3030f5a386486db09cfb61316242ada
2014-12-23 20:53:57 +04:00
Mikhail Dubov
07bbc3094d Cover Rally with docstrings & Test this coverage
Rally should have detailed docstrings for:
* Benchmark scenario classes
* Benchmark scenarios
* Deploy engines
* Server providers
* SLA

Here we add such docstrings and also add a test suite that checks
that Rally is 100% covered with docstrings and that these docstrings
are correctly formed.

We also change the interface of the following benchmark scenarios
(for the sake of unification):
* CinderVolumes.create_and_attach_volume
* CinderVolumes.create_snapshot_and_attach_volume
* CinderVolumes.create_nested_snapshots_and_attach_volume

Finally, we refactor a bit NovaServers.boot_and_bounce_server.

Change-Id: Ia38c8fc2d692a09719d3e068d332647d4b0da47f
2014-12-20 14:13:56 +03:00
Jenkins
045603928c Merge "Sahara auto_security_group parameter added" 2014-12-20 10:28:31 +00:00
Jenkins
0a1d1f11c5 Merge "Adding iteritems validation" 2014-12-19 19:36:01 +00:00
Arx Cruz
f5d43e6eea Adding iteritems validation
Since in Python 3 there's no longer dict.iteritems()
and to keep the compatibility with Python 2, instead of call
dict.iteritems(), we must call six.iteritems(dict).
This patch is to avoid broken this compatibility in the future
adding a validation for iteritems.

Change-Id: I7c5e312801db886483b0ff5c45a80cba6848c95e
2014-12-19 15:47:10 +00:00
Jenkins
1353c6d0b2 Merge "Use Network Context in security groups scenario" 2014-12-19 14:22:39 +00:00
Nikita Konovalov
0f051b1df4 Sahara auto_security_group parameter added
The auto_security_group is now enabled by default for all Node Groups in all
Clusters. This is required for setting up a security group with a list
of TCP port for Hadoop operations.

Sahara does both creating and removig security groups automatically.

Change-Id: Ie862b541f468286bf4380f6e8d19014229beef91
2014-12-19 17:22:33 +03:00
Jenkins
61d10c5436 Merge "Add Network Context Class" 2014-12-18 17:39:56 +00:00
Jenkins
2f17baeff7 Merge "Add list_servers scenario for Nova" 2014-12-18 16:54:19 +00:00
Alexander Maretskiy
15b058c3cf Use Network Context in security groups scenario
This patch replaces code that creates networking resources in
NovaSecGroup.boot_and_delete_server_with_secgroups
with usage of our new Network Context.

Change-Id: I9e63256d409978763ee3bb9bf0d896313ba6dec9
2014-12-18 17:28:42 +02:00
kong
f72bc702a0 Add Network Context Class
Context for networking resources.

Note:
  using this context in security_groups related scenarios
  will be added in another patch.

Main changes:
  * the network context class
  * rally.benchmark.utils.RAMInt class that represents integer value in RAM,
    so we can make process safe sync of cluster-unique stuff (like CIDRs)
  * rally.benchmark.wrappers.network module, that unifies network service
    implementation, for usage both in context and scenarios
  * optimization in NovaScenario._boot_server

Co-Authored-By: Lingxian Kong <anlin.kong@gmail.com>
Co-Authored-By: Timur Nurlygayanov <tnurlygayanov@mirantis.com>
Co-Authored-By: Sergey Skripnick <sskripnick@mirantis.com>
Co-Authored-By: Vadim Rovachev <vrovachev@mirantis.com>
Co-Authored-By: Aleksandr Maretskiy <amaretskiy@mirantis.com>

Implements: blueprint benchmark-context-network
Change-Id: Ia2c461ba3421dc9650c4bb7949c115fee08c6b7b
2014-12-18 17:21:37 +02:00
Jenkins
78b6bf35d1 Merge "Converting scenario context to dict" 2014-12-18 14:33:07 +00:00
Wataru Takase
99dc73af34 Add list_servers scenario for Nova
Current Rally provides "boot_and_list_server" scenario, but doesn't provide
"list_servers" scenario. User can specify number of servers which will be
created in context.

Change-Id: I1a4f0b30dcfba08f8830448c99e687014282e094
2014-12-18 15:25:15 +01:00
Jenkins
0b64a43b85 Merge "Python 3 incompatible issue: iteritems" 2014-12-18 13:24:35 +00:00
Sergey Skripnick
7caafc4cde Fix cli tests vs MOS clouds
MOS clouds have "TestVM" image and "novanetwork" network by default.

Change-Id: Ia382734af7b613608a901c21a85136c9e491589f
2014-12-17 17:27:36 +02:00
Pavel Boldin
c29e1b64ac Converting scenario context to dict
This changes scenario context that is function to
a simple dict.

Change-Id: Icd2889434179ba08b8237b6c32d9ee6939dbf00a
2014-12-17 16:44:39 +02:00
Arx Cruz
1c70896ea0 Python 3 incompatible issue: iteritems
dict.iteritems() was removed in Python 3. This patch
replace dict.iteritems() with six.iteritems() to support
both Python 2 and Python 3

Closes-Bug: #1403071

Change-Id: I5bcee5db2d7188633d45e6161e0c956449ad2197
2014-12-17 14:32:40 +01:00
sskripnick
e12ccc7d09 Fix html rendering on failed functional tests
Remove -e option from shebang

Change-Id: I32fb1c13e20a61476958eabfca7897caa59dccab
2014-12-16 17:19:34 +02:00
Jenkins
7f4ca8212f Merge "orchestrator refactor" 2014-12-16 02:18:58 +00:00
pboros
8b95fa3cd7 orchestrator refactor
Change-Id: I1d07405d40b267427a3d376aa668ed8c5b3fc739
2014-12-15 21:50:58 +01:00
Jenkins
8c8781df4e Merge "Context tenants refactoring" 2014-12-15 18:01:26 +00:00
Victoria Martínez de la Cruz
1b36a7274a Adds Zaqar consumer-producer scenario
This scenario for Zaqar benchmarks a serial consumer-producer
use case: creates a queue, sends messages to it, retrieves
messages from it and deletes the queue.

Some changes have been added to the fakes to test this
scenario properly.

Change-Id: I49d5956bbf571840829b3e9b1411a907748cf1ed
2014-12-15 11:50:00 -03:00
Oleh Anufriiev
3a89b0eb3b Context tenants refactoring
Optimize tenants and their resources in context.
  Implement tenant related resources tree with tenant
  as root.

Change-Id: I974f3a02eeade3de6f6208642fa593832f7c62d9
2014-12-15 16:02:53 +02:00
Jenkins
63623b7f76 Merge "Changing default new user password" 2014-12-15 11:26:17 +00:00
Jenkins
eaaf71b3ab Merge "Configure gate-rally-dsvm-verify" 2014-12-15 11:19:07 +00:00
Igor Pavlovic
049837c7f1 Changing default new user password
Due to some security reasons, this patch changes default user assignment
from "same as name" to uuid.

Also, named parameter "password" is removed from method signature.
If there is a need for a new user to be created with preselected
that can be done thru kwargs by seting value with the "password" key.

Change-Id: Iccd085a8e67b204d4f9a985d5628128f4299ff83
2014-12-15 04:00:10 +00:00
Roman Vasilets
b836fe428f 100% coverage in functional tests
In Rally, we have functional tests that run different CLI
commands and check that the CLI output contains all the expected
data.

We need to ensure that every single subcommand of “rally task”,
“rally deployment” etc. (for example, “rally task start”, “rally
task report”) is covered in these functional test with all possible
parameters usage (e.g. the “--deployment” parameter in “rally task
start --deployment <name>” didn’t get tested, which has lead to
errors recently).

Change-Id: I654ad4317b2d061dd899f5fdfb028cda50af9b8b
2014-12-13 11:15:52 +02:00
Andrey Kurilin
6c5e07e31c Configure gate-rally-dsvm-verify
Recently, we added new job "gate-rally-dsvm-verify" for Rally[1].
This job implied functional testing integration Rally with Tempest[2].

This patch adds tests/ci/rally-verify.sh script, which is used by new job.

rally-verify.sh does:
- tempest installation
- run "rally verify start" twice and print results
- compare results of two verifications
- list verifications
- generate html page based on results

To implement gate-rally-dsvm-verify some changes were requered to
existing Rally code:
- Added ability for rally/ui/utils.py to accept arguments to render html-pages
- Fixed logging debug-messages in tempest verifier
- Fixed check "is debug mode turned on or not"(also, added hacking rule for it)

TODO for future patches:
- add launch of rally task for Tempest
- add launch of random test set
- add check for successful tests

[1] https://review.openstack.org/#/c/137232
[2] https://www.mirantis.com/blog/rally-openstack-tempest-testing-made-simpler

Closes-Bug: #1400465
Closes-Bug: #1400518

Change-Id: I8e1fbab22c2da109bbc442f040fe259e5d22a62a
2014-12-12 01:28:01 +02:00
Li Ma
7dcf0e68df Change TaskNotFound traceback info to user-friendly message
In some common cases (like detecting absense of requested object),
CLI shows exception traceback instead of just a simple message
that "<something> is not found".

This traceback is redundant and confusing users - they think that
rally went into trouble, but all that actually happened is wrong
uuid specified.

The traceback must be shown only with `--debug' option explicitly
specified.

The unit test and functional test are both provided.

Change-Id: I32811974d88f414c4508dfed19a7c5dc5e80fd98
Closes-Bug: #1392354
2014-12-10 20:30:44 -08:00
Jenkins
1d6d28abf8 Merge "Add cinder stress scenario: nested snapshots" 2014-12-09 17:10:26 +00:00
Anton Arefiev
acaaf6281c Add cinder stress scenario: nested snapshots
This scenario creates volumes and snapshots chain with custom nested
level:
1. Create volume
2. Create snapshot
3. Create volume from snapshot
... and so on

Change-Id: I4be5bb9435f0df5e02dfa3eca6f3e764c0786c55
2014-12-09 16:25:43 +02:00
Roman Vasilets
4ff925dfd0 Incorrect work rally info find for SLA
If you type 'rally info find <query>' rally will suggest us docs that
 will be match by query. Even if you have one typo. otherwise it sugest
 you list of docs that you are possibly looking for. But if you type
'rally info find failure_rate' there output would be: "Failed to find
any docs for query: 'failure_rate'". Instead there must be information
about SLA(failure_rate): "Failure rate minimum and maximum in percents.".

Change-Id: Ie6c59e4091cddd8f5e81e2123cad1367b397a9b6
Closes-bug: 1399675
2014-12-08 17:16:40 +02:00
Jenkins
dbd2a2448a Merge "Add scenario for booting vm with security groups" 2014-12-07 19:11:09 +00:00
Jenkins
bf7652e0b0 Merge "Workflow documentation is now in infra-manual" 2014-12-05 18:51:36 +00:00
Jenkins
d405cbf158 Merge "Adds trove python client to rally.osclients" 2014-12-05 18:51:15 +00:00