665 Commits

Author SHA1 Message Date
liyingjun
20e8339e13 Missing blankspace in debug in murano.common.statservice
Add missing blankspace to debug log in murano.common.statservice

Change-Id: I48e297787b2ad81f13521d4c1d9f338ac26a8c06
2015-12-24 17:39:32 +08:00
Jenkins
7b6f754cc1 Merge "[murano-test-runner] Mark 'package' as required parameter" 2015-12-21 12:46:21 +00:00
Jenkins
e306eecd1c Merge "[mocking-machinery] Add original method function" 2015-12-18 15:02:21 +00:00
Ekaterina Chernova
c4461be16a [murano-test-runner] Mark 'package' as required parameter
Also now package param is positional.

Change-Id: I8f42821ea07b3adb4157d6a55c489a5bc2471219
Closes-Bug: #1524311
2015-12-15 17:47:07 +03:00
Aaron-DH
898f675151 Stop using WritableLogger() which is deprecated.
Remove it and use logger instead

Change-Id: I876eb14523f9f4ac44ad5bc024b7afc676fc86be
Closes-Bug: #1524860
2015-12-15 16:28:01 +08:00
Ekaterina Chernova
b9b2a9b881 [mocking-machinery] Add original method function
This commit adds opportunity to call original method
in mock method. Corresponding test is attached.

Targets blueprint mocking-machinery

Change-Id: I889bb576e708d28a083c0a25f66c999a6492057f
2015-12-14 15:36:07 +03:00
Jenkins
5aeba4447a Merge "[mocking-machinery] Add inject YAQL functions" 2015-12-14 09:48:05 +00:00
Jenkins
abc70315cf Merge "Improve public network detection algorithm" 2015-12-11 15:12:36 +00:00
Ekaterina Chernova
d321757468 [mocking-machinery] Add inject YAQL functions
Functions for injecting class methods or objects with mocks are added:
* mock can be provided as method name
* mock can be provided as YAQL expression

* Also, withOriginal function is added.

  withOriginal allows to use data from the original context in mock function.

Targets blueprint mock-context-manager

Depends-On: I9a55d07188ff06bdf98248f011a700c297e33417

Change-Id: Iefee767390209bfad0cca4f39389e0205cd3c9e2
2015-12-10 17:50:22 +03:00
stoneliu
4c6f827684 Fix spelling error for db migration file name
Change the file name from inital_version to initial_version

Change-Id: Iefa8c736fccd7705c72841a347cd6041c5e02e73
2015-12-10 09:53:13 +08:00
Jenkins
67970f3a5d Merge "Add MockContextManager" 2015-12-09 15:54:59 +00:00
Jenkins
b0f6e230e4 Merge "Add an option to filter packages by 'id' in API" 2015-12-09 15:25:27 +00:00
Andrew Pashkin
ac9b85e1f5 Add an option to filter packages by 'id' in API
This patch enhances the GET /catalog/packages Murano API call with
option to filter packages by id.

Partially implements bp assign-category-button
Change-Id: I86bbdbde74a7fa086197adef7a91199704811f72
2015-12-09 16:07:42 +03:00
Stan Lagun
04bccb55b9 Improve public network detection algorithm
It is possible that there are several public networks exist.
ExistingNeutronNetwork used to pick first one of them.
Now when internal network name or ID supplied it tries
to find such public network that the internal network has
a common router with.

Change-Id: I252bb5545891903355cf7f8480a2cd76febcfebe
Closes-Bug: #1524322
2015-12-09 16:04:59 +03:00
Stan Lagun
05edab3661 Do not wait for MessageHandlingServer
Previously oslo.messaging's MessageHandlingServer
was used as as a murano-engine service in service launcher.
As a result it's wait() method was called. But after recent
changes it's wait method is supposed to be call only
after stop() to wait for graceful message processing to end.
As a result a warning was printed that stop() didn't finish
after 30 sec from wait() invocation (because it was never called).

This commit adds EngineService service implementation
that has its own wait() and encapsulates MessageHandlingServer
instance.

Change-Id: Ie553e0b27cc1c261b963907b4f12f89795b99a12
Closes-Bug: #1521087
2015-12-09 12:30:49 +03:00
Jenkins
5c14f29f9b Merge "Add OneOf smart type" 2015-12-08 12:44:28 +00:00
Ekaterina Chernova
fd59720b1b Add MockContextManager
It is used in murano-test-runner.

