1915 Commits

Author SHA1 Message Date
Steve Baker
e376c83cbd Test coverage for NestedStack, and fix FnGetRefId
NestedStack now has 100% coverage. resource_id is now set during create
instead of evaluated during FnGetRefId

Fixes: Bug #1131534
Change-Id: I21966acc711a801d28a8a22c377758d2363dd096
2013-03-06 13:37:27 +13:00
Angus Salkeld
dcb3f2aa81 When updating the metadata load the stack with the stored context
bug 1144996
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>

Change-Id: I2b0547f4867f19f8319e2c4b79ac325ae8cd6bd8
2013-03-06 09:45:56 +11:00
Steven Hardy
d3b8dc89b4 add missing licence header
Change-Id: I95d883c7c58ecba925bc6fa41d7a9491b18a55fa
2013-03-05 18:48:07 +00:00
Steven Dake
8634e15ca1 Stop heat services from logging to stderr by default
Change the configuration files to set use_stderr to False by
default.  Oslo's log sets use_stderr to True by default, and
the only reasonable way to override is via the config files.

Change-Id: Ibc4ac3b8cb5d7478260d5d014eb48860bae4bc0b
Fixes: Bug #1146848
2013-03-05 09:01:56 -07:00
Jenkins
0a19b19fde Merge "Make sure we have a volumes property before trying to use it" 2013-03-05 15:10:23 +00:00
Angus Salkeld
d817ec2f7f Make sure we have a volumes property before trying to use it
bug 1146742
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Change-Id: I2d56af0b07f544642e0527a8300db842d2bc0268
2013-03-05 23:44:54 +11:00
Angus Salkeld
431456d08e Prevent shadowing of the "context" module/parameter
Keep the module name true.
part of bug 1144996

Change-Id: Idb8c5a8190bbb7f81d70c1a95bf5352791f87693
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-03-05 22:46:06 +11:00
Angus Salkeld
9a682de2f1 Fail validation when an unknown property is supplied in a template.
bug #1101098
Change-Id: I9430ad859e9a93d6c0d2a417877e02c151e98a05
2013-03-05 22:17:12 +11:00
Jenkins
244f1930e4 Merge "Validation failures now raise StackValidationFailed" 2013-03-05 08:47:38 +00:00
Jenkins
1e5f05232f Merge "vpc_test: move DependsOn to the correct template section" 2013-03-05 02:09:00 +00:00
Steve Baker
cadcf10ac3 Validation failures now raise StackValidationFailed
This changes the way validation failures are presented
to heat-cfn as per bug 1072939

Change-Id: Iddaaf0c83c5d0df7c0143c6805096a83f8e5dc51
2013-03-05 15:07:24 +13:00
Jenkins
37d3981eff Merge "Add N802 rule to hacking.py" 2013-03-05 01:43:51 +00:00
Jenkins
1e6d4ceb6f Merge "Create autoscaling instances in parallel" 2013-03-05 01:40:03 +00:00
Jenkins
89dcb6b050 Merge "Separate public/private autoscaling adjust() APIs" 2013-03-05 01:39:55 +00:00
Jenkins
e9beca4cf2 Merge "Move instance polling into check_active()" 2013-03-05 01:36:15 +00:00
Jenkins
4f4e948e3e Merge "Use oslo logging setup." 2013-03-05 01:16:01 +00:00
Angus Salkeld
e9cba1bb0a vpc_test: move DependsOn to the correct template section
found when fixing bug #1101098
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>

Change-Id: I7591111bcdf768119d265d0a9c901a0e189604d3
2013-03-05 11:49:12 +11:00
Steven Hardy
d02b0889c6 heat clients : Make heat-boto rollback disabled by default
The boto library always sends the DisableRollback parameter,
defaulted to False, which is the opposite of the engine
default now, so we have to set DisableRollback to True in
the boto client wrapper

ref bug 1131303

Change-Id: I4acbba7b37f24cb1a874292ff2323ae24b630edf
2013-03-04 20:48:54 +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
Steven Hardy
7f9d593c98 heat engine : Disable stack rollback by default
Until the event-persistence BP is implemented, we should
disable stack rollback by default and make it opt-in.

fixes bug 1131303

