237 Commits

Author SHA1 Message Date
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
Shane Wang
8a688c0aaa Fix misspellings in heat
Fix misspellings detected by:
* pip install misspellings
* git ls-files | grep -v locale | misspellings -f -

Change-Id: I554143f00fe82154472e7eb6391291730dd3ddd4
Closes-Bug: #1257295
Closes-Bug: #1277515
2014-02-11 08:29:37 +08:00
Matt Riedemann
84e1942f0b Create heat database with default character set utf-8
The heat-db-setup script wasn't creating the heat database with default
character set utf-8 which can cause the migrations to fail.

Closes-Bug: #1276880

Change-Id: I35861af66d70314285fa76bb148e403aeea4b654
2014-02-05 17:26:25 -08:00
Jenkins
8e7a86dd7e Merge "Fix heat-keystone-setup error when try to create heat user" 2014-01-15 18:48:25 +00:00
Jenkins
4b5140bfe7 Merge "Fix get_column_num problem in heat-keystone-setup" 2014-01-11 18:51:19 +00:00
Jenkins
6cfa424002 Merge "log warning, when $SERVICE_HOST is localhost" 2014-01-10 20:21:48 +00:00
jufeng
02f3d70235 Fix heat-keystone-setup error when try to create heat user
Unset OS_SERVICE_TOKEN and OS_SERVICE_ENDPOINT temporarily to make
sure this command can run even if the OS_SERVICE_TOKEN and
OS_SERVICE_ENDPOIN exist in shell environment.
Remove die_if_not_set in get_data function, because there maybe no
data in get_data function, for example, if the heat user does not
exist, the die_if_not_set will be in error.
Remove die_if_not_set after keystone user-list for the same reason.

Change-Id: I132f975ac2da21e6ad7431ae326ad9bd538e4696
Closes-Bug: #1266670
2014-01-09 16:01:02 +08:00
DennyZhang
19948b1561 Fix get_column_num problem in heat-keystone-setup
get_column_num function searches the second line of command output,
to get the field number for a specific field.

But output of 'keystone user-list' may have an extra line: 'WARNING:
Bypassing authentication using a token & endpoint ...'

This messes up the functionality of get_column_num function

Closes-bug: #1260556
Change-Id: I8c6e7f939466154c5e31e6f019e20fb855e15878
2014-01-02 18:51:55 -06:00
DennyZhang
6cb6d30bc0 log warning, when $SERVICE_HOST is localhost
Warn users, if heat-keystone-setup can only use localhost as $SERVICE_HOST.
And remove an extra whitespace.

Change-Id: I1b2a1b93212b6ab0ca092bb6c834255ee75176ca
2014-01-02 10:59:04 -06:00
DennyZhang
88b8e20f1c add assertion to heat-keystone-setup script
Defensive check for various critical steps in the script

Change-Id: I9df01011940d80532787c3acaf0cc8ec10e97cc8
closes-bug: #1260561
2013-12-19 11:06:53 -06:00
Angus Salkeld
5f0faff409 Only log to console in heat-db-setup
Make sure heat-manage does not use heat.conf logging
in the heat-db-setup script as the logging directory
might not be setup yet.

Change-Id: I16db3fde1c7bfe5f027c77f2a25ffa2104d15491
Closes-bug: #1191925
2013-10-29 08:26:40 +11:00
Alexander Gordeev
4582a1a0dd Migrate to Oslo DB 96d1f887dda Part 3
Oslo version 96d1f887dda21b43ba4376187f31953dee6f5273

This commit just migrates Heat to new db related code from Oslo

Partially implements blueprint oslo-db-support

Change-Id: Ib0de40a70857fb3e029a2282f06746269a628c71
2013-10-09 13:13:30 +04: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
ae28bf4c89 Remove references to the multiple config files
Only refer to heat.conf in the docs and scripts.
For install.sh copy the iniset() function from devstack
to assist in setting some semi-sane defaults.

Change-Id: I933891e35103c003f1272bc89c7b42d2ad76697b
2013-09-02 10:43:21 +10: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
Steve Baker
34e47b64d9 Move heat-cfn, heat-boto, heat-watch to new repo
The new home for these tools is
https://github.com/openstack-dev/heat-cfnclient

