[openstack-dev] [Murano] 'NoMatchingFunctionException: No function "#operator_." matches supplied arguments' error when adding an application to an environment

Vahid S Hashemian vahidhashemian at us.ibm.com
Wed Nov 25 19:21:13 UTC 2015


Kate, Serg,

Thank you very much for your quick responses.

I am attaching the requested yaml file.

For Hot2 plugin, the only difference with hot_package.py is that I changed 
the UI translation version to 2.2 and removed predefined_fields in 
_translate_ui_parameters method.
The ui.yaml file is attached.



The CSAR plugin is a work in progress. For example, the workflow method is 
not yet implemented.
The ui.yaml file is attached.


I'd like to make sure the issue is not on my side before I open a bug, as 
Kate suggested.

If necessary, I can also send you the plugin python code.

Thanks.

Regards,
--Vahid




From:   Serg Melikyan <smelikyan at mirantis.com>
To:     "OpenStack Development Mailing List (not for usage questions)" 
<openstack-dev at lists.openstack.org>
Date:   11/25/2015 03:29 AM
Subject:        Re: [openstack-dev] [Murano] 'NoMatchingFunctionException: 
No function "#operator_." matches supplied arguments' error when adding an 
application to an environment



Hi Vahid,

you can find generated UI definitions for the package here:
/tmp/muranodashboard-cache/apps/.../ui/ui.yaml

On Wed, Nov 25, 2015 at 12:54 PM, Ekaterina Chernova
<efedorova at mirantis.com> wrote:
>
> Hi Vahid,
>
> Forms are rended after app is added to the environment in accordance 
with the UI definition.
> UI definition contains yaql expressions and one of your expression is 
incorrect.
> Please, share UI yaml so we can find out what's the problem.
> You can also create a bug that it's not obvious which expression is 
failed.
>
>
> Also, make sure that you have valid YAQL version installed (should 
correspond to the version in requirements.txt)
> And you can ask for help in #murano channel.
>
> Regards,
> Kate.
>
>
> On Wed, Nov 25, 2015 at 4:39 AM, Vahid S Hashemian 
<vahidhashemian at us.ibm.com> wrote:
>>
>> Hi,
>>
>> I am working on the TOSCA CSAR plugin for murano and so far am able to 
successfully import an application definition archive of my CSAR example 
to murano.
>> However, when I try to add the imported application to an environment I 
get this error from Murano Dashboard:
>>
>> DEBUG:muranodashboard.common.cache:Using cached value from 
/tmp/muranodashboard-cache/apps/91/4c2bfd5d504419a94a9affb7af809a/package_fqn.
>> DEBUG:muranodashboard.catalog.views:Clearing forms data for application 
io.murano.apps.generated.CsarHelloWorld.
>> DEBUG:muranodashboard.catalog.views:Clearing any leftover wizard step 
data.
>> DEBUG:muranodashboard.common.cache:Using cached value from 
/tmp/muranodashboard-cache/apps/91/4c2bfd5d504419a94a9affb7af809a/ui/ui.yaml.
>> DEBUG:muranodashboard.common.cache:Using cached value from 
/tmp/muranodashboard-cache/apps/91/4c2bfd5d504419a94a9affb7af809a/package_fqn.
>> DEBUG:muranodashboard.dynamic_ui.services:Using data {} for app 
io.murano.apps.generated.CsarHelloWorld
>> DEBUG:muranodashboard.dynamic_ui.services:Using in-memory forms for app 
io.murano.apps.generated.CsarHelloWorld
>> DEBUG:muranodashboard.common.cache:Using cached value from 
/tmp/muranodashboard-cache/apps/91/4c2bfd5d504419a94a9affb7af809a/ui/ui.yaml.
>> DEBUG:muranodashboard.common.cache:Using cached value from 
/tmp/muranodashboard-cache/apps/91/4c2bfd5d504419a94a9affb7af809a/package_fqn.
>> DEBUG:muranodashboard.dynamic_ui.services:Using data {} for app 
io.murano.apps.generated.CsarHelloWorld
>> DEBUG:muranodashboard.dynamic_ui.services:Using in-memory forms for app 
io.murano.apps.generated.CsarHelloWorld
>> INFO:muranodashboard.dynamic_ui.forms:Creating form workflowManagement
>> INFO:muranodashboard.dynamic_ui.forms:Creating form group0
>> DEBUG:muranodashboard.api:Murano::Client <Url: http://localhost:8082/>
>> DEBUG:muranoclient.common.http:curl -i -X GET -H 'X-Auth-Token: 
324759651d234c4eaf08f6093dfd7000' -H 'Content-Type: application/json' -H 
'User-Agent: python-muranoclient' 
http://localhost:8082//v1/catalog/packages/914c2bfd5d504419a94a9affb7af809a

