2012-02-06 20:43:24 +00:00
|
|
|
Keystone Style Commandments
|
|
|
|
===========================
|
|
|
|
|
2013-11-11 11:10:50 -08:00
|
|
|
- Step 1: Read the OpenStack Style Commandments
|
|
|
|
http://docs.openstack.org/developer/hacking/
|
|
|
|
- Step 2: Read on
|
2012-02-06 20:43:24 +00:00
|
|
|
|
2013-11-11 11:10:50 -08:00
|
|
|
Keystone Specific Commandments
|
|
|
|
------------------------------
|
2012-02-06 20:43:24 +00:00
|
|
|
|
2012-08-29 03:57:15 -05:00
|
|
|
- Avoid using "double quotes" where you can reasonably use 'single quotes'
|
2012-02-06 20:43:24 +00:00
|
|
|
|
2012-03-14 14:28:04 -05:00
|
|
|
|
2012-02-06 20:43:24 +00:00
|
|
|
TODO vs FIXME
|
|
|
|
-------------
|
|
|
|
|
|
|
|
- TODO(name): implies that something should be done (cleanup, refactoring,
|
|
|
|
etc), but is expected to be functional.
|
|
|
|
- FIXME(name): implies that the method/function/etc shouldn't be used until
|
|
|
|
that code is resolved and bug fixed.
|
|
|
|
|
2012-08-29 03:57:15 -05:00
|
|
|
|
2012-03-14 14:28:04 -05:00
|
|
|
Logging
|
|
|
|
-------
|
|
|
|
|
2013-08-19 11:26:35 -05:00
|
|
|
Use the common logging module, and ensure you ``getLogger``::
|
2012-03-14 14:28:04 -05:00
|
|
|
|
2014-01-01 15:48:32 -08:00
|
|
|
from keystone.openstack.common import log
|
2012-03-14 14:28:04 -05:00
|
|
|
|
2014-01-01 15:48:32 -08:00
|
|
|
LOG = log.getLogger(__name__)
|
2012-03-14 14:28:04 -05:00
|
|
|
|
|
|
|
LOG.debug('Foobar')
|