Change-Id: I101e108c3959c4b7b4cfc68449ba2b989b157626
2013-03-04 20:48:05 +00:00
Steven Dake
137f9c0ad2 Add N802 rule to hacking.py
Gate on commit headers < 50 characters

Change-Id: Ia6a616d8a9b0eabca05a23476e284f261108b43a
Fixes: Bug #1136386
2013-03-04 11:20:31 -07:00
Steven Dake
78e975eaf1 Add pyflakes to test-requires
pyflakes needs to be installed in the venv

Change-Id: Ie7aada13da4e191108363c80daf719212d06d316
Fixes: Bug #1131275
2013-03-04 10:17:15 -07:00
Steven Dake
7ffeadc54b Remove unused import from test_nokey.py
test_nokey.py was recently merged into the source tree with an
unused import (copy.py).

Change-Id: I27b7040b5719ea21d1e0a79afe499bf7fa5a94e5
Fixes: Bug #1131275
2013-03-04 10:17:15 -07:00
Zane Bitter
8dfd53db24 Create autoscaling instances in parallel
Fixes bug #1136148

Change-Id: I02ea52df85c4ed7f0f16abcfd1ab24b35168a787
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2013-03-04 11:38:39 +01:00
Zane Bitter
a2292edf96 Separate public/private autoscaling adjust() APIs
Internal uses of adjust() have slightly different needs.

Change-Id: Ibb85425f08b7b2d78be2d9ef5c8a9f464b7eead1
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2013-03-04 11:35:36 +01:00
Zane Bitter
13223e8fba Move instance polling into check_active()
Don't poll for the instance status in handle_create(). Allow
Resource.create() to poll the resource using check_active().

Change-Id: I13a8fefcef6594d014e7e5a3131f9342521e367d
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2013-03-04 11:32:58 +01: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
Jenkins
c4248dd0d7 Merge "Add breaks to for loops" 2013-03-03 20:25:43 +00:00
Zane Bitter
d16622c6ec Split resource create into create and check_active
Change-Id: Ib8206f204e8805936defaa3431ecdf34b161e724
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2013-03-01 17:12:54 +01:00
Zane Bitter
a2c2e6798f Fix unit tests for Instance IP
Don't try to test the IP addresses after the instance has been deleted.

Ref bug #1091497

Change-Id: I566c26a4707edc9d210bd422dcff8fbbcc2236d5
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2013-03-01 17:12:54 +01:00
Jenkins
4afe5f3e50 Merge "Remove unused import from loguserdata.py" 2013-03-01 16:12:22 +00:00
Jenkins
d7c29c8796 Merge "Fix Unrecognized Attribute admin_state_up Error" 2013-03-01 16:11:06 +00:00
Zane Bitter
7f1bb4a3f5 Fix flaky unit test
This was failing intermittently during the gate tests because there was no
dependency in the template for the Instance on the WaitConditionHandle, nor
for the WaitCondition on the Instance, so the order in which resources
would be created was somewhat random.

This patch fixes the test template, and tests updating the metadata should
occur *during* creation of the stack, as well after, to replicate a real
wait condition (which won't finish creation until the metadata update
occurs).

Change-Id: I26b5590a9ee90d205bd9f2e31bcb74e68065ac25
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2013-03-01 15:24:19 +01:00
Jenkins
8147ce785e Merge "Allow heat to be used without a KeyName set." 2013-03-01 10:49:01 +00:00
jiangwt100
ad1a5a8a26 Fix Unrecognized Attribute admin_state_up Error
Bug #1135485
screen-h-eng
Error message: {"QuantumError": "Unrecognized attribute(s) 'admin_state_up'"}

Change-Id: I4668b0603e0deab85e416d9cec5617f17eaa2aea
2013-03-01 13:19:07 +08:00
Ian Main
a7d22ff1e2 Add breaks to for loops
This just adds breaks to a couple of matching for loops in instance.py.

Fixes: bug #1130898
Change-Id: Iacfa040ba3a400b506e4fbc63c513eb3e67ecb11
2013-02-28 18:05:23 -08:00
Steven Dake
bb65fee164 Remove unused import from loguserdata.py
Change-Id: I0bdf8a51e0d21533c5ce8148cdffcbc92f89fef9
Fixes: Bug #1131275
2013-02-28 17:15:52 -07:00
Ian Main
74d2df9d95 Allow heat to be used without a KeyName set.
This patch lets you start an instance without setting the KeyName, which
I gather is allowed in ec2 as well.

