This change ensures that api services deployed with apache+uwsgi
by default with devstack. User can still deploy apache+mod_wsgi
by setting WSGI_MODE=mod_wsgi in local.conf.
Using HEAT_USE_APACHE=False or HEAT_USE_MOD_WSGI=False
(for backward compatibility) would deploy the services
without apache.
Change-Id: Ia5e28e2987b4aeab6c049a3bde3a956204ddc5d9
Depends-On: I3b77aafc6104119503363e5db36b0379964daba5
Tests should use:
self.assertIn(value, list)
self.assertNotIn(value, list)
instead of:
self.assertTrue(value in list)
self.assertFalse(value in list)
because assertIn and assertNotIn raise more meaningful errors:
self.assertIn(3, [1, 2]
>>> MismatchError: 3 not in [1, 2]
self.assertTrue(3 in [1, 2])
>>> AssertionError: False is not true
Change-Id: I4b24b6e00bf26c0a68a9d8f9eb9185c435791dfc
Closes-Bug: #1510007
Use parentheses instead of backslash for line continuation.
Plus, usage of escaped quotes in long strings is avoided where it makes
sense.
Change-Id: If2e78012b85a4430c6f03f65784cac2d032cf116
This returns stack_name/stack_id, which is the form that needs to be
used with heatclient to avoid doing an extra stack lookup API call.
See the next change in this series to see this in use.
Change-Id: I41dcb732d36d702b7583b5e877fd074f86445a03
Related-Bug: #1291097
Some tests used incorrect order assertEqual(observed, expected).
The correct order expected by testtools is
assertEqual(expected, observed).
This patch includes roughly half of the files touched by these changes
(up to and including test_m* sans contrib code) to ease the review.
Partial-Bug: #1259292
Change-Id: I44bff827c7c50726d48aa649b7685712a233ee62
If you are using a public Heat you can use the event ID in
'heat event-list' to measure how much activity the service provider
has in their heat installation.
To avoid this, the Id column of the Event table was changed from
autoincremental integer to a uuid.
Added some unit tests in order to ensure that events with integer or
uuid id pass through the API, since we have a migration which will
leave behind integer ids.
Change-Id: Ib3eddb700738cb3667c72977a9a5011209acd6d7
Closes-Bug: #1249159
when set template use non-english resource_name and execute
"heat -v resource-list $stack_id". KeyError will occur because
heat can not encode it correctly. This patch will implement
a process to encode the resource_name.
The patch use a new module (strutils.py) taken from
oslo-incubator in order to use safe_encode() and
safe_decode(), and this module is useful for future
patchs.
Change-Id: Idddda20d96bca32cb4df94ede31b40f7141e3afe
Closes-Bug: #1249238
This is stricter, but also provides plumbing for more advanced things
like fixtures and testscenarios.
Change-Id: I607b50390708ca3caa9799ef0b27007df5045a6c
Some simple cases that do not use mox still use unittest directly.
Replacing unittest.TestCase with HeatTestCase has the added benefit of
capturing all logging for reporting during failure.
Change-Id: I76192bdb91822055f1e2f7d2e806bf094d399304
Remove SHDEBUG line which I accidentally left in test_identifier.py
Change-Id: Ic965958e28b1c825408ce5ff44ced1398663bcb0
Signed-off-by: Steven Hardy <shardy@redhat.com>
Lots of (mostly whitespace) cleanups to align all the unit test code
with pep8 v1.3.4
ref bug 1092057
Change-Id: I5c847f20b3516af3dd3d7211b0fc697c59bf914c
Signed-off-by: Steven Hardy <shardy@redhat.com>
This doesn't actually work and is not universally present, so get rid of
it. Tests are run through "nosetests", which does actually work.
Change-Id: Ib2d1e857e0aef4eab5fd75ffb1a498d8e9186c01
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Ensure that creating an Identifier with a slash in either the stack name or
the resource name results in an immediate exception.
Change-Id: I79121a26009b5b7b3eee994f98ba802b239f5f12
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Add method to create a HeatIdentifier from a URL containing an ARN
ref bug 1087799
Signed-off-by: Steven Hardy <shardy@redhat.com>
Change-Id: Ie325de9105e85dbf9fd12be5e7b8c3d055e77795
It is used by both the engine and the client APIs, so it doesn't belong in
the engine.
Change-Id: I45306fd8293d1d859fde5fda9cdcf5fb0588aa2d
Signed-off-by: Zane Bitter <zbitter@redhat.com>
We now use the equivalent functionality from openstack-common.
Change-Id: I915cdb92b89d3548fa03e1820d8b90b2aac4e44b
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Enable the resource name to be retrieved from an object. Also allow a
ResourceIdentifier to be constructed from only the data passed through the
RPC API. This means we can use a single format for identifiers, but still
be able to extract important information such as the stack identifier and
resource name.
Change-Id: Ie9122cb1a835b30eb8e0713a9d5cdcb4a386eda7
Signed-off-by: Zane Bitter <zbitter@redhat.com>
So far only access to stacks (not resources and events) is implemented.
Change-Id: I9655e9441087ef60c06e67e2d6ae68ec4a3b2d11
Signed-off-by: Zane Bitter <zbitter@redhat.com>