>> DEBUG:muranoclient.common.http:
>> HTTP/1.1 200 OK
>> Date: Wed, 25 Nov 2015 01:31:12 GMT
>> Connection: keep-alive
>> Content-Type: application/json
>> Content-Length: 560
>> X-Openstack-Request-Id: req-b6759ab2-04b4-4882-ac95-3ac06f970cb5
>>
>> {"updated": "2015-11-24T23:28:52", "description": "Template for 
deploying a single server with predefined properties.", "tags": 
["TOSCA-CSAR-generated"], "class_definitions": 
["io.murano.apps.generated.CsarHelloWorld"], "is_public": false, "id": 
"914c2bfd5d504419a94a9affb7af809a", "categories": [], "name": 
"csar_hello_world", "created": "2015-11-24T23:28:52", "author": "OASIS 
TOSCA TC", "enabled": true, "supplier": {}, "fully_qualified_name": 
"io.murano.apps.generated.CsarHelloWorld", "type": "Application", 
"owner_id": "1fee909728c54a698c96f0f7853412ae"}
>>
>> DEBUG:muranoclient.common.http:curl -i -X GET -H 'X-Auth-Token: 
324759651d234c4eaf08f6093dfd7000' -H 'Content-Type: application/json' -H 
'User-Agent: python-muranoclient' 
http://localhost:8082//v1/environments/b8d83a0b6fde465ab9de013f084518d4
>> DEBUG:muranoclient.common.http:
>> HTTP/1.1 200 OK
>> Date: Wed, 25 Nov 2015 01:31:12 GMT
>> Connection: keep-alive
>> Content-Type: application/json
>> Content-Length: 245
>> X-Openstack-Request-Id: req-0ccb2b46-8a58-418f-b063-63067042e3f6
>>
>> {"status": "ready", "updated": "2015-11-24T23:29:11", "created": 
"2015-11-24T23:29:11", "tenant_id": "1fee909728c54a698c96f0f7853412ae", 
"acquired_by": null, "version": 0, "services": [], "id": 
"b8d83a0b6fde465ab9de013f084518d4", "name": "env1"}
>>
>> DEBUG:muranodashboard.common.cache:Using cached value from 
/tmp/muranodashboard-cache/apps/91/4c2bfd5d504419a94a9affb7af809a/ui/ui.yaml.
>> DEBUG:muranodashboard.common.cache:Using cached value from 
/tmp/muranodashboard-cache/apps/91/4c2bfd5d504419a94a9affb7af809a/package_fqn.
>> DEBUG:muranodashboard.dynamic_ui.services:Using data {} for app 
io.murano.apps.generated.CsarHelloWorld
>> DEBUG:muranodashboard.dynamic_ui.services:Using in-memory forms for app 
io.murano.apps.generated.CsarHelloWorld
>> DEBUG:muranoclient.common.http:curl -i -X GET -H 'X-Auth-Token: 
324759651d234c4eaf08f6093dfd7000' -H 'Content-Type: application/json' -H 
'User-Agent: python-muranoclient' 
http://localhost:8082//v1/catalog/packages/914c2bfd5d504419a94a9affb7af809a

