44 Commits

Author SHA1 Message Date
Ethan Lynn
d5c449ab32 Import oslo.i18n and port heat bins to use oslo.i18n
Import oslo.i18n and port heat bins to use oslo.i18n

blueprint oslo-i18n

Change-Id: If30df87d7d2b8047225f0c413d338ace975062b1
2014-09-02 10:53:14 +08:00
Jenkins
8249ed170f Merge "Refactor service readiness notification" 2014-08-08 08:17:57 +00:00
Jenkins
b6304d4f8d Merge "Stop overriding CONF.default_log_levels per binary" 2014-07-17 10:41:31 +00:00
Alan Pevec
46d6b9306c Refactor service readiness notification
Build upon cceda95a35f18f5f7b52daaf0662a4cd3768b3ac apply Oslo systemd
module. It was imported in aef33d2d716c064f1f571c334fd36b1ea5928d5c. It
also drops heat.common.systemd and deprecates onready configuration
parameter.

Oslo commit 53e1214c092f09e3851b1a1b55289a93a72b09ec

Change-Id: I80f325c9be9c171c2dc8d5526570bf64f0f87c78
2014-07-16 11:01:52 +02:00
Thomas Herve
9090b988e6 Port to oslo.messaging
Move from oslo RPC to oslo.messaging.

Implements: blueprint oslo-messaging
Co-Authored-By: sdake@redhat.com
Change-Id: I2d222c248dd2cd405b8ec35c4c8198ed001fb69f
2014-06-26 06:45:52 +02:00
Joe Gordon
8208c64df3 Stop overriding CONF.default_log_levels per binary
Overriding CONF.default_log_levels means we loose some explicitly set
default values such as 'iso8601=WARN'. Also explicitly overriding
CONF.default_log_levels means that default_log_levels cannot be set in a
config file.

Change-Id: Ib5103b88ec3f9ccd9d516032c6a13dc2fa4bcb5e
2014-06-17 15:43:43 -07:00
Christian Berendt
105a806493 all non debug log messages should be translated
Updated a set of files to add missing translation support in the
log messages.

Change-Id: I58d561c5e1ecff550483ee0be696999e927c98ad
Partial-Bug: #1321283
2014-05-29 11:11:46 +02:00
Ethan Lynn
f864a0c84a Re-enable lazy translation
After enhancements to Oslo Message class, re-enable lazy translation to
enable REST API responses to be translated to the requested user locale.
bp i18n-messages
Change-Id: I4be508858547029d454412746609fd380af415c1
2014-05-27 18:29:01 +08:00
Pavlo Shchelokovskyy
50ff4ec2fe Order imports in alphabetical order (9/9)
This patch fixes all the missed and newly introduced violations of the H306
style checking rule and enables it in tox.

Change-Id: I5566e66421d5397c0103958f02ea38e6e3c68892
Implements: blueprint reduce-flake8-ignored-rules (partial)
2014-05-22 16:49:51 +03:00
Jason Dunsmore
97135cbfc0 Remove vim header from files.
Change-Id: Ia6131f8fcac6902c80c80aa805c8cd7a2a41f280
Closes-Bug: #1229324
2014-03-04 08:51:56 -06:00
Jenkins
56bacbda1b Merge "Add systemd notification support to heat" 2014-02-19 23:22:19 +00:00
Lon Hohberger
cceda95a35 Add systemd notification support to heat
This mirrors work done in other OpenStack projects
to add systemd notification support to signal that
a given process is ready to accept requests.

The heat-api, heat-api-cfn, heat-engine, and
heat-api-cloudwatch processes are all covered by
a new, single, 'onready' configuration file option.

Additionally, the sample configuration file has been
updated to match.

Implements: blueprint systemd-integration

Change-Id: I90d2b915e2568a65ed9ed78923c9982e19f9c948
Signed-off-by: Lon Hohberger <lhh@redhat.com>
2014-02-19 09:43:44 -05:00
Thomas Herve
8b1b7d132e Revert "Merge "Re-enable lazy translation""
Revert enabling lazy translation, which doesn't work in many places
because we're doing string concatenation.

This reverts commit 1864efa320aadbb4f5503c15345dd363bb3691c1, reversing
changes made to 92e3e3ce74dc1e3f75d51600072227c2e44016a6.

Closes-Bug: #1281644
Change-Id: Iac0be685f8bb60f81715c0dd3dbe35787e38ee39
2014-02-18 18:58:28 +01:00
cbjchen@cn.ibm.com
fa133569a4 Re-enable lazy translation
After enhancements to Oslo Message class, re-enable lazy translation to
enable REST API responses to be translated to the requested user locale.

bp i18n-messages

Change-Id: I15ecffd678393c27c34336035d37915655e9f350
2014-02-16 02:12:37 +00:00
Ben Nemec
53b9314799 Disable lazy translation
Late in the Havana cycle bug 1225099 was found in the lazy
translation code, and to be safe it was decided to disable lazy
translation for Havana.  This change does that.