Mocks are inserted into new context, that is created
from the current context:
If mock for the current object exist, new linked context
   (``murano.dsl.linked_context.LinkedContext``) will be returned. It links
   existing context with the new context, where mock definition is presented.
   So if mocked function will be called, context will contain two
   definitions with that function: mock and original one, but mock will have
   higher priority.

If there is no mock for the current object or class, existing context
   will be returned. If there is no existing context, *None* will be returned.

Targets blueprint mock-context-manager

Depends-On: I9eccdf3af1802c731bfdfb93df92c4ad902a4d34
Change-Id: I9a55d07188ff06bdf98248f011a700c297e33417
2015-12-08 14:10:22 +03:00
Aaron-DH
2fa65e43aa Fix alignment in log messages
Remove unnecessary line and keep consistence  in log messages

Change-Id: If568d6acb7a78be7b4cd6f59b3bec5334560fc9a
2015-12-08 17:07:32 +08:00
Ekaterina Chernova
a20d03fb0f Add OneOf smart type
It is a new smart type, that verifies function parameter
whether it belongs to the on of the specified in the function
declaration classes.

Targets blueprint mock-context-manager

Change-Id: I9eccdf3af1802c731bfdfb93df92c4ad902a4d34
2015-12-07 16:05:44 +03:00
Nikolay Starodubtsev
759124993b Raise proper exception in ext context middleware
Previously if request without 'HTTP-Authorization' header comes to
external context middleware it raised error code 500 Internal Server
Error instead of 401 Unauthorized.

Change-Id: I8285d24741bed5b541a4f8104422340c8594c695
Closes-Bug: #1522707
2015-12-04 12:14:11 +03:00
Jenkins
0e37bcd3cd Merge "HOT outputs were merged" 2015-12-03 21:33:10 +00:00
Jenkins
8bbc876278 Merge "Improve message for publish package conflict" 2015-12-02 11:02:11 +00:00
Stan Lagun
6f013c5722 HOT outputs were merged
This commit does dot HOT template outputs (for Heat.HOT/1.0 format)
the same that was previously done for the inputs. Instead of generating
MuranoPL property per each output now all outputs are put into a
single 'templateOutputs' property. This allows to eliminate the constraints
on output names, not to have collisions with input names and remain
consistent with previous changes.

Change-Id: Ibbd0a2f410c55385cd3cb9e85ea135a36460afe7
Closes-Bug: #1520954
2015-12-02 13:07:16 +03:00
Jenkins
25955a6c50 Merge "Functional tests for Chef and Puppet examples" 2015-12-01 14:54:02 +00:00
Jenkins
09512bcd5e Merge "Fix debug log message" 2015-12-01 13:53:41 +00:00
Hidekazu Nakamura
f3a49bf6e6 Fix debug log message
There is no separator Between request path and
'Accept' in the debug log.
This patch adds white space separator between
request path and 'Accept'.

Change-Id: I82c553b50975a3c5898fa8ee6db10c796bd5987c
2015-12-01 23:54:45 +09:00
Henar Muñoz Frutos
b7fac61172 Functional tests for Chef and Puppet examples
This commit introduces some functional tests for Chef and Puppet
example applications.
Depends-On: I1363e46d655c8a641a1fa404faadc5f652f9fce4

Change-Id: I0a455d02a08d7c695f9f39e86b0dbb8b87deb5f2
2015-12-01 13:09:28 +00:00
Jenkins
c27b47723d Merge "Remove unused bunch class" 2015-12-01 12:32:56 +00:00
Jenkins
90a94df925 Merge "Include default region for multiregion testbed" 2015-12-01 10:49:47 +00:00
Henar Muñoz Frutos
cf44ac9e72 Include default region for multiregion testbed
Functional tests need to have configured the default
region when there is a testbed with multiples regions.

Partially Closes Bug: #1479260

Change-Id: Ib9488c7632fe88a22b014f5e251b48d12fa1dbce
2015-12-01 09:15:58 +01:00
liyingjun
697ad2aacc Replacing application_catalog with application-catalog
Murano does not get keystone endpoint when Keystone is configured to use
templated catalog

Change-Id: Id568c0a59b2e99dc946b1f2f55f6b233fd6a1b27
Closes-bug: #1514692
2015-11-27 20:02:41 +08:00
Kirill Zaitsev
fe26ecdec9 Remove unused bunch class
Change-Id: I794b96bb3dd82dfe5592af649d93d07402bcb360
2015-11-25 17:43:04 +03:00
Jenkins
eb8adb0450 Merge "Skip package section from input parameters" 2015-11-25 12:23:51 +00:00
Jenkins
3a5b8c434c Merge "Add verbosity control for Murano-test-runner" 2015-11-25 10:41:29 +00:00
Lin Yang
886c881ab8 Add verbosity control for Murano-test-runner
Use '-v' to make test-runner to be more verbose instead of printing
version.