These tools are now aimed at heat developers only
and they will not be released or packaged.

Change-Id: I1ea62ef17e81ab53cacb5e4940f0c4e2516ed383
2013-08-13 12:26:43 +12:00
Steve Baker
e24a3a496a Fix H231 Python 3.x incompatible 'except x,y:'
This is triggered in the pep8 check when using the syncronised
requirements versions.

Change-Id: Ie73c44b85025f79e7358303fab2697e076f7cabf
2013-08-08 14:10:57 +12: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
Julien Danjou
f2ef092d8c Update oslo.notifier and always register options
This avoids registering multiple times the option if the registering
functions are called multiple path by different code paths. It's
necessary for the default configuration sample generator to have options
only registered once.

The update of oslo.notifier is needed to avoid it using the inexistant
$host option.

Change-Id: If31974d7ef7fdbf85a88e950ff06c60ccbd6c31d
Signed-off-by: Julien Danjou <julien@danjou.info>
2013-07-11 15:45:52 +02: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
Jenkins
9db6e2a77f Merge "Adds possible topdir to python search path" 2013-06-11 11:40:42 +00:00
Jianing YANG
3af83c9429 Adds possible topdir to python search path
Change-Id: Ide47656071c6d17482b1e4ec0727ce316033e702
Fixes: bug #1189354
2013-06-10 15:45:43 +08:00
Attila Fazekas
4fed4a028a Initial mariadb support
mariadb only differs in the package name from the mysql,
an already installed mariadb should not cause hangup in a
devstack installation.

Fixing Bug 1184722

Change-Id: I3b9d02b703e49044999ff1b9f1195ffcaf1d0cec
2013-06-09 06:36:42 +02:00
Angus Salkeld
126bf9f28c Add a basic heat-manage
The heat/cmd/manage.py structure is copied from glance to give
us some consistency.

Removing unused cliutils ...

blueprint heat-manage
Change-Id: If3b69eb4c3672740515fd308ec868af1cd3c9396
2013-05-27 21:06:31 +10:00
Dave Wilde
1c8f3bf2c6 Adds sudo check for privileged operations.
Adds root user check to determine whether or not sudo is required
for MySQL status and installation.  We now run sudo -l to verify
that the user is in the sudoers file, the credentials are then
cached for the rest of the operations.

bug 1181701

Change-Id: I294b269046ee2049b0fdee3c871096387cefbf24
2013-05-20 06:18:33 +00:00
Jenkins
8c80441ded Merge "Cleaned up some simple hacking/pyflakes errors." 2013-05-16 17:39:24 +00:00
Monty Taylor
5ea0c0e2be Cleaned up some simple hacking/pyflakes errors.
There are set of trivial changes that involved missing imports or unused
code. No functional changes should be evident.

Change-Id: If020e33674627845ea78192382bdf8977b442931
2013-05-16 09:11:15 -07:00
Jenkins
2d8a4b7cec Merge "heat-cfn : Make error with missing auth details more obvious" 2013-05-14 12:05:35 +00:00
Stephen Sugden
3f2c04a8ee Use hostname from env in heat-keystone-setup
Prints a warning if the endpoints are going to be registered as localhost URIs.

Change-Id: I32efcf826f400ca2763cb5758dce02ffdbdb9ae1
2013-05-13 14:25:16 -07:00
Steven Hardy
43d54ba5ad heat-cfn : Make error with missing auth details more obvious
Exit with an error message describing the missing auth details
instead of failing with cryptic "Name or service not known" error
when credentials etc are missing

fixes bug #1154759

Change-Id: I19c22357526c73e824a2b2bb9f862c8724a8ebba
2013-05-10 10:44:23 +01:00
Steven Hardy
2db9b282a0 heat engine : register options before using them
Fix regression caused by the __init__.py refactoring, which means
we try to use cfg.CONF.host before registering it.

fixes bug #1174302

Change-Id: Iff4d75f53e242d7df8c7071cbeeead034a7ad9b0
2013-04-29 14:21:35 +01:00
Mark McLoughlin
117e73ba57 Remove engine_topic configuration option
Fixes bug #1173575

This is currently broken since heat-engine always listens to the
'engine' topic and there isn't actually a good use case for this to be
configurable, so let's kill it.