Change-Id: Ia934a7df9386baf6ae8eb9ff48c24386c47ecd23
Partial-bug: 1225099
2013-10-01 21:41:55 +00:00
Angus Salkeld
0d083f972a Add the api config opts in groups to deal with the single heat.conf
So first off, I also don't like the replicating of the api_opts in wsgi.py
but if I don't do that the sample generator doesn't work:(

We add the wsgi options into a group for each of the api servers with
the deprecated group of "DEFAULT" so it still deals with the flat layout.

The behaviour is as follows (assuming heat-api):
1) if you have both (/etc/heat/{heat.conf, heat-api.conf}
   the value in heat-api.conf wins over heat.conf
2) if you have just one of the config files but a value in both the
   [DEFAULT] section and the [heat-api] section then the value in heat-api
   wins.

bug #1209141
Change-Id: I66ddb3dca91d13b28e68dfb4306e94eb4e537fa7
2013-08-27 10:26:53 +10:00
Luis A. Garcia
9004239b9f Enable localizable REST API responses via the Accept-Language header
Add support for doing language resolution for a request, based on the
Accept-Language HTTP header. Using the lazy gettext functionality, from
oslo gettextutils, it is possible to use the resolved language to
translate exception messages to the user requested language and
return that translation from the API.

The patch removes individually imported _() so they don't replace the
one installed service-wide.

Also, it adds the ability to fully re-create a remote error
with the same kwargs with which it was originally created, so that we
can translate it and show it to the user.

Partially implements bp user-locale-api.

Change-Id: I63edc8463836bfff257daa8a2c66ed5d3a444254
2013-08-03 00:19:17 +00:00
Liang Chen
48b243b35e install "_" via gettextutils
avoid using two separate sets of translation messages when
HEAT_LOCALEDIR environment variable presents.

Fixes bug #1196184

Change-Id: Ief773b9f2674909de461e2b07f1b07d3c66521cc
2013-06-30 14:42:41 +08:00
Dirk Mueller
9db6e14a45 Use Python 3.x compatible except construct
Python 3.x deprecated excecpt x,y. Use except x as y,
which works with any Python version >= 2.6

Change-Id: I264049ee41e75bcedea86adf7c2011c343f47ddb
2013-06-12 22:56:14 +02:00
Angus Salkeld
f9f11a5bc3 Use oslo logging setup.
The one reason we kept our own version was because of the qpid
logging that is quite useful. But this is now easily done via
the "default_log_levels" option.

I have setup the api servers with:
 ampqlib,qpid.messaging,keystone,eventlet
and the engine with:
 ampqlib,qpid.messaging,keystone,eventlet,sqlalchemy

bug: 1143629
Change-Id: I04eeab469ab59da550e08188d53b2cfbb576c04d
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-03-04 17:00:47 +11:00
Mark McLoughlin
150d2ca694 Use oslo-config-2013.1b3
The cfg API is now available via the oslo-config library, so switch to
it and remove the copied-and-pasted version.

Add the 2013.1b3 tarball to tools/pip-requires - this will be changed
to 'oslo-config>=2013.1' when oslo-config is published to pypi. This
will happen in time for grizzly final.

Add dependency_links to setup.py so that oslo-config can be installed
from the tarball URL specified in pip-requires.

Remove the 'deps = pep8==1.3.4' from tox.ini as it means all the other
deps get installed with easy_install which can't install oslo-config
from the URL.

Excluded code from oslo-incubator in the pep8 check.

Retain dummy cfg.py file until keystoneclient middleware has been
updated (I18c450174277c8e2d15ed93879da6cd92074c27a).

Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
2013-02-18 17:27:14 +00:00
Steven Hardy
2979270a41 heat api : add register_api_opts to init.py
Add register_api_opts to api/__init__.py, slightly simplifying
the api executables, and also solving an issue with some tests
which were not working via nosetests -s due to the required
options not being registered in cfg.CONF

Change-Id: I70b16aae1f73f72518013dbcda37defa79fc5649
Signed-off-by: Steven Hardy <shardy@redhat.com>
2013-01-31 15:41:16 +00:00
Steve Baker
c4e73f1f55 Eventlet monkey-patch heat-api
I have a stress test which uses python-heatclient to create
an empty template, list the stacks, and delete the created stack.

Running 100 of these jobs concurrently takes 64 seconds without this patch,
and 17 seconds with it.

Change-Id: I8963da477aa8fcec724e2e5afcd5ec92ff5b07d1
2012-12-11 10:20:41 +13:00
Zane Bitter
9e237f5a66 Add the beginnings of an OpenStack ReST API
So far only access to stacks (not resources and events) is implemented.