>> DEBUG:muranoclient.common.http:
>> HTTP/1.1 200 OK
>> Date: Wed, 25 Nov 2015 01:31:12 GMT
>> Connection: keep-alive
>> Content-Type: application/json
>> Content-Length: 560
>> X-Openstack-Request-Id: req-ee4545dd-6dfe-4944-90bc-48a525b099d5
>>
>> {"updated": "2015-11-24T23:28:52", "description": "Template for 
deploying a single server with predefined properties.", "tags": 
["TOSCA-CSAR-generated"], "class_definitions": 
["io.murano.apps.generated.CsarHelloWorld"], "is_public": false, "id": 
"914c2bfd5d504419a94a9affb7af809a", "categories": [], "name": 
"csar_hello_world", "created": "2015-11-24T23:28:52", "author": "OASIS 
TOSCA TC", "enabled": true, "supplier": {}, "fully_qualified_name": 
"io.murano.apps.generated.CsarHelloWorld", "type": "Application", 
"owner_id": "1fee909728c54a698c96f0f7853412ae"}
>>
>> [25/Nov/2015 01:31:12] "GET 
/murano/catalog/add/914c2bfd5d504419a94a9affb7af809a/b8d83a0b6fde465ab9de013f084518d4 
HTTP/1.1" 200 3763
>> DEBUG:muranodashboard.common.cache:Using cached value from 
/tmp/muranodashboard-cache/apps/91/4c2bfd5d504419a94a9affb7af809a/ui/ui.yaml.
>> DEBUG:muranodashboard.common.cache:Using cached value from 
/tmp/muranodashboard-cache/apps/91/4c2bfd5d504419a94a9affb7af809a/package_fqn.
>> DEBUG:muranodashboard.dynamic_ui.services:Using data {} for app 
io.murano.apps.generated.CsarHelloWorld
>> DEBUG:muranodashboard.dynamic_ui.services:Using in-memory forms for app 
io.murano.apps.generated.CsarHelloWorld
>> DEBUG:muranodashboard.common.cache:Using cached value from 
/tmp/muranodashboard-cache/apps/91/4c2bfd5d504419a94a9affb7af809a/ui/ui.yaml.
>> DEBUG:muranodashboard.common.cache:Using cached value from 
/tmp/muranodashboard-cache/apps/91/4c2bfd5d504419a94a9affb7af809a/package_fqn.
>> DEBUG:muranodashboard.dynamic_ui.services:Using data {} for app 
io.murano.apps.generated.CsarHelloWorld
>> DEBUG:muranodashboard.dynamic_ui.services:Using in-memory forms for app 
io.murano.apps.generated.CsarHelloWorld
>> INFO:muranodashboard.dynamic_ui.forms:Creating form workflowManagement
>> INFO:muranodashboard.dynamic_ui.forms:Creating form group0
>> INFO:muranodashboard.dynamic_ui.forms:Creating form workflowManagement
>> DEBUG:muranodashboard.api:Murano::Client <Url: http://localhost:8082/>
>> DEBUG:muranoclient.common.http:curl -i -X GET -H 'X-Auth-Token: 
324759651d234c4eaf08f6093dfd7000' -H 'Content-Type: application/json' -H 
'User-Agent: python-muranoclient' 
http://localhost:8082//v1/environments/b8d83a0b6fde465ab9de013f084518d4
>> DEBUG:muranoclient.common.http:
>> HTTP/1.1 200 OK
>> Date: Wed, 25 Nov 2015 01:31:15 GMT
>> Connection: keep-alive
>> Content-Type: application/json
>> Content-Length: 245
>> X-Openstack-Request-Id: req-fd260c43-75e3-41eb-bf72-d7ebd537cc9b
>>
>> {"status": "ready", "updated": "2015-11-24T23:29:11", "created": 
"2015-11-24T23:29:11", "tenant_id": "1fee909728c54a698c96f0f7853412ae", 
"acquired_by": null, "version": 0, "services": [], "id": 
"b8d83a0b6fde465ab9de013f084518d4", "name": "env1"}
>>
>> DEBUG:muranodashboard.common.cache:Using cached value from 
/tmp/muranodashboard-cache/apps/91/4c2bfd5d504419a94a9affb7af809a/ui/ui.yaml.
>> DEBUG:muranodashboard.common.cache:Using cached value from 
/tmp/muranodashboard-cache/apps/91/4c2bfd5d504419a94a9affb7af809a/package_fqn.
>> DEBUG:muranodashboard.dynamic_ui.services:Using data {} for app 
io.murano.apps.generated.CsarHelloWorld
>> DEBUG:muranodashboard.dynamic_ui.services:Using in-memory forms for app 
io.murano.apps.generated.CsarHelloWorld
>> [25/Nov/2015 01:31:15] "POST 
/murano/catalog/add/914c2bfd5d504419a94a9affb7af809a/b8d83a0b6fde465ab9de013f084518d4/False/False 
HTTP/1.1" 200 4598
>> DEBUG:muranodashboard.common.cache:Using cached value from 
/tmp/muranodashboard-cache/apps/91/4c2bfd5d504419a94a9affb7af809a/ui/ui.yaml.
>> DEBUG:muranodashboard.common.cache:Using cached value from 
/tmp/muranodashboard-cache/apps/91/4c2bfd5d504419a94a9affb7af809a/package_fqn.
>> DEBUG:muranodashboard.dynamic_ui.services:Using data {} for app 
io.murano.apps.generated.CsarHelloWorld
>> DEBUG:muranodashboard.dynamic_ui.services:Using in-memory forms for app 
io.murano.apps.generated.CsarHelloWorld
>> DEBUG:muranodashboard.common.cache:Using cached value from 
/tmp/muranodashboard-cache/apps/91/4c2bfd5d504419a94a9affb7af809a/ui/ui.yaml.
>> DEBUG:muranodashboard.common.cache:Using cached value from 
/tmp/muranodashboard-cache/apps/91/4c2bfd5d504419a94a9affb7af809a/package_fqn.
>> DEBUG:muranodashboard.dynamic_ui.services:Using data {} for app 
io.murano.apps.generated.CsarHelloWorld
>> DEBUG:muranodashboard.dynamic_ui.services:Using in-memory forms for app 
io.murano.apps.generated.CsarHelloWorld
>> INFO:muranodashboard.dynamic_ui.forms:Creating form workflowManagement
>> INFO:muranodashboard.dynamic_ui.forms:Creating form workflowManagement
>> INFO:muranodashboard.dynamic_ui.forms:Creating form group0
>> INFO:muranodashboard.dynamic_ui.forms:Creating form workflowManagement
>> Internal Server Error: 
/murano/catalog/add/914c2bfd5d504419a94a9affb7af809a/b8d83a0b6fde465ab9de013f084518d4/False/False
>> Traceback (most recent call last):
>>   File 
"/home/stack/project/horizon/.tox/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", 
line 132, in get_response
>>     response = wrapped_callback(request, *callback_args, 
**callback_kwargs)
>>   File "/home/stack/project/horizon/horizon/decorators.py", line 36, in 
dec
>>     return view_func(request, *args, **kwargs)
>>   File "/home/stack/project/horizon/horizon/decorators.py", line 52, in 
dec
>>     return view_func(request, *args, **kwargs)
>>   File "/home/stack/project/horizon/horizon/decorators.py", line 36, in 
dec
>>     return view_func(request, *args, **kwargs)
>>   File 
"/home/stack/project/murano-dashboard/muranodashboard/catalog/views.py", 
line 173, in __inner
>>     return func(request, **kwargs)
>>   File 
"/home/stack/project/murano-dashboard/muranodashboard/catalog/views.py", 
line 303, in view
>>     return self.dispatch(request, *args, **kwargs)
>>   File 
"/home/stack/project/horizon/.tox/venv/local/lib/python2.7/site-packages/formtools/wizard/views.py", 
line 237, in dispatch
>>     response = super(WizardView, self).dispatch(request, *args, 
**kwargs)
>>   File 
"/home/stack/project/horizon/.tox/venv/local/lib/python2.7/site-packages/django/views/generic/base.py", 
line 89, in dispatch
>>     return handler(request, *args, **kwargs)
>>   File 
"/home/stack/project/horizon/.tox/venv/local/lib/python2.7/site-packages/formtools/wizard/views.py", 
line 300, in post
>>     return self.render_done(form, **kwargs)
>>   File 
"/home/stack/project/horizon/.tox/venv/local/lib/python2.7/site-packages/formtools/wizard/views.py", 
line 357, in render_done
>>     **kwargs)
>>   File 
"/home/stack/project/murano-dashboard/muranodashboard/catalog/views.py", 
line 334, in done
>>     attributes = service.extract_attributes()
>>   File 
"/home/stack/project/murano-dashboard/muranodashboard/dynamic_ui/services.py", 
line 123, in extract_attributes
>>     attributes = helpers.evaluate(self.application, self.context)
>>   File 
"/home/stack/project/murano-dashboard/muranodashboard/dynamic_ui/helpers.py", 
line 97, in evaluate
>>     value, context)
>>   File 
"/home/stack/project/murano-dashboard/muranodashboard/dynamic_ui/helpers.py", 
line 90, in recursive_apply
>>     return rec(value)
>>   File 
"/home/stack/project/murano-dashboard/muranodashboard/dynamic_ui/helpers.py", 
line 80, in rec
>>     return dict((rec(k), rec(v)) for (k, v) in val.iteritems())
>>   File 
"/home/stack/project/murano-dashboard/muranodashboard/dynamic_ui/helpers.py", 
line 80, in <genexpr>
>>     return dict((rec(k), rec(v)) for (k, v) in val.iteritems())
>>   File 
"/home/stack/project/murano-dashboard/muranodashboard/dynamic_ui/helpers.py", 
line 78, in rec
>>     return rec(transformer(val, *args))
>>   File 
"/home/stack/project/murano-dashboard/muranodashboard/dynamic_ui/helpers.py", 
line 96, in <lambda>
>>     lambda v, _ctx: v.evaluate(context=_ctx),
>>   File 
"/home/stack/project/murano-dashboard/muranodashboard/dynamic_ui/yaql_expression.py", 
line 61, in evaluate
>>     return self._parsed_expression.evaluate(data=data, context=context)
>>   File 
"/home/stack/project/horizon/.tox/venv/local/lib/python2.7/site-packages/yaql/language/expressions.py", 
line 165, in evaluate
>>     return self(utils.NO_VALUE, context, self.engine)
>>   File 
"/home/stack/project/horizon/.tox/venv/local/lib/python2.7/site-packages/yaql/language/expressions.py", 
line 156, in __call__
>>     return super(Statement, self).__call__(receiver, context, engine)
>>   File 
"/home/stack/project/horizon/.tox/venv/local/lib/python2.7/site-packages/yaql/language/expressions.py", 
line 37, in __call__
>>     return context(self.name, engine, receiver, context)(*self.args)
>>   File 
"/home/stack/project/horizon/.tox/venv/local/lib/python2.7/site-packages/yaql/language/contexts.py", 
line 65, in <lambda>
>>     data_context, use_convention, function_filter)
>>   File 
"/home/stack/project/horizon/.tox/venv/local/lib/python2.7/site-packages/yaql/language/runner.py", 
line 49, in call
>>     name, all_overloads, engine, receiver, data_context, args, kwargs)
>>   File 
"/home/stack/project/horizon/.tox/venv/local/lib/python2.7/site-packages/yaql/language/runner.py", 
line 117, in choose_overload
>>     args = tuple(arg_evaluator(i, arg) for i, arg in enumerate(args))
>>   File 
"/home/stack/project/horizon/.tox/venv/local/lib/python2.7/site-packages/yaql/language/runner.py", 
line 117, in <genexpr>
>>     args = tuple(arg_evaluator(i, arg) for i, arg in enumerate(args))
>>   File 
"/home/stack/project/horizon/.tox/venv/local/lib/python2.7/site-packages/yaql/language/runner.py", 
line 113, in <lambda>
>>     and not isinstance(arg, expressions.Constant))
>>   File 
"/home/stack/project/horizon/.tox/venv/local/lib/python2.7/site-packages/yaql/language/expressions.py", 
line 37, in __call__
>>     return context(self.name, engine, receiver, context)(*self.args)
>>   File 
"/home/stack/project/horizon/.tox/venv/local/lib/python2.7/site-packages/yaql/language/contexts.py", 
line 65, in <lambda>
>>     data_context, use_convention, function_filter)
>>   File 
"/home/stack/project/horizon/.tox/venv/local/lib/python2.7/site-packages/yaql/language/runner.py", 
line 49, in call
>>     name, all_overloads, engine, receiver, data_context, args, kwargs)
>>   File 
"/home/stack/project/horizon/.tox/venv/local/lib/python2.7/site-packages/yaql/language/runner.py", 
line 141, in choose_overload
>>     raise_not_found()
>>   File 
"/home/stack/project/horizon/.tox/venv/local/lib/python2.7/site-packages/yaql/language/runner.py", 
line 70, in raise_not_found
>>     raise exceptions.NoMatchingFunctionException(name)
>> NoMatchingFunctionException: No function "#operator_." matches supplied 
arguments
>> [25/Nov/2015 01:31:17] "POST 
/murano/catalog/add/914c2bfd5d504419a94a9affb7af809a/b8d83a0b6fde465ab9de013f084518d4/False/False 
HTTP/1.1" 500 119882
>>
>>
>> In order to test this further I tried to make a copy of the hot_package 
and create a HOT2 plugin (by renaming Hot to Hot2) to see if the issue is 
directly rooted in the CSAR plugin.
>> However, with the HOT2 plugin I am getting the same error as above.
>>
>> Any help on how to resolve the problem is very much appreciated.
>>
>> Regards,
>> --Vahid
>>
>> 
__________________________________________________________________________
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe: 
OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>
>
> 
__________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: 
OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 
Serg Melikyan, Senior Software Engineer at Mirantis, Inc.
http://mirantis.com | smelikyan at mirantis.com

+7 (495) 640-4904, 0261
+7 (903) 156-0836

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20151125/f2884191/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ui.yaml
Type: application/octet-stream
Size: 1143 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20151125/f2884191/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ui.yaml
Type: application/octet-stream
Size: 1206 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20151125/f2884191/attachment-0001.obj>


More information about the OpenStack-dev mailing list