5 Commits

Author SHA1 Message Date
Jenkins
24c4382fed Merge "Deprecated extension name attribute" 2014-04-17 15:50:55 +00:00
Russell Haering
bf74673226 Decorated commands no longer take command_name
Prior to the (sync|async)_command decorators, extension methods had to
construct command results themselves, which required that they have
the name of the command being executed.

When the async_command decorator was introduced, we wanted to maintain
the current command interface, so that a command could be made
asynchronous simply by adding the decorator.

The introduction of the sync_command decorator allows us to satisfy
this objective, without requiring decorated methods to accept a
command_name. This patch modifies both decorators to no longer pass
the command_name argument, and modifies existing command methods not
to expect one.

Closes-Bug: #1308021
Change-Id: I1b33bb7519588cdcb79c6f4d2b10c1e5e8c0cca3
2014-04-15 10:25:12 -07:00
Vladimir Kozhukalov
9e153253e5 Deprecated extension name attribute
It seems not to be used, so it is not needed.

Change-Id: Ie46470d888ff11edaf16b94e5b2e716d13cf764f
Closes-Bug: #1308017
2014-04-15 15:56:09 +04:00
Russell Haering
dcd6e3e0dc Add a @sync_command() decorator
Instead of special-casing syncronous commands, add a decorator similar
to @async_command(), which can be used to decorate extension methods
for execution as a synchronous command.

Change-Id: I1b27f179f667cb065bcffd71ae0f303b05d33b82
2014-04-14 15:22:07 -07:00
Russell Haering
5ebd2e9797 Organize agent extensions
Move extensions under an ironic_python_agent.extensions module. This
change also moves the @async_command() decorator into the base
extension module.

Change-Id: I4021fcc33a30f3460a31bca44a4bf776cd53d488
2014-04-14 15:09:12 -07:00