Change-Id: I9655e9441087ef60c06e67e2d6ae68ec4a3b2d11
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-09-27 21:37:37 +02:00
Zane Bitter
2f9a1310e3 Rename heat-api to heat-api-cfn
The previous heat-api is, in fact, a CloudFormation-compatible API. Rename
it to heat-api-cfn, analogous to how the EC2 API in Nova is named
nova-api-ec2.

Change-Id: I9759f10cee6a60cdc9cb917966eb9fb95a618f85
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-09-06 16:11:24 +02:00
Tomas Sedovic
6029c031ea Use eventlet's wsgi again
Ref #55

This adds a monkey patch for the eventlet's maximum url length issue (ref #18).
With it, we can use eventlet as our wsgi server again.

Once Eventlet releases a new version (the fix is already in master) we'll drop
the monkey patch and set the limit proper.

Change-Id: Ia122af8d53b49587ade0ead6897fdd10107f4a87
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
2012-07-18 13:34:35 +02:00
Steven Dake
e9eee939c7 Import openstack.common.rpc
Use openstack.common routines.  One of the parameters changed to
create_consumer().

Thanks to Russell Bryant for assistance with sorting out that problem.

Change-Id: I4badc7ca22298cd0aafc57a2335b3d6801289be8
Signed-off-by: Steven Dake <sdake@redhat.com>
2012-07-17 08:27:19 -07:00
Steven Dake
b0a0f0c24e Use global cfg.CONF instead of config classes
Importing rpc.common requires the use of the global cfg.CONF.
In fact, most of common requires the use of this global.  This
patch removes all the object specific access to config options
and directly accesses the global in prep for rpc openstack-common
import.

Change-Id: I5989a436964c199df0dc38dbb191dc3d867e5ce7
Signed-off-by: Steven Dake <sdake@redhat.com>
2012-07-17 07:18:42 -07:00
Steven Dake
c7ec88f2c7 Import openstack.common.log and use inside heat infrastructure
Allows heat to match openstack-common log calling conventions such
as using a context object or instance UUID for better traceability.

Change-Id: Idaa6c04270d9d7143c85988d685c0f9e241b635b
Signed-off-by: Steven Dake <sdake@redhat.com>
2012-07-14 13:51:38 -07:00
Angus Salkeld
cfd1232038 Remove duplicate setup_logging()
This is already done in load_paste_app()

Fixes #146

Change-Id: I3631b7ade06c8b142960abbf9c172461fae93a56
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-20 14:01:29 +10:00
Angus Salkeld
7e02a65f79 Fix the setup of daemon config
Change-Id: I02d4a3da63d2438067cf64c15432d66b539c30bc
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-06 23:07:54 +10:00
Angus Salkeld
93ea554c0e Teach heat-api about the bind_host
Change-Id: Ica32693373a87f01c41755a2b041c187bddd034d
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-04 21:16:31 +10:00
Tomas Sedovic
669f312c9a Update heat-api docstring 2012-04-27 15:25:50 +02:00
Steven Dake
2ba3934ce0 Put Starting Heat API in log file and add logging setup to bin/heat-api
Signed-off-by: Steven Dake <sdake@redhat.com>
2012-04-26 11:02:15 -07:00
Steven Hardy
39f822f04f heat, heat-api: Add missing licence to header
Adds missing licence header to heat and heat-api

Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-04-18 20:47:03 +01:00
Chris Alfonso
f0862d8b88 renaming CloudFormations to CloudFormation 2012-04-13 15:01:41 -04:00
Angus Salkeld
e7f05dba5d Add utils & exception from openstack-common
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-05 16:43:09 +10:00
Tomas Sedovic
7690e1b5d4 Fix --template-file
Fixes #47

The code that causes the URI TOO LONG error is in eventlet.wsgi.

So for the time being we're replacing that with paste.httpserver which serves
WSGI apps, too.

Longer term, we want to use eventlet but they need to make the maximum URL
length configurable.
2012-04-04 19:28:47 +02:00
Chris Alfonso
589eaa75e4 Removing OpenStack LLC copyright 2012-03-28 12:50:49 -04:00
Ian Main
622bb9a702 A few cleanups and some comments. Nothing major.
Signed-off-by: Ian Main <imain@redhat.com>
2012-03-22 17:37:17 -07:00
Tomas Sedovic
53859a38ca Display message on heat-api and heat-engine startup
When a Heat server is started, the user will now see a message that says so and
shows the port number the server uses.
2012-03-21 16:41:54 +01:00
Angus Salkeld
82888427f3 Move the default port number into common.config
It was defined in multiple places.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-16 10:12:45 +11:00
Angus Salkeld
0f6375a931 Change the default port references to DEFAULT_PORT
If we need to change it again then this will make it easier.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-16 09:05:20 +11:00
Angus Salkeld
3b9c41fb6c Initial commit (basics copied from glance)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-13 21:48:07 +11:00