[MuranoPL] MuranoMethodArgument does not reflect its "Usage" attribute
Bug #1596647 reported by
Alexander Tivelkov
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Murano |
Fix Released
|
Medium
|
Alexander Tivelkov |
Bug Description
There is no way to use reflection to check for the value of "Usage" attribute of Method Argument. Since the Standard and VarArgs/KwArgs arguments are quie different it may be useful to be able to detect their usage type using reflection.
Changed in murano: | |
importance: | Undecided → Medium |
assignee: | nobody → Alexander Tivelkov (ativelkov) |
milestone: | none → newton-2 |
Changed in murano: | |
status: | New → In Progress |
Changed in murano: | |
milestone: | newton-2 → newton-3 |
Changed in murano: | |
assignee: | Alexander Tivelkov (ativelkov) → Stan Lagun (slagun) |
Changed in murano: | |
assignee: | Stan Lagun (slagun) → Alexander Tivelkov (ativelkov) |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/334514 /git.openstack. org/cgit/ openstack/ murano/ commit/ ?id=e853cf861b3 b7f7ce6a8e7f808 7b290abca29f2a
Committed: https:/
Submitter: Jenkins
Branch: master
commit e853cf861b3b7f7 ce6a8e7f8087b29 0abca29f2a
Author: Alexander Tivelkov <email address hidden>
Date: Mon Jun 20 23:01:30 2016 +0300
Event Notification pattern implemented
This patch adds an 'Event' class which may be used to issue various
notifications to other MuranoPl classes in an Event-driven manner.
Any object which is going to emit the notifications should declare the
instances of this new class as its public Runtime properties. The
objects going to subscribe for the notifications should pass
themselves into the 'subscribe' method of the Event along with the
names of their methods which will be used to handle the notification.
The specified handler methods must be present in the subscriber class Eventname% ') and has at least one standard (i.e. non-vararg
(if the method name is missing it will be defaulted to the
'handle%
or kwarg) argument.
The class going to emit the notification should call the 'notify'
method of the event and pass itself as the first argument. All the
optional parameters of the event may be passed as varargs/kwargs of
the 'notify' call and will be passed all the way to the handler
methods.
Since this approach relies on the reflection this patch also fixes a
bug #1596647 since its fix is required for the argument reflection to
work properly. It also documents new reflection capabilities which
were added as part of the bugfix.
Targets- blueprint: application- development- framework 6030e8df743f57e d812104b064
Closes-Bug: #1596647
Change-Id: Ifa7053e4c7b845