Change-Id: I2225ccfd7f8fe4f7901b7c357ba8d89572c5f5be
Closes-Bug: #1508429
2015-11-25 05:51:46 +08:00
Victor Ryzhenkin
a9937eba07 [cfapi] Prevent code 500 if instance, environment or service doesn't exists.
- Return 410 code if service/environment/instance_id doesn't exists
 as mentioned in cfapi service broker guide
(https://docs.cloudfoundry.org/services/api.html#asynchronous-operations)

Change-Id: I07bfaf8465649c77d06b881b24c49bce3d8d75ed
Closes-Bug: #1516749
2015-11-24 17:00:01 +00:00
Nikolay Starodubtsev
faa19db02b Skip package section from input parameters
Sometimes package section can be provided with input parameters from
Cloud Foundry. We need to skip it to prevent various errors.

Change-Id: I181d4227d05d90f7bccf723e6b04957227ebbfd4
Closes-Bug: #1517035
2015-11-24 16:58:39 +00:00
Jenkins
bf0e2b2715 Merge "Fix method comment typo" 2015-11-24 16:32:43 +00:00
Jenkins
4d8799e453 Merge "Public environment template" 2015-11-24 12:58:28 +00:00
Hidekazu Nakamura
1b2c04cb0c Fix method comment typo
emplate -> Template

Change-Id: I3ed9e39c5a69b5235066af5409032a253f6a2769
2015-11-24 21:06:22 +09:00
Henar Muñoz Frutos
02add081a2 Public environment template
This feature will allow having private and public environment templates, as well as,
to obtain all public templates from all tenants. In addition, a clone functionality
is added to copy a template from a tenant to another.

Change-Id: I702d9d707cb14195278b1cc2084fe9609660a3fe
Targets-blueprint: abstract-env-template
2015-11-23 16:09:46 +03:00
Nikolay Starodubtsev
444caff774 Get scoped token from ext_context middleware
Freshly introduced ext_context middleware produces unscouped token which
breaks authorization in Cloud Foundry service broker API.

Change-Id: Ibc85604dc9abed58c4c3bbeb92c572674fe74ff3
Closes-Bug: 1516635
2015-11-19 14:06:22 +00:00
Ekaterina Chernova
75f30d985e Update functional tests due to tempest update
tempest.common file has been changed.
This patch adapts this change.

Change-Id: Ide4973ea5276f5680d56e1888e34907fb76c3785
2015-11-19 13:53:18 +03:00
Stan Lagun
67c9140a11 Fixed broken assignment to dictionary using integer key
The case

$dict[$key]: value

for integer $key was not addressed in LHS expression logic.
As a result no changes were made to $dict and no error was raised.

Change-Id: I969dab5f0d32312cf52490945934557c32f22dde
Closes-Bug: #1515612
2015-11-14 18:59:21 +00:00
Jenkins
558bd82275 Merge "Rework service broker authorization process" 2015-11-13 12:22:14 +00:00
Lin Yang
bfcf923879 Update help message of test-runner to same format
Previously, the help message of --os-auth-url, "Authentication URL
(Env: OS_AUTH_URL)", is not same as other arguments of OS
environment variable. So update it to same format.

Change-Id: Iaed9b56016af8ce4c3470c55157458563b41ddcb
Closes-Bug: #1515781
2015-11-13 05:54:32 +08:00
Jenkins
5b9fcc2e3e Merge "Add middleware for external requests" 2015-11-12 14:07:40 +00:00
Nikolay Starodubtsev
c508be37a2 Rework service broker authorization process
Now we can use keystonemiddleware and murano context middleware for requests
from outside OpenStack so we don't need to recreate keystoneclient for each
request and can easily get token from the request headers. That makes
authorization proccess a lot easier in terms of source code.

Change-Id: If937501074b85d43921fdb108f8af3babeded828
Closes-Bug: #1512254
2015-11-12 12:05:57 +03:00
Jenkins
942ca755d8 Merge "Fix TypeError set param from 'null' to some value" 2015-11-11 15:18:58 +00:00
Nikolay Starodubtsev
b985627eaa Add middleware for external requests
New middleware will solve the problem with non-Openstack requests by
adding some minimal required headers.

Change-Id: I49986e73d0eb3da1ce13d22771c6bcb5a28ba846
Implements: bp external-request-middleware
2015-11-11 12:31:30 +03:00