Change-Id: I35c0292c921f81857f80a7f111df5ac330d54ecf
2013-04-27 13:27:26 +01:00
Zane Bitter
16cd2030aa Use internal DB management
Use our own internal code for managing database migrations, rather than
calling sqlalchemy-migrate's command line directly. This allows us to
automatically specify the initial version of the database, which is
required in order to be able to squash migrations (bug 1072949).

Change-Id: I88206f8b55fe6fe4016cee8e5bf1d5eeb0ae30d2
2013-03-12 10:03:37 +01:00
Steven Hardy
2e000a6d28 heat clients : make --host option error for heat-boto
The --host option cannot work for heat-boto, so print a helpful
error if the user tries to use it.

ref bug 1102101

Change-Id: I63129b314eabd7bc84647efb96e9f10b1963b8b2
2013-03-07 12:12:42 +00:00
Jenkins
4f4e948e3e Merge "Use oslo logging setup." 2013-03-05 01:16:01 +00:00
Steven Hardy
0aea9429bf heat clients : Change --disable-rollback to --enable-rollback
Since the engine default is now rollback disabled, flip this
switch so the user can opt-in to rollback functionality via
the --enable-rollback cli option to heat-cfn/heat-boto

ref bug 1131303

Change-Id: I3965de9a2beb510d5623d0c7cd8ff3aea9d4364a
2013-03-04 20:48:54 +00: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
Steven Dake
eea4a6d16d Add heat-watch to pep8 checks
heat-watch was missing from pep8 checks in the past.  Tidy up heat-watch
and add to run_pep8.sh.

Change-Id: I36680b24ee90a5daeb7f8d7418b665a215026325
Fixes: Bug #1131275
2013-02-28 20:20:04 +00:00
Jenkins
a3daa3fd99 Merge "Use oslo-config-2013.1b3" 2013-02-21 08:49:28 +00:00
Steven Hardy
df6bd799da heat cli : Add --disable-rollback option to heat-cfn
When rollback is implemented it will default on, like aws
so this option allows stack rollback on create to be disabled

blueprint stack-rollback

Change-Id: I02fcaaa656219b1c65729cecdd473e0a5bd86036
2013-02-18 20:21:10 +00: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
sdake
b9ed62c6b4 Escape awk + sign so heat-keystone-setup works on Ubuntu 12.04
plus sign needs escaping

Change-Id: Ia03f1eb213c806d13e88a435023ede8511ddfa4f
Fixes: bug #126723
2013-02-15 16:25:34 -07:00
Jeff Peeler
0a37f56972 Change install scripts to use cinder
Fixes bug #1073164

Change-Id: Id483b028d19dbbc30984299120b87fd020f19903
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
2013-02-04 14:33:36 -05: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
Steven Hardy
55c90321b4 openstack/common : rebase to latest oslo
Rebased to latest oslo, now at 8837013, note a few interfaces
changed requiring a some tweaks to the heat code

Change-Id: I7dfc634b7c459edebca19dee522b396e3736aecc
Signed-off-by: Steven Hardy <shardy@redhat.com>
2013-01-18 15:31:45 +00:00
Steven Hardy
c1bf924c0f heat cleanups to align with pep8 1.3.4
Lots of (mostly whitespace) cleanups to align all the non-test code with
pep8 v1.3.4

ref bug 1092057

Change-Id: I444b288444dba4ec1da5854bd276d091c06d8489
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-12-20 09:26:16 +00:00
Zane Bitter
f531f6fb28 Get rid of unused imports
This cruft just tends to build up over time...

Change-Id: I61fd067b431aaa57164c7ff781c9cc8bab04bd4b
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-12-13 16:04:30 +01:00
Zane Bitter
5ef68bbc45 Move the cfn client code to a subpackage
This will make packaging easier.

Change-Id: I8e0f0a3d85bdf073a3b3272f920ad60f27e929e3
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-12-13 11:25:23 +01:00
Steve Baker
f24a2c27c5 Eventlet monkey-patch heat-api-cloudwatch.
Tested by getting responses from cloudwatch, but not with a full
end-to-end cloudwatch validation
Change-Id: I2d81adc8e63b9be7dec02083509ab706ae0c5a7f
2012-12-11 10:20:41 +13:00