This revision adds a template and test.

Fixes: bug #1129394
Change-Id: I667f373b73479caa506ee49d8d1615ff4aad47ed
Signed-off-by: Ian Main <imain@redhat.com>
2013-02-28 16:03:07 -08:00
Angus Salkeld
c538c6b6e4 Do a metadata refresh after an explicit metadata write.
if we have a template with (logically) the following:
instance2:
   metadata
     GetAtt waitcond.data

waitcond:

when the waitcond is fired, it updates the metadata but it needs a call
to update the references in "instance2's" metadata.

bug #1135229
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Change-Id: I1a6af9112ba100b17075063f59165b448d6a11f4
2013-03-01 09:40:59 +11:00
Jenkins
83457be86a Merge "Make the exception string a little more useful" 2013-02-28 20:55:38 +00:00
Steven Dake
d640718167 Gate on certain pyflakes failures
To prevent recent gating problems from typos, an
import not used and redefinition of function problems in
the source code have become gating.

Fixes: Bug #1131275
Change-Id: I7011f3ac5940afc70c38758e67a2222a66e625c3
Signed-off-by: Steven Dake <sdake@redhat.com>
2013-02-28 20:21:02 +00:00
Steven Dake
2358f6d5bc Remove unused imports from repo in preperation for pyflakes
Lots of unused imports

Fixes: Bug #1131275

Change-Id: Iacb1d02173b0ec0e0dc81aff84ca6e29e60e2934
Signed-off-by: Steven Dake <sdake@redhat.com>
2013-02-28 20:20:50 +00: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
Steven Dake
637740a4f1 Update infrastructure to more closely match other OpenStack projects
This patch imports nova's HACKING.rst guidelines altered for Heat.
This patch imports nova's run_pep8.sh with some minor alterations.
This patch imports nova's hacking.py extensions to pep8.

This patch places the run_pep8 logic in a separate file rather than
having it spread between tox.ini and run_tests.sh.  The HACKING.rst
requirements as well as general pep8 requirements are then enforced
with run_pep8.sh.

Avoid running once the N802 rule until dependency changelogs are
less then 50 characters.

Change-Id: If46c14668eae3cf11b8fbff46d766cc589d701aa
Fixes: Bug #1131275
2013-02-28 20:18:01 +00:00
Jenkins
52fc9ac812 Merge "heat clients : make boto client library pass disable_rollback" 2013-02-28 19:34:29 +00:00
Jenkins
259295a9fa Merge "heat engine : fix hardcoded DisableRollback value" 2013-02-28 19:27:19 +00:00
Steven Hardy
af3e5035d9 heat engine : fix hardcoded DisableRollback value
Engine API should return the real state of rollback now we
implement it, not hard-code to True

fixes bug 1135963

Change-Id: I6b9e6ea9587fe0c84b57f34bf69c2dcec5d5c09f
2013-02-28 16:14:35 +00:00
Steven Hardy
6bdebc59ba heat clients : make boto client library pass disable_rollback
Make the boto_client.py wrapper correctly interpret the DisableRollback
argument, so the --disable-rollback option of heat-boto will work

fixes bug 1131283

Change-Id: If31daa1583ff836fbb3f67799b89602b16f904e3
2013-02-28 16:07:09 +00:00
Steven Hardy
d308040850 heat tools : openstack script install mysql via openstack-db
Don't install mysql-server in tools/openstack, instead allow
openstack-db to non-interactively install it for us, which means
the root password is set as per the -r password option when
installing on a fresh system with no mysql

NOTE : if testing this on a system which has had mysql installed,
do yum remove mysql-server && rm -fr /var/lib/mysql or the
reinstalled mysql will use the old credentials

fixes bug 1133502

Change-Id: Ie3ba56e5f971e032be4f099e81cbb24afe76dfbc
2013-02-28 15:13:48 +00:00
Jenkins
1d31ef47b5 Merge "Removes unused config settings from heat-engine.conf" 2013-02-28 13:57:46 +00:00