14 Commits

Author SHA1 Message Date
ChangBo Guo(gcb)
8062c3c3c1 Remove usage of option 'verbose'
Config option 'verbose' wase deprecated on aug 1, 2015 in review:
https://review.openstack.org/#/c/206437/
Oslo team decide to remove this option, need cleanup the usage of
it in consuming project before removing it from oslo.log.

Change-Id: I713e9e5107a64ec29c220d1150c1bf5fcf6f1135
2017-03-10 18:37:19 +08:00
Cuong Nguyen
423e539e1e Use designate.utils.generate_uuid instead of str(uuid.uuid4)
This patch replaces str(uuid.uuid4) with designate.utils.generate_uuid

Change-Id: I424a13f9d241930414bfb4c4508fc56de2df0dcc
Closes-Bug: #1656765
2017-01-16 16:12:08 +07:00
Luong Anh Tuan
e5cb2569a6 Using sys.exit(main()) instead of main()
TrivialFix: Similar [1] in Kolla project
As we known, Exceptions are raised by the sys.exit() function. When they
are not handled, no stack traceback is printed in the Python interpreter.
Therefore, when using sys.exit(main()) instead of main()
may be more readable and reasonable.

[1] https://review.openstack.org/#/c/349353/

Change-Id: Ied52a7631da82a72f0dcf2fc9ed81840d24041d9
2016-09-26 03:23:44 +00:00
qinchunhua
bb35643c18 Python 3: dict.itervalues()
Replace dict.itervalues() with dict.values(). The Python 3 dict
type has no itervalues() method, the old itervalues() method was
renamed to values().

TrivialFix.

Change-Id: I5d96f26db2bb3490271962d9548672cfdd03357e
2016-07-27 00:37:07 +00:00
Swapnil Kulkarni (coolsvap)
60947dab2b Replace deprecated LOG.warn with LOG.warning
LOG.warn is deprecated. It still used in a few places.
Updated to non-deprecated LOG.warning.

Change-Id: If2c041cc6bb9513d528ca35611e1e3a96946ce4d
Closes-Bug:#1508442
2016-01-05 09:20:58 +00:00
sonu.kumar
c7eca3fbd8 Another improvement of info level log messages
String interpolation should be delayed to be handled by the
logging code, rather than being done at the point of the
logging call.

So we should use-

LOG.info(_LI('some message: variable=%s'), variable)

instead of

LOG.info(_LI('some message: variable=%s') % variable)
Reference: http://docs.openstack.org/developer/oslo.i18n/guidelines.html

Change-Id: I409358d9e35813f1875993b96fce86a0e2bc940b
2015-11-27 13:15:03 +05:30
Graham Hayes
c5949ccb28 Rename all references of Domain to Zone
This is a pretty invasive change :)

A non complete list of changes:

* Database Tables
* Database Columns
* Designate Objects and fields on Objects
* Designate Objects Adaptors stop doing some of the renames
* All RPCAPI versions are bumped - totally backward
  incompatable (function names have changed)

Change-Id: Ib99e918998a3909fa4aa92bf1ee0475f8a519196
2015-11-17 15:22:16 +00:00
sonu.kumar
1a71bb6790 Replacing dict.iteritems() with dict.items()
dict.iteritems() of python 2.x has been replaced with
dict.items() of python 3.x to provide compatibility
with both i.e python 2 as well as python 3.

Change-Id: If4611f04cc676a2b47f0fe6f646c2823cb0c4289
2015-07-20 18:24:17 +05:30
Doug Hellmann
f9c55abbff Drop use of 'oslo' namespace package
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names.

The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.

Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.

Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages

Change-Id: Ia21c15e8eca6bf456f7cfe13f815f5ce068601e7
2015-05-06 20:36:49 +00:00
Kiall Mac Innes
9552ccc2c9 Switchover to oslo.i18n package
Change-Id: I18d9a21b75053d382fb5bbebba226eda4c174f0c
2014-07-24 14:47:44 -07:00
Jordan Cazamias
50295fb39e Fix style errors H305 and H307
H305: Imports not grouped correctly
H307: Like imports should be grouped together

Change-Id: Ic63d253e015298c7b952121a4b3634d2b1bdaf92
Implements: blueprint new-hacking-style-rules
2014-06-18 17:35:43 -05:00
Jordan Cazamias
cad8ab8785 Update hacking package, fix I18n style issues
Hacking package updated from '>=0.8.0,<0.9' to '>=0.9.2,<0.10'.
Many new style rules have been added, some of which Designate violates.
Only the style rules that pertain to I18n have been addressed.
The rest have been added to the ignore list in tox.ini for further review.

Change-Id: I5c559c491ff9bee2346b1589e7bb7e117137609b
Implements: blueprint standardize-logging
Closes-Bug: bug #1330540
2014-06-18 14:41:11 -05:00
Jordan Cazamias
a0d9b4cac6 Change log statements to meet I18n guidelines
Change-Id: Id76bcb71369302a559d2c2c5bd6046dff05a488e
Implements: blueprint standardize-logging
2014-06-11 17:08:45 -05:00
Rich Megginson
cb7050e366 add support for FreeIPA backend - phase 4 - migration
There is a script that can be used to initially populate Designate
from FreeIPA called ipaextractor.py.  You use it like this:
1) Change Designate to use backend_driver = fake - this will allow it
to update its internal database but not the ipa backend which we are
importing from
2) run ipaextractor.py with no arguments will use the standard designate.conf
3) run ipaextractor.py --config-file file.conf will use the parameters from the given config file
4) run ipaextractor.py and explicitly pass in the parameters
   ipaextractor.py [--config-file file.conf] \
      --backend:ipa-ipa-host hostname \
      ... other ipa options specified as --backend:ipa-optionname ...
      --service:ipa-api-base-uri=http://designateapihost:port
Where the ipa parameters are as described above
the default designate API URL is https://localhost:9001/
NOTE: if you want to specify both a config file (e.g. for common
options) but you want to override some of those via the command line,
you must specify --config-file file.conf first, before any other specfic
parameters you want to override.
NOTE: ipaextractor cannot be used if designate is using the IPA backend.
ipaextractor will attempt to determine if designate is using the IPA
backend, and will exit with an error if so.

Change-Id: Ic2b9c78e5f5980b62b7e93d000038ac7db921c19
Implements: blueprint ipa-backend
2014-05-07 17:16:12 -06:00