1226 Commits

Author SHA1 Message Date
Jenkins
3d7159ec6d Merge "Add log translation marker" 2016-12-13 03:19:51 +00:00
chenaidong1
d94be5a959 Use assertIsNone(...) instead of assertIs(None, ...).
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
2016-12-08 08:09:56 +00:00
Jenkins
9a8b0d6f0a Merge "Replace six iteration methods with standard ones" 2016-12-08 02:25:04 +00:00
Jenkins
40d179c414 Merge "modify print information" 2016-12-08 02:23:53 +00:00
chenaidong1
77fc44cdad Add log translation marker
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
2016-12-08 01:56:07 +00:00
chenaidong1
cfb99dd9db modify print information
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
2016-12-07 08:36:08 +00:00
chenaidong1
155f747a66 Modify variable's usage in Log Messages
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
2016-12-06 09:13:14 +00:00
LiuNanke
2506030cf1 Replace six iteration methods with standard ones
1.As mentioned in [1], we should avoid using six.iterXXX
  to achieve iterators. We can use dict.XXX instead, as it
  will return iterators in PY3 as well.
2.In py2, the performance about list should be negligible,
  see the link [2].

 [1] https://wiki.openstack.org/wiki/Python3
 [2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: If90a56fad941e4bb55da1e9f14a8133983efc027
2016-12-01 16:07:09 +08:00
gengchc2
9e8930d3fd Translate info-level log messages for LOG.error
The Log "LOG.error(_LE(...)" is used in some places,
but the log "LOG.error(_(..))"  still used in a few places.

Change-Id: Iafc6336622ace16dbd3c3360c479b58c0ab7a333
2016-12-01 03:02:42 +00:00
Jenkins
aab84fbb2f Merge "Fix syntax errors of the comments" 2016-11-30 15:35:41 +00:00
Jenkins
1f58ddab56 Merge "Fix a typo" 2016-11-29 13:14:09 +00:00
Stan Lagun
53abad42ab Always declare agent RabbitMQ queues
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
2016-11-28 20:29:09 +00:00
Jenkins
edf6394dbe Merge "Ability to retrieve current/owner user/project" 2016-11-26 04:48:32 +00:00
Jenkins
6370ec34ba Merge "Fix syntax errors of exception print" 2016-11-25 07:10:58 +00:00
Jenkins
81f14a4537 Merge "Increase unit test coverage for common wsgi" 2016-11-25 04:31:35 +00:00
chenaidong1
13452e069e Fix syntax errors of exception print
Change-Id: I628a225b1df7be8aeb23d35f490a7caf5de6daef
2016-11-25 12:09:55 +08:00
chenaidong1
686e85476c Fix syntax errors of the comments
Change-Id: Id6eadb991b2d0ad7a8416b1137767b251d4a23d7
2016-11-25 03:29:06 +00:00
Alexander Tivelkov
81eebd12ad Ability to retrieve current/owner user/project
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
2016-11-24 02:07:34 -08:00
Alexander Tivelkov
3a18488cf4 Revert "Update devstack keystone_authtoken config to fit with keystone v3"
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
2016-11-23 15:52:01 +00:00
Stan Lagun
a19a66707b HeatStack async mode fix
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
2016-11-22 16:02:12 +00:00
chenaidong1
bf4d27c1da Fix a typo
Change-Id: I789147df313bad9f28b78c774a0d5d1c493524bd
2016-11-21 12:00:05 +08:00
Jenkins
37cceebb76 Merge "Use method ensure_tree from oslo.utils" 2016-11-15 04:41:55 +00:00
David Purcell
0a9bfce472 Increase unit test coverage for common wsgi
Implements bp: murano-unit-test-coverage

Change-Id: I464f7a3ee3aee2302680c1d4ef304766d85988a6
2016-11-14 22:16:46 +00:00
LiuNanke
af7d1cdedb Use method ensure_tree from oslo.utils
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
2016-11-14 19:45:48 +08:00
huoliang
1001243d85 Replace oslo_utils.timeutils.isotime
'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
2016-11-10 13:51:23 +08:00
Jenkins
fc32a8b620 Merge "Filter enviroment list by project id" 2016-11-07 22:52:22 +00:00
Jenkins
108ce7e6b2 Merge "Order the packages for parameter search" 2016-11-07 22:44:39 +00:00
Jenkins
97a2a13974 Merge "Fix typos in class_templ.rst & test_catalog.py" 2016-11-07 22:43:23 +00:00
Huangsm
82bd5858e3 Order the packages for parameter search
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
2016-11-04 17:55:40 -04:00
Jenkins
3ef1d83c91 Merge "Fix debug output for SSLMiddleware X-Forwarded-Proto" 2016-11-02 18:47:44 +00:00
Jenkins
e2f02a0293 Merge "Update devstack keystone_authtoken config to fit with keystone v3" 2016-11-02 18:47:28 +00:00
melissaml
59ca7d66f7 Fix typos in class_templ.rst & test_catalog.py
TrivialFix

Change-Id: I8143f101c6945952a3c7c58c2de2e425a95f30bf
2016-11-02 10:44:45 +08:00
Jenkins
d33e2f9508 Merge "Increase unit test coverage for common engine and instance statistics API" 2016-10-22 23:29:30 +00:00
Jenkins
5f9737dbc9 Merge "Increase test coverage for Schema Generation API." 2016-10-22 23:29:26 +00:00
Jenkins
993a3efa88 Merge "Increase unit test coverage for Version Negotiation API." 2016-10-22 23:28:46 +00:00
Artem Tiumentcev
1c14cc322e Fix debug output for SSLMiddleware X-Forwarded-Proto
Before this patch debug output was excessive.
Now print the line log if wsgi.url_scheme differ and

Change-Id: I925a7dd0844dfa76696b75e9f818d1bb47b34928
Closes-Bug: #1605806
2016-10-22 11:10:11 +03:00
Jenkins
69e4ab31ad Merge "Fix TypeError being throw by wait_ready in Engine System Agent." 2016-10-21 06:07:11 +00:00
Samantha Blanco
25a3affb6f Increase unit test coverage for common engine and instance statistics API
Implements bp: murano-unit-test-coverage
Co-Authored-By: Felipe Monteiro <felipe.monteiro@att.com>

Change-Id: Ic83a7d1d6338e5a4bae6c1e738a931d2970deaa6
2016-10-20 17:20:09 -04:00
Jenkins
eefaa2b610 Merge "Increase unit test coverage for Manage CLI." 2016-10-20 11:51:16 +00:00
Jenkins
49a83a92ec Merge "Increase unit test coverage for Stats API." 2016-10-20 11:36:34 +00:00
Jenkins
ccace35216 Merge "Increase unit test coverage for Heat Stack." 2016-10-19 19:04:19 +00:00
Alexander Tivelkov
254202b98e Unblocking the gate
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
2016-10-19 15:54:31 +03:00
zhurong
df8bf9c8f8 Update devstack keystone_authtoken config to fit with keystone v3
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
2016-10-19 02:17:04 +00:00
Felipe Monteiro
f2b0db77d4 Increase unit test coverage for Version Negotiation API.
Implements bp: murano-unit-test-coverage

Change-Id: I3ab653fae79c2bf2660e57199aeab44b2684f1d8
2016-10-18 17:40:22 -04:00
Felipe Monteiro
e7fd3248db Increase test coverage for Schema Generation API.
implements bp: murano-unit-test-coverage

Change-Id: Ie8cedf836798d7f4d3358e802a22ae7b8f79e8b4
2016-10-18 20:38:04 +00:00
Felipe Monteiro
c0e8e8cf86 Increase unit test coverage for Stats API.
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
2016-10-18 12:58:52 +00:00
Jenkins
73201558af Merge "Increase unit test coverage for mqclient." 2016-10-17 14:11:21 +00:00
Jenkins
5d131c30ed Merge "Increase unit test coverage for engine system" 2016-10-17 14:11:16 +00:00
Jenkins
7515ec7498 Merge "Increase unit test coverage for CFConnections API." 2016-10-17 13:52:19 +00:00
Jenkins
68eefef0c8 Merge "Increase unit test coverage for Agent API." 2016-10-17 13:50:43 +00:00