[MuranoPL] [YAQL] YAQL's 'call' cannot be called for the object of another class

Bug #1595174 reported by Alexander Tivelkov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
Medium
Alexander Tivelkov

Bug Description

YAQL has a 'call' function which is capable to run function or method specified by name with a given set of arguments and, when calling methods, a 'receiver' object.

In MuranoPL this function does not work if the receiver object has the class other then the class of the caller. This probably happens because MuranoPL creates an 'object context' for its calls - and that context include function definitions for the methods of the needed class. When 'call' is called this does not happen and the invocation occurs in the context of the caller.

See patch https://review.openstack.org/#/c/332792/ for the test demonstrating the bug

description: updated
description: updated
Changed in murano:
assignee: nobody → Alexander Tivelkov (ativelkov)
status: New → In Progress
Changed in murano:
milestone: none → newton-2
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (master)

Reviewed: https://review.openstack.org/332792
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=0b495c550da4cdca58437b04fd461b41601d04ca
Submitter: Jenkins
Branch: master

commit 0b495c550da4cdca58437b04fd461b41601d04ca
Author: Alexander Tivelkov <email address hidden>
Date: Wed Jun 22 15:54:06 2016 +0300

    Added a muranoPL-specific override of 'call'

    Yaql's standard system function 'call' was not working properly in
    MuranoPL because murano relies on object-specific context containing
    definitions of the methods of appropriate class.

    This patch adds a MuranoPL-specific override of this function which
    creates an appropriate method-invocation AST and executes it. This
    will invoke regular muranoPl's override of operator_. thus causing all
    the appropriate type and object contexts to be created for the call.

    Closes-bug: #1595174

    Change-Id: If3e98a60063b0843c317fa565616c8d88f9e497c

Changed in murano:
status: In Progress → Fix Released
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/murano 3.0.0.0b2

This issue was fixed in the openstack/murano 3.0.0.0b2 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.