From 7336a176b43989b9d459a2536af88f89e849213f Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 21 Jun 2012 08:20:26 -0400 Subject: Add the version option to all Commands Several Commands were missing the 'version' option. Add it to those that were missing it. Do not remove the version option before calling commands. This means methods such as execute(), forward(), run() receive it. Several of these needed `**options` added to their signatures. Commands in the Cert plugin passed any unknown options to the underlying functions, these are changed to pass what's needed explicitly. Some commands in DNS and Batch plugins now pass version to commands they call. When the option is not given, fill it in automatically. (In a subsequent commit, a warning will be added in this case). Note that the public API did not change: all RPC calls already accepted a version option. There's no need for an API version bump (even though API.txt changes substantially). Design page: http://freeipa.org/page/V3/Messages Tickets: https://fedorahosted.org/freeipa/ticket/2732 https://fedorahosted.org/freeipa/ticket/3294 --- doc/examples/examples.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/examples/examples.py b/doc/examples/examples.py index a969c898..4ac415f1 100644 --- a/doc/examples/examples.py +++ b/doc/examples/examples.py @@ -97,7 +97,7 @@ class exhelloworld(Command): # This is where the command functionality should go. # It is always executed on the server-side, so don't rely # on client-side stuff in here! - def execute(self, name): + def execute(self, name, **options): return dict(summary='Hello world, %s!' % name) # register the command, uncomment this line if you want to try it out -- cgit