Fixes wrong indent in rally/objects/task.py

Change-Id: Iffe75177e3c17360a6460b837e7e6fb7e2b066a4
Make quotas context cleanup lazy

*) Clean up service quotas only if they were changed.
*) Code clean up in setup() and cleanup() to avoid copy paste
*) Use append instead of extend in quotas tests
*) Init clients as well lazy
*) Add functional tests for quotas
*) Fix names of nova quotas
*) Fix don't break everything if you are not able to delete quota

Closes-bug: #1329907
Closes-bug: #1329795
Closes-bug: #1329379

Change-Id: I2ea781f08a731500bfff85e4c25e9786108b8b70
Rename api directory to rest

Change-Id: I91773fda0f937e4f1c1f01a7545f77e9f64993c0
Add Neutron benchmarks scenario for creating and listing routers

In this patch:
    * scenario NeutronNetworks.create_and_list_routers is added,
      which does the following:
        - creates networks, subnets, routers according to scenario file
        - adds routers interfaces to created subnets
        - lists routers
    * refactoring in NeutronNetworks class for PEP257
      and methods arguments
    * a piece of rafactoring in ResourceCleaner tests
    * classmethod NeutronScenario._generate_subnet_cidr is re-implemented
      for using netaddr.IPNetwork class
    * base implementation for class fakes.FakeNeutronClient
    * some improvements and refactoring for fakes

blueprint benchmark-scenarios-for-neutron

Change-Id: I6dbbe9e476cdf0f1fd4c7f1387e830b5a46e2aa6
Update Rally gates to support VM scenarios

Add "extra" directory for rally scenarios in gates. All files
from this directory will be copy pasted so we will be able to use
them in gates, because the path will be determined.

Also, print information about test environnement like available
services, flavors, images, networks, security groups and keypairs.

Change-Id: I19dd861beb11fb7ffdcf353f69759d841e7e8a01
Fix hacking 0.9.x issues

Fixed issues:
H202 assertRaises Exception too broad
H305 imports not grouped correctly
H307 like imports should be grouped together
H405 multi line docstring summary not separated with an empty line
H904 Wrap long lines in parentheses instead of a backslash
E122 continuation line missing indentation or outdented
E128 continuation line under-indented for visual indent
E131 continuation line unaligned for hanging indent
E251 unexpected spaces around keyword / parameter equals
E265 block comment should start with '# '

Change-Id: Ia2b8994c58686e3570f303f0725a2850d6b36e47
Updated from global requirements

Change-Id: I3d3203f09baf1b9873fb52747931decc333e1635
Merge "Fix hacking 0.9.x issues"
Merge "Updated from global requirements"
Minor fixes in Ceilometer benchmark scenarios

1. Renames ceilometer.py to alarms.py as it contains scenarios for alarms only.
2. Complete a TODO to use self._generate_random_name

Change-Id: I536e0ebd20f8dc56e31a75f117994c3abe4c9f2d
Closes-Bug: #1323629
Changes tempest subunit log handling

* Remove subunit2junitxml dependency and code from rally
* Convert raw subunit stream from tempest tests to json and store only
  json in DB
* Run tempest scenario (smoke) in rally gate

Change-Id: I6628375d83da9af3984819dfc5815ae0c06ec1aa
Implements: blueprint tempest-subunit-to-json
Refactor tempest config generator

Use `requests` library instead of `urllib2` & `httplib`
Main profit from `requests` library:
- `requests` is HTTP for Humans;
- `requests` is well documented[1];
- `requests` can save downloaded files by parts, so usage of memory
is less(useful when downloading big data, for example - some images)
- `requests` has same name as in Python 2x and Python 3x

Use `inspect.getmembers`[2][3] for discovery of each function for section
generator. Profit : decrease lines of code

Add checks for existence of subnet in 'network' section.

Move function `_write_config`[4] from class `Tempest`[5] to `TempestConf`.
Reason: this function not related to verifier for Tempest.

Fix message for exception when user doesn't have admin role.

Move name of section into kwargs to each section function.
Profit: less string objects with section names

[1] - http://docs.python-requests.org/en/latest/
[2] - https://docs.python.org/2/library/inspect.html#types-and-members
[3] - https://docs.python.org/3.3/library/inspect.html#types-and-members
[4] - http://git.io/E1zPOQ
[5] - http://git.io/8Ru-Yw

Change-Id: I8307ec33dd93ef055450f58d7cd55bf6b200f249
Add unit tests for rest

* add unit tests for rest.types
* add unit tests for rest.controllers.root
* add unit tests for rest.controllers.v1.root

Change-Id: Icb7d243643a6a0a57d2b1f01879774008491ea0a
Updated from global requirements

Change-Id: I1db47c96cf465e6378e783ce5240bb0b46b6c534
Merge "Add unit tests for rest"
Sync necessary modules from oslo incubator for worker service

Sync modelus: service, periodic_task and related dependencies
from oslo-incubator. Using the following command in oslo-incubator:

python update.py --base rally --dest-dir ../rally --modules \
periodic_task,service

Change-Id: I0b8278404d53a91add7a8cf3876121aad1e497c2
Benchmark to validate a keystone token N times at service endpoint

With PKI, tokens can be validated at the service endpoint. There might
be some caching policies which might affect the validation process.
This benchmark can be used to check effect of caching related to tokens.

Change-Id: I6277d8514bbdb1e5dca5032f44ac3d5ff9618cc2
Merge "Benchmark to validate a keystone token N times at service endpoint"
Add Neutron benchmarks scenario for creating and listing ports

Scenario NeutronNetworks.create_and_list_ports is added, which does the following:
  - creates network
  - creates a given number of ports
  - lists ports

blueprint benchmark-scenarios-for-neutron

Change-Id: I029f220dd70beb0c248877bd4bd718dfa63aba40
small fixes on rest/base.py

- rename a base class from FunctionalTest to PecanControllerTest which
makes this naming more accurate
- remove some print statement for debug uses
- use _request_json in delete method
- use requests module instead of six.moves.urllib

Change-Id: I4463466bab91ad538295668b9e8133a1a1f99caa