d1f25b2e51
Rally repository includes openstack.common module with modules from oslo-incubator(modules are listed in openstack-common.conf file). All those modules can be splitted by 4 categories: 1. logging modules 2. aas related modules 3. cliutils 4. config Modules from first category were graduated to separate lib, so we can remove them and use `oslo.log`. Modules from second category are not really used and will be not used, because Rally-as-a-Service will use flask microframework instead of pecan(modules from oslo-incubator are designed for pecan). Since oslo core team did not plan to graduate `cliutils` module from oslo-incubator, so there are no reasons to sync this module with oslo, we can copy needed functions and maintain them in our repo. Additional to rally.openstack dir, modules from oslo incubator are located in tools dir. tools/config modules works pretty bad, opts from rally.osclients always lost during automated config generator. `oslo.config` lib provides a better way to autogenerate config sample of Rally. It requires new entry point, which returns a list with all opts(look at 'rally.common.opts', 'setup.cfg' for more details). Since all opts are used in one place, their names were unified. Also config was updated(via `tox -egenconfig`). tools/rally.bash_completion file is moved to etc dir, because etc dir corresponds better and it gave us ability to remove whole tools dir Closes-Bug: #1378960 Change-Id: Ic127269c367275d3adcfc9f40d9144fce8295391
2.1 KiB
2.1 KiB
Rally Style Commandments
- Step 1: Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/
- Step 2: Read on
Rally Specific Commandments
- * [N30x] - Reserved for rules related to
mock
library -
- [N301] - Ensure that
assert_*
methods frommock
library is used correctly - [N302] - Ensure that nonexistent "assert_called" is not used
- [N303] - Ensure that nonexistent "assert_called_once" is not used
- [N301] - Ensure that
- * [N310-N314] - Reserved for rules related to logging
-
- [N310] - Ensure that
rally.common.log
is used as logging module - [N311] - Validate that debug level logs are not translated
- [N312] - Validate correctness of debug on check.
- [N310] - Ensure that
- * [N32x] - Reserved for rules related to assert* methods
-
- [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)
andassertEqual(None, A)
are not used - [N323] - Ensure that
assertTrue/assertFalse(A in/not in B)
are not used with collection contents - [N324] - Ensure that
assertEqual(A in/not in B, True/False)
andassertEqual(True/False, A in/not in B)
are not used with collection contents
- [N320] - Ensure that
- * [N33x] - Reserved for rules related to Python 3 compatibility
-
- [N330] - Ensure that
dict.iterkeys()
,dict.itervalues()
,dict.iteritems()
anddict.iterlist()
are not used - [N331] - Ensure that
basestring
is not used - [N332] - Ensure that
StringIO.StringIO
is not used - [N333] - Ensure that
urlparse
is not used - [N334] - Ensure that
itertools.imap
is not used - [N335] - Ensure that
xrange
is not used - [N336] - Ensure that
string.lowercase
andstring.uppercase
are not used - [N337] - Ensure that
next()
method on iterator objects is not used - [N338] - Ensure that
+
operand is not used to concatenate dict.items()
- [N330] - Ensure that
- [N340] - Ensure that we are importing always
from rally import objects
- [N341] - Ensure that we are importing oslo_xyz packages instead of deprecated oslo.xyz ones