If I understood correctly the json_exclude_attrs already defines the list of attributes to be excluded, so is it still necessary to define json_only_presence_options which basically will remove all attributes except name? Suppose later you're writing the UI console where you can type the CLI commands in the UI, do you think attributes like doc would be needed to show in the command help?

If this is fine then ACK on both.

Btw, the static test data (i.e. ipa_init_*.json) should be updated as well. You might want to create some scripts in install/ui/test/bin to update these files similar to update_ipa_init.sh.


On 6/4/2012 11:05 AM, Petr Vobornik wrote:
[PATCH] 152 Removal of illegal options in association dialog:

Association dialogs were using non-existent options for find commands.
It causes error when #2509 is implemented.

Now when creating a find command a check for options existence is
performed. Option is not used if not present in metadata. It fixes the
issue.

To be able to do the this check properly patch 151 is required.

[PATCH] 151 Change json serialization to serialize useful data:

json_metadata command creates and sends metadata needed by Web UI. It
uses __json__ method for serialization of commands, options, objects...
. A lot of data sent was useless for Web UI and some usefull information
were missing. We
* mostly CLI specific option attribues are not send.
* attributes evaluated to false or None are not send
* options which are send are not got from takes_aptions attribute but by
get_options() method. It finally sends usefull option collection for
commands part of metadata.

In the end the raw amount of data send is aproximately the same.

This patch is needed for Web UI to determine which option it can use in
which commands.

https://fedorahosted.org/freeipa/ticket/2760


--
Endi S. Dewata

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to