[Freeipa-devel] [PATCH] 136 Merged IPA.cmd() into IPA.command().

Endi Sukma Dewata edewata at redhat.com
Wed Apr 13 20:57:12 UTC 2011


On 4/13/2011 9:19 AM, Adam Young wrote:
> I'm not a fan of the string concatination in the command calls. I'd
> prefer to do that inside the IPA.command object, the way it was done in
> IPA.cmd:
>
>
> {
> entity:cert
> method:revoke:
> ...
> }
>
>
> and
>
> if (spec.entity){
> method = spec.entity + spec.method;
> }else{
> method = spec.method;
> }

Attached is a new patch.

The original idea was that spec parameters would match the properties of 
the JSON request where the entity name is part of the method name. Now 
they are stored in separate variables and the actual method for JSON 
request is generated using the get_command(). This allows changing the 
entity or method name after the command has been created.

-- 
Endi S. Dewata
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-edewata-0136-2-Merged-IPA.cmd-into-IPA.command.patch
Type: text/x-patch
Size: 59701 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110413/ae7b8e70/attachment.bin>


More information about the Freeipa-devel mailing list