agent sync and async decorators change method signature
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ironic |
Fix Released
|
Low
|
Szymon Wróblewski |
Bug Description
There two decorators
ironic_
ironic_
They are implemented so that they change decorated method signature, which is really bad practice. Example
@sync_command
def orig_method(self, **kw):
...
sync decorator returns lambda which has one additional argument 'command_name'
def sync_command(func):
def decorated(self, command_name, **kw):
...
func(self, **kw)
...
return decorated
Besides, command_name argument looks a bit excess in execute method in BaseAgentExtension. We need to remove this extra argument and use something like __name__ wherever we need to know method name.
Changed in ironic: | |
status: | New → Triaged |
importance: | Undecided → Low |
tags: | added: low-hanging-fruit |
Changed in ironic: | |
assignee: | nobody → Szymon Wróblewski (bluex) |
status: | Triaged → In Progress |
Changed in ironic: | |
status: | In Progress → Won't Fix |
Changed in ironic: | |
status: | Won't Fix → In Progress |
Changed in ironic: | |
milestone: | none → juno-rc1 |
status: | Fix Committed → Fix Released |
Changed in ironic: | |
milestone: | juno-rc1 → 2014.2 |
Fix proposed to branch: master /review. openstack. org/117529
Review: https:/