Commit Graph

10 Commits

Author SHA1 Message Date
Gyorgy Szombathelyi 78abdaa130 Use consistent session options
Various components defines different options for the client sessions.
Standardize them with the help of keystonauth1 lib.

Change-Id: I2f791caaf230a58b8426d1c1d6e1eb4316a85a28
2017-07-28 14:55:45 +02:00
M V P Nitesh 580677eedc Replace six.iteritems() with .items()
1.As mentioned in [1], we should avoid using six.iteritems to achieve
iterators. We can use dict.items instead, as it will return iterators
in PY3 as well. And dict.items/keys will more readable.
2.In py2, the performance about list should be negligible, see the
link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: I45fa65427318e1c35bb521de46e81ea12ca7b770
2017-05-03 09:17:18 +00:00
shihanzhang 06746baa32 Remove log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: I24ca32d9e92cdd2b3a91916337839d116e335084
2017-04-03 12:11:20 +08:00
Felipe Monteiro 1e9a625f9c Fixes various Cfapi bugs.
Currently, murano.cfapi.cfapi throws 2 bugs, when certain
branches are reached.

1) An AttributeError is thrown by _get_muranoclient, because
   CONF.cfapi is accessed; however, cfapi is not a defined
   group in murano.common.conf. The group should instead be
   CONF.engine, where packages_service is located.

2) A NameError can be thrown by get_last_operation, in the
   unlikely situation when m_environment.status is not contained
   in any of the cases enumerated in the if/elif branches;
   when this happens, 'resp' is returned without being defined,
   resulting in this error.

3) Not a bug per se, but a LOG.warning statement is not formatted
   correctly in get_last_operation. It does not specify the
   instance_id in the error message.

Change-Id: If91a0f8f700a9c0cda0ea85a1d37938f5ef8f98c
Closes-Bug: #1661065
2017-02-01 13:48:31 -05:00
chenaidong1 77fc44cdad Add log translation marker
According to http://docs.openstack.org/developer/oslo.i18n/
guidelines.html#log-translation,log messages are recommended to use log
 translation marker.

Change-Id: Id1f2ef10eb65dcda6fa629d51a51870af2390548
2016-12-08 01:56:07 +00:00
Duong Ha-Quang 8d09fd5820 Fix typo and make docstring more clear
Rewrite docstrings in murano/common/wsgi.py to make it
more clear. Fix typo in other files.

TrivialFix

Change-Id: Iaa6bde5f3b0356b6ac9e67f39ebf0f7feff4ee45
2016-10-04 15:29:16 +07:00
Boden R 6fd6c097ac Replace retrying with tenacity
We are replacing all usages of the 'retrying' package with
'tenacity' as the author of retrying is not actively maintaining
the project. Tenacity is a fork of retrying, but has improved the
interface and extensibility (see [1] for more details). Our end
goal here is removing the retrying package from our requirements.

Tenacity provides the same functionality as retrying, but has the
following major differences to account for:
- tenacity uses seconds rather than ms as retrying did.
- tenacity has different kwargs for the decorator and
Retrying class itself.
- tenacity has a different approach for retrying args by
using classes for its stop/wait/retry kwargs.
- By default tenacity raises a RetryError if a retried callable
times out; retrying raises the last exception from the callable.
Tenacity provides backwards compatibility here by offering
the 'reraise' kwarg.
- tenacity defines 'time.sleep' as a default value for a kwarg.
That said consumers who need to mock patch time.sleep
need to account for this via mocking of time.sleep before
tenacity is imported.

This patch updates all usages of retrying with tenacity.
Unit tests will be added where applicable.

Note: This change is not newton critical so projects are welcome
to hold off on committing until post-newton. Ideally this change
will merge by the first part of Ocata so dependant functionality
can land and have time to solidify for Ocata.

[1] https://github.com/jd/tenacity

Change-Id: I18a0075e9a7c376b6881555ce67267a8944caafa
2016-09-22 10:56:34 -06:00
Nikolay Starodubtsev e689487338 Make service broker work with GLARE again.
After separation service broker from native murano on the configs/db
level GLARE support was broken. This patch updates config, devstack
script and partially service broker itself to take support back.

Change-Id: I0ea99bc491ba2ddebfc34a9c0aa681432aca7801
Closes-Bug: #1610130
2016-08-05 14:34:39 +03:00
zhurong 3d8d5a0b0e Use devstack for service broker use separate paste and db
1.Add the devstack support for new cfapi
2.service broker use separate paste file
3.service broker use separate db

Closes-Bug: #1500777
Closes-Bug: #1500827
Change-Id: I2842828fe14878e6ff5ac194473f2ffa619370df
partial-implement: bp separate-service-broker-from-murano
2016-07-25 10:05:58 +00:00
zhurong 176379f601 Move service broker api to the top level
Create separate murano-cfapi-paste.ini for service broker,
Change service broker start command to:
`murano-cfapi --config-file etc/murano/murano-cfapi.conf`

And move service broker api to the top level.

Change-Id: Id56786f31c16da11019a2064cc4285bdd266f538
partial-implement: bp separate-service-broker-from-murano
2016-05-31 21:33:06 -04:00