Commit Graph

33 Commits

Author SHA1 Message Date
Alexander Nevenchannyy
06320d095a Move rally/objects -> rally/common/objects
There is no need to have objects directory on the top level.
They are quite rare changed and in most case one don’t
need to know about internal details of it to fulfill their
task. So hiding these directory under common/* makes perfect sense

Change-Id: Id77bec4e417d61470c9adfd7e43cc50975d76775
2015-08-05 22:56:17 +03:00
Jenkins
ac31a82f2d Merge "unit-tests: fix mocks' naming" 2015-06-22 19:56:33 +00:00
Pavel Boldin
9076679fef unit-tests: fix mocks' naming
Fix mocks' argument/decorator naming.

Partial-Bug: #1462956
Change-Id: I8366736f3bc7088f867eec1fc72630dbe1bcf19e
2015-06-19 22:57:34 +03:00
Roman Vasilets
1fbaacad92 Fix python ironicclient default version
Change from '1.0' => '1' client version to enable import of the client.

Change-Id: Ic3ead1422e352cc73d50e20e5846c55a92de601f
2015-06-18 17:15:10 +03:00
Valeriy Ponomaryov
06a442a603 [Manila] Add base benchmark for list shares operation
List of changes:
- Added general support of Manila project.
- Added support of 'list' operation for shares.
- Added benchmark for listing of shares.
- Added two different manila jobs scripts that will be used for two
different Manila installtions. Current benchmark is used without changes in
both installations.

Change-Id: Ie29be6162e788c880aea6816803c9ddea340bcf7
2015-06-12 21:21:11 +03:00
Alexander Maretskiy
861ba347b2 [Clients] Add test for osclients.cached
osclients.cached missed unit test, so this patch adds one.
Also, there is a small refactoring in this function.

Change-Id: I76301fbfb4abb8323b5d76888f93984d23981d5b
2015-05-25 18:49:41 +03:00
Swapnil Kulkarni
2aa4dffa7f Add E126 pep8 rule
Updated rally code with E126 pep8 rule

Closes-Bug:#1432078
Change-Id: Iefebdc6fdc4604869f26711240370b9e007e55df
2015-05-14 12:20:30 +00:00
Alexander Maretskiy
97a6976e05 [Clients] Rework osclients.Clients.register into decorator
Using this method as decorator looks better.

Change-Id: Iaa12d3c5dbc5093d18dac04698a6cbe58adee3fc
2015-05-08 18:47:35 +03:00
Alexander Maretskiy
219bd3aa5d [Clients] Add classmethod osclients.Clients.register
Classmethod osclients.Clients.register allows to add new
OpenStack clients to Rally at runtime, so these clients will
be available from osclients.Clients and cached.

Change-Id: I644aa2b742a8433f90068ae95328f5d0ef6b27dc
2015-05-05 15:46:21 +03:00
John Wu
42d66065a1 [Swift] Add base for Swift API Benchmarks: Patch-2
This patch adds swift scenarios, cleanup resource, and unit tests.

Swift Scenarios:
- create_container_and_object_then_list_objects
- create_container_and_object_then_delete_object
- create_container_and_object_then_download_object

Blueprint benchmark-scenarios-for-swift

This patch also fixed a minor bug with osclients.py where incorrect
"authurl" param name was used.

Change-Id: I0e5f09551fcf61e62347d56fd86f7baf9288adea
2015-04-14 16:39:21 -07:00
Zhongcheng Lao
42fcb22627 Pass username/password to client
Currently when python clients are called, Rally authenticates
with keystone client then pass then token to the clients.
This behavior will break the test when the token gets expired.

When the token gets expired, the operations using the token
will receive a 401 error which instructs the clients to
re-new the token with the user crendentials. The python clients
will re-authenticate and try to re-send the operation request.

However, since the credentials are not passed by Rally,
the clients are unable to re-authenticate in which case
the operation will fail and break the test.

This patch is going to pass the credentials to the python clients
to allow the test go beyond the token expiration time.

This patch mainly focus on nova and neutron.
Please note that some clients do not support this
re-authentication mechanism.

Change-Id: I2732e9c7053005b265df3122181f99544d4b6100
2015-04-05 16:09:50 +08:00
Kun Huang
14d0b5ba0c configure ssl in deployment config
This patch enable ssl settings in deployment config and deprecate those
in rally.conf. Before those are totally removed from rally.conf, rally
will read those if no ssl settings in deployment config. This is for
back-compatibility.

Closes-Bug: #1430695
Change-Id: Idacbd99fae9de0c107d8bdaefb134663738ca497
2015-04-03 10:01:47 +08:00
Olga Kopylova
afeaec8f43 Lazy import of keystoneclient in osclients
* Move import from keystoneclient to create_keystone_client method
in osclients. This is done to avoid loading keystoneclient on Rally
start to make it starts faster.
* Move import of exceptions from keystoneclient to verified_keystone
method.
* Add unit tests for function create_keystone_client

Implements: blueprint lazy-imports

Change-Id: Ie11618b380a9a51c5b6e237179b4da8b7178d16b
2015-04-01 15:39:49 +03:00
Olga Kopylova
859f2abf7c Load OpenStack clients only if those are used
* Move imports of clients to appropriate methods in osclients.
The purpose is to speed up Rally loading.
* Fix unit tests for moved imports.
* Fix nova exception import.

Implements: blueprint lazy-imports

Change-Id: Ib6423c3b7597f6a44540871a7c40f2f39c1f8670
2015-03-31 13:33:40 +00:00
Wataru Takase
e6199e2f07 Add boot server scenario for EC2 API
Add ec2 client to osclients and add boot server scenario

Change-Id: I78b3feced22071f62b1a2bd03c3b093402954c50
2015-03-24 10:38:53 +01:00
Srinivas Sakhamuri
edc7e7d6ec Use get_client when creating ceilometer client instance
The existing rally usage to get the ceilometer Client doesn't
set the SSL verify/insecure params. This fix changes it to use
get_client() to setup SSL params correctly.

Change-Id: I3811573ee9bf2ca6e35c8d363a1149e58fb22e53
Closes-bug: #1430527
2015-03-11 20:34:25 +00:00
Roman Vasilets
e198f39ae5 Add murano client to osclient
Change-Id: I80eb5972cd392b2f695d028a312a945471dbd45c
2015-03-10 18:55:31 +02:00
Jenkins
02c7872e9d Merge "Add base for Swift API Benchmarks - Patch-1" 2015-02-25 07:46:22 +00:00
John Wu
8e9a7dc918 Add base for Swift API Benchmarks - Patch-1
This patch adds swiftclient to osclients, updates the requirements,
and unit tests.

Blueprint benchmark-scenarios-for-swift

Change-Id: I464a19a219c0b753eca42d98042cde705d0678db
2015-02-24 13:27:59 -08:00
Pavel Boldin
47756407a0 Creating OS clients from the environment variables
Use `osclients.Clients.create_from_env' to create a Clients instance
from the environment variables. Useful for trying things in a Python
shell.

Change-Id: I807176183ff692f15b8700a8db1d0c231af3f5c6
2015-02-24 14:10:02 +02:00
Anastasia Kuznetsova
717de8291e Add Mistral benchmark
- added Mistral client initialization
- added Mistral scenarios
- added unit tests

Change-Id: Ie60a36504a970e6acb369adc570a556e549c20e1
2015-02-06 16:56:53 +04:00
jacobliberman
f048c6a633 Replace ' with " in tests/unit/[aas,cmd]
Partial bug: 1405884

Change-Id: I820e5c60b14f323a7d71f175eefe4560552c6f46
2015-02-04 10:41:00 -06:00
Filip Hubik
82a0a9ac09 Refactor oslo.foo as oslo_foo
According to related blueprint, installing oslo
libraries into a same namespace seems to cause
several type of errors. Every occurrence
of oslo.foo supported is renamed to oslo_foo.

Change-Id: I786b0b824be31c08e6795201bb95553434d8d634
Implements: blueprint 'oslo-incubator/drop-namespace-packages'
Closes-Bug: #1409213
2015-01-26 11:50:39 +01:00
Jesse Keating
8e8dcf9360 Don't hard set keystone endpoint
Keystone client utilizes the auth_url provided to it in order to
discover the appropriate end point for the action. It will either use
the publicURL or the adminURL it gets in the service catalog for the
identity service. UNLESS caller to the keystone client hard sets the
endpoint key, in which case keystone will blindly use it instead of
looking in the catalog. Because rally was setting it, rally also had to
set it differently when doing admin level stuff, but rally doesn't have
to do that at all. Rally can rely on the service catalog and let
keystone sort it out.

This change removes manually setting endpoint and just passes along the
auth_url to keystone. This obviates the need to define an admin_port in
a deployment configuration, and reduces the number of tests that need to
be ran.

A warning will be issued if a deployment defines an admin_port, however
the admin_port itself will be ignored. This provides some backwards
compatibility with existing deployments.

Change-Id: I917412e954e57ca5f03df0bb739b7806d38a12a5
Related-Bug: 1398375
2015-01-07 10:55:56 -08:00
Arx Cruz
e3f71de978 Python 3 fix '+' operand in dict in test_osclients.py
In Python 3, the dict.items() return a dict_items object, which
does not support the + operand.
The way to make it compatible is using the update method in dict
object.

Change-Id: I99c94b9a2d99d54de5a93a4e15e82ab0173e5592
2015-01-07 10:44:55 +01: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
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
ravikumar-venkatesan
662af3dda5 Adds trove python client to rally.osclients
Change-Id: Ibac269afdfcc9a0b2b13827cf16dab2c6041f2d4
2014-12-05 12:31:26 +00:00
fandeliang
1a302df237 Fix rally deployment check fails with https auth_url
When create keystone client, rally will add admin_port(35357) to
auth_url if auth_url doesn't contain an obvious port. And thus,
causing the change of https auth_url.

So we should ignore adding admin_port for https auth_url.

Change-Id: If518687839c5e0734b85b69c680f7d124e135e94
Closes-bug: #1397160
2014-12-01 20:50:28 -08:00
Andrey Kurilin
20534c78c6 Add several new hacking rules
Rules:
 N311 - Validate that debug level logs are not translated
 N320 - Ensure that ``assertTrue(isinstance(A, B))``  is not used
 N321 - Ensure that ``assertEqual(type(A), B)`` is not used
 N322 - Ensure that ``assertEqual(A, None)`` and ``assertEqual(None, A)``
        are not used
 N323 - Ensure that ``assertTrue/assertFalse(A in/not in B)`` are not
        used with collection contents

Also, small bug related to logging in verification was fixed.

Change-Id: Ieabe1b23d0c02cc13bb6cad106ab855507359ddc
2014-11-29 22:54:43 +02:00
Victoria Martínez de la Cruz
3505b112a6 Fix Zaqar's cleanup
The queues listing in the cleanup was failing
because the Project-ID header was missing.
This change adds the required header.

Change-Id: Ic12fe76206ea1fd6b7d59d48c69389abff564d7b
2014-11-17 10:40:39 -03:00
Victoria Martínez de la Cruz
f2ca4c8eb3 Fixes fakes and adds version param
This patch changes the fakes interface in order to fit
better with Zaqar's client and adds the version parameter
to initialization for a more flexible benchmarking.

Change-Id: I0a12562cfa4f7a7e1bcff35f95c59e12368e7fdf
2014-10-27 15:12:42 -03:00
Sergey Skripnick
f752ac9add Reorganize test module structure
Moved test modules:
 tests/             ->  tests/unit
 test_ci/           ->  tests/ci
 tests_functional   ->  tests/functional
 rally/hacking      ->  tests/hacking

Add testing read me file

Co-Authored-By: Boris Pavlovic <boris@pavlovic.me>
Co-Authored-By: Andrey Kurilin <akurilin@mirantis.com>

Change-Id: I57c09d892da4adf863c358a4d63e3543b50d10b7
2014-10-07 13:50:40 +00:00