On 01/13/2012 11:09 AM, Petr Vobornik wrote:
I have created a helper tool (script) for updating install/ui/test/data/*.json files which are used for offline presentation of FreeIPA Web UI. So I'm sharing it as it might be useful for others.


Main purpose:
* updating ipa_init*.json files (should replace old not-working bash script)
* creating new *.json files when implementing new UI functionality
* updating existing files when modifying UI.

Pros:
* command definition is very easy - just copy it from Chromium or other developer tool a paste it into the code (with little text around).

How it works:
* user can define commands - concrete command with name, arguments and options

then it can
* call the command (using curl) and get JSON response from IPA server
* modify the response
* save response to file
* or print response to console

Current modification of response:
* replaces dns, domains, hostname from IPA server's to dev.example.com
* removes principal and version (no more various GIT versions)
* removes trailing whitespaces

Additional functionality:
* possibility to define command groups
* can execute multiple commands or groups
* list defined commands and groups

Common usage:
ipa-json.py -v -d -s --methods method_name method_2_name

or type 'ipa-json.py -h' for more options

note: command and method mean basically the same, the naming should be united...

Possible future enhancements:
* add kerberos authentication
* split definition of methods, code and configuration to multiple files



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

Petr,

Kerberos should be pretty straight forward.  For command line  curl it is

--negotiate -u  --delegation always

so you should be able to add those options right before c.setopt(pycurl.URL, url)




||
        ||






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

Reply via email to