Bug 1370568

Summary: METHOD:: does not accept a full path to a method
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: AutomateAssignee: Tina Fitzgerald <tfitzger>
Status: CLOSED ERRATA QA Contact: Milan Falešník <mfalesni>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.6.0CC: dajohnso, gmccullo, jhardy, mfalesni, mkanoor, obarenbo, simaishi, tfitzger
Target Milestone: GAKeywords: ZStream
Target Release: 5.6.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: automate
Fixed In Version: 5.6.2.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1359813 Environment:
Last Closed: 2016-10-04 14:32:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1359813    
Bug Blocks:    

Comment 2 Greg McCullough 2016-09-06 13:36:29 UTC
Back-ported in https://github.com/ManageIQ/manageiq/pull/10089

Comment 3 Milan Falešník 2016-09-15 09:25:33 UTC
Checked in 5.6.2.0

The Pull Request says:
"The new METHOD:: functionality is available to Automate state machine entries and can be used to call a method from a state relationship. METHOD:: can be used to call methods residing in the same class, and can access methods in other classes by using the class method notation."

I copied the Request class to my domain, created an instance "test" whose rel1 points to "METHOD::testmeth" where testmeth is a local method ($evm.log(:info, "TEST TEST")). That does not work (Invalid URI).

When I created a dummy instance in the request class and made the relationship field point to it, I have put a method names in the on entry and on exit fields. Both with and without METHOD:: prefix. That did work either, I could not see any mention of invocation of such method in the log nor what the method was supposed to log.

I used Simulation on /System/Request/test with method executing enabled.

Comment 4 Tina Fitzgerald 2016-09-15 15:57:52 UTC
Hi Milan,

I think part of your problem is that the "METHOD::" functionality is implemented for state machine relationships and /System/Request is not a state machine.

Can you test it in a state relationship?

Thanks,
Tina

Comment 5 Milan Falešník 2016-09-15 16:15:04 UTC
Eek, seems like the blindness has attacked. Thanks for pointing that out, I am on it now :)

Comment 6 Milan Falešník 2016-09-15 16:29:28 UTC
Verified in 5.6.2.0

METHOD::/ns/Class.methodname works in the states
/ns/Class.methodname works in the on_*

Comment 8 errata-xmlrpc 2016-10-04 14:32:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-1996.html