Refer to:http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises
[H203] Use assertIs(Not)None to check for None (off by default) Unit
test assertions tend to give better messages for more specific assertions.
As a result, assertIsNone(...) is preferred over assertEqual(None, ...)
and assertIs(None, ...)
Change-Id: I7a73aa1766aefe3920fe0c80717cc7f6733c2d36
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
From the following sentence,the environment status has DEPLOYING or
DELETING status,but the environment status of log information only
include deploying status.
if env_status in (states.EnvironmentStatus.DEPLOYING,
states.EnvironmentStatus.DELETING):
Change-Id: Id48e69dec671ef31b87ec803667e69f9b906b17f
String interpolation should be delayed to be handled by the logging code,
rather than being done at the point of the logging call.
Ref:http://docs.openstack.org/developer/oslo.i18n/guidelines.html#log-translation
For example:
# WRONG
LOG.info(_LI('some message: variable=%s') % variable)
# RIGHT
LOG.info(_LI('some message: variable=%s'), variable)
Change-Id: If8d36220a9370b304ae51a329f8bba370285fdc2
The Log "LOG.error(_LE(...)" is used in some places,
but the log "LOG.error(_(..))" still used in a few places.
Change-Id: Iafc6336622ace16dbd3c3360c479b58c0ab7a333
Murano uses 1 RMQ queue per agent + 1 queue for agent
listener. Listener queue is declared upon listener startup
which happens when the first agent command sent.
The agent queues were created by explicit call to Agent.prepare()
which was done from Instance.deploy() method.
This creates a problem if RabbitMQ server is restarted after deployment,
all non-persistent queues disappear and then an action get called. If
that action is not calling Instance.deploy() (because it assumes instance to be
deployed by that time) and sends a command to an agent it will never be
received.
This commit removes explicit prepare() method. Now the queues are going
to be created on demand, similar to listener queues do.
Change-Id: I21ae1efd483f32bb7c8e3dc1849af656b3bed56f
Closes-Bug: #1645419
Added an ability to retrieve information about the current user,
current project, environment owner (both user and project)
from keystone. Appropriate information (including
extra fields but excluding internal system data) is fetched from
Keystone using the same service credentials that are used to validate
tokens, create trusts etc.
- io.murano.User and io.murano.Project classes were added.
- Both classes have 2 static methods to get current and environment
owner object of appropriate class
- Object model now contains project_id/user_id of the user who
created the environment
- Deployment task contains project_id (renamed from tenant_id)
and user_id of the user who initiated the deployment
Change-Id: Ic7e24c1d2b669ed315851047bcdb27e075cfc56b
This reverts commit df8bf9c8f85fb1c1aa27c803a78868f54a42e1ea.
That patch renamed keys of the configuration properties of the
keystone_authtoken settings group, thus breaking config file
compatibility.
Change-Id: I8fd3b3211e75207cf6061eef6f038ea045d9dbfe
Improve asynchronous push mode of HeatStack:
- Use spawn_after instead of spawn_after_local. Otherwise the data is never
pushed if the initiated thread were to exit
- Cancel background thread instead of killing it. Cancel cancels the thread
only if it hasn't started yet instead of killing it somewhere in the middle.
- Add post-execution cleanup to guarantee that async data push happens
before the execution session end
- Make Instance destruction use async push to speed up the destruction
in case when there are many servers and to test the HeatStack async mode
Closes-Bug: #1643702
Change-Id: I11d157844cb1d973d2cac62c2e6d67d047f75164
we don't have to def ensure_tree, because Oslo.utils 1.8
provides the function and just use it.I also deleted the
code in tests/unit/.
Change-Id: I61e9d87e6dde5b7a52e7b6399f4be6e8d5fca340
'oslo_utils.timeutils.isotime()' is deprecated in version '1.6' and
will be removed in a future version: use datetime.isoformat() instead.
Change-Id: I7ac6508510bc0fa131368c27dd8fdcababc37d0b
Closes-Bug: #1514331
Previously, list packages with parameter 'search',
search content in any attributes, but packages are unordered
With this change, packages are ordered.
Such as: list package with 'search=mysql'
the packages whose name like 'mysql' are ahead of others
whose afn like 'mysql',and so on
Change-Id: Iecc3038ac40e731788975cff0cdf7d42e7f97112
Closes-Bug:#1467487
Before this patch debug output was excessive.
Now print the line log if wsgi.url_scheme differ and
Change-Id: I925a7dd0844dfa76696b75e9f818d1bb47b34928
Closes-Bug: #1605806
Skipped test_deploy_app_with_volume_creation_from_backup test
Tempest integration test is failing for volume creation from backup
(reported as bug #1634876). To unblock the gate the appropriate test
is skipped for now while the bug is being investigated.
AgentListener unit test didn't properly override configuration, so in
some circumstances it could be executed with the disabled murano agent
which was leading to errors.
At the same time AgentListener itself contained some legacy code
leading to under-initialized state in case if the listener was
disabled in config file.
Related-bug: #1634876
Change-Id: I5642b8017c61f77afb68463ba8eb3906eeae7225
Closes-bug: #1634483
Now murano can not auth when only using keystone v3,
this commit update the devstack config to fix with keystone v3.
Closes-bug: #1633394
Change-Id: Ie6a2ccdf6121b3badd403a1c08f1e91052e8c4dc
Please note the comment in test_update.
The functionality this test tests for appears
to be incorrect. That is, it looks as if
test_update should update the host for the
Statistics object that is passed in, but
does not. Instead, it simply saves the
Statistics object that is passed in.
Thus, the function being tested appears
to contradict its intended use case.
Implements bp: murano-unit-test-coverage
Change-Id: Ie6a07ef5c0f345dbb4bbb93defb36b2549697a97