Re: [Freeipa-devel] [PATCH] Improve serialization to JSON.
On 2010-08-11 22:55, Rob Crittenden wrote: Pavel Zůna wrote: On 2010-08-10 21:45, Rob Crittenden wrote: Pavel Zuna wrote: - Make it recursive. - Make Param classes serializable. - Take python native data types into account. Pavel Oops, sorry, commented on wrong patch. This looks ok but you have a serious whitespace issue in the def __json__ method. ack if you fix that before pushing. rob Version with fixed whitespace attached. Pavel This isn't applying. I'm assuming there is some other patch I haven't pushed but I wasn't able to find it. rob It depends on: [PATCH] Make LDAPObject classes JSON serializable (posted 2010-08-09) (pzuna-freeipa-0006-json.patch) Pavel ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] Change the behaviour of addattr/setattr parameters
On 2010-08-12 04:46, Rob Crittenden wrote: Pavel Zůna wrote: setattr and addattr can now be used both to set all values of ANY attribute. the last setattr always resets the attribute to the specified value and all addattr append to it. Examples: user-mod testuser --setattr=title=msc title: msc user-mod testuser --setattr=title=msb title: msb user-mod testuser --addattr=title=msc title: msb, msc user-mod testuser --setattr=title= title: user-mod testuser --setattr=title=msc --addattr=msb title: msc, msb user-mod testuser --setattr=title=ing --addattr=bc title: ing, bc user-mod testuser --setattr=title=doc title: doc It's not very user friendly, but it's going to be used very very rarely in special conditions in the CLI and we can use it to save lots of JSON-RPC roundtrips in the webUI. Pavel It was my intention when I added addattr and setattr that one couldn't set already-defined params this way. They were silently ignored. So you couldn't do: user-mod testuser --setattr=givenname=Jeff This would be possible with this patch. Was that intentional? BTW I have the start of a test suite for this functionality. rob Yes, it is intentional. I forgot to mention it in the description. I'm using setattr/addattr for everything in the webUI - it makes the code a lot simpler. Pavel ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] Change the behaviour of addattr/setattr parameters
Pavel Zůna wrote: On 2010-08-12 04:46, Rob Crittenden wrote: Pavel Zůna wrote: setattr and addattr can now be used both to set all values of ANY attribute. the last setattr always resets the attribute to the specified value and all addattr append to it. Examples: user-mod testuser --setattr=title=msc title: msc user-mod testuser --setattr=title=msb title: msb user-mod testuser --addattr=title=msc title: msb, msc user-mod testuser --setattr=title= title: user-mod testuser --setattr=title=msc --addattr=msb title: msc, msb user-mod testuser --setattr=title=ing --addattr=bc title: ing, bc user-mod testuser --setattr=title=doc title: doc It's not very user friendly, but it's going to be used very very rarely in special conditions in the CLI and we can use it to save lots of JSON-RPC roundtrips in the webUI. Pavel It was my intention when I added addattr and setattr that one couldn't set already-defined params this way. They were silently ignored. So you couldn't do: user-mod testuser --setattr=givenname=Jeff This would be possible with this patch. Was that intentional? BTW I have the start of a test suite for this functionality. rob Yes, it is intentional. I forgot to mention it in the description. I'm using setattr/addattr for everything in the webUI - it makes the code a lot simpler. Doesn't that invalidate all the validators we have in the plugins? This is why I disallowed it. rob ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] Stretch content div and make Reset/Update buttons stick to right.
Rob Crittenden wrote: Pavel Zuna wrote: I know that the user details page still doesn't look exactly like the mockups, but it's getting there and it's mostly just a matter of moving elements around - easy. Pavel ack pushed to master ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] Make LDAPObject classes JSON serializable
Rob Crittenden wrote: Pavel Zůna wrote: Allow LDAPObject classes (and sub-classes) to be serialized into a JSON string using: json.dumps(obj, default=ipalib.util.json_serialize) Pavel ack pushed to master ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] Add new parameters to LDAPSearch: timelimit and sizelimit.
Rob Crittenden wrote: Pavel Zůna wrote: Doesn't include Robs loading of default values from cn=ipaConfig. Pavel ack for now. We're going to need to remove the built-in defaults at some point and have it default to the value in cn=ipaconfig. I still need to rework the patch I made that does this. rob pushed to master ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] Fix bug: not found exc. handler was failing for singleton objects
Pavel Zůna wrote: On 2010-08-09 23:00, Rob Crittenden wrote: Pavel Zůna wrote: Very minor bug, that would probably never happen in production anyway, but why not fix it. Can you describe the situation this could occur in? How useful would the error be if the key isn't available? rob Well, I caught the bug thanks to a bad config file. The basedn was set to dc=example,dc=com and all searches were failing. The key isn't available on for singleton objects such as config, example: # ipa config-show ipa: ERROR: : configuration options not found Pavel ok, ack, pushed to master ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] Improve serialization to JSON.
Pavel Zůna wrote: On 2010-08-11 22:55, Rob Crittenden wrote: Pavel Zůna wrote: On 2010-08-10 21:45, Rob Crittenden wrote: Pavel Zuna wrote: - Make it recursive. - Make Param classes serializable. - Take python native data types into account. Pavel Oops, sorry, commented on wrong patch. This looks ok but you have a serious whitespace issue in the def __json__ method. ack if you fix that before pushing. rob Version with fixed whitespace attached. Pavel This isn't applying. I'm assuming there is some other patch I haven't pushed but I wasn't able to find it. rob It depends on: [PATCH] Make LDAPObject classes JSON serializable (posted 2010-08-09) (pzuna-freeipa-0006-json.patch) Pavel ok, ack, pushed to master ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] Change the behaviour of addattr/setattr parameters
On 2010-08-12 14:38, Rob Crittenden wrote: Pavel Zůna wrote: On 2010-08-12 04:46, Rob Crittenden wrote: Pavel Zůna wrote: setattr and addattr can now be used both to set all values of ANY attribute. the last setattr always resets the attribute to the specified value and all addattr append to it. Examples: user-mod testuser --setattr=title=msc title: msc user-mod testuser --setattr=title=msb title: msb user-mod testuser --addattr=title=msc title: msb, msc user-mod testuser --setattr=title= title: user-mod testuser --setattr=title=msc --addattr=msb title: msc, msb user-mod testuser --setattr=title=ing --addattr=bc title: ing, bc user-mod testuser --setattr=title=doc title: doc It's not very user friendly, but it's going to be used very very rarely in special conditions in the CLI and we can use it to save lots of JSON-RPC roundtrips in the webUI. Pavel It was my intention when I added addattr and setattr that one couldn't set already-defined params this way. They were silently ignored. So you couldn't do: user-mod testuser --setattr=givenname=Jeff This would be possible with this patch. Was that intentional? BTW I have the start of a test suite for this functionality. rob Yes, it is intentional. I forgot to mention it in the description. I'm using setattr/addattr for everything in the webUI - it makes the code a lot simpler. Doesn't that invalidate all the validators we have in the plugins? This is why I disallowed it. rob It does, but I see these options as something only experienced users, who need to set something we don't support directly, will use. Sometimes they might want to disable the validators, if they know what they're doing. We could also make the setattr/addattr handler in frontend.py detect if a there's a validator available and use it. Validators in the webUI is still something we need to figure out. Adam was proposing having validators in the form of regex strings, which is not a bad idea as it's easy to implement on any platform/language. On the other hand, I don't know if it's good enough for all parameters we have. Hmm. There's a lot to think about here actually. I'll make it my homework for the weekend. :) Pavel ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] 494 ipa command failover
On 07/26/2010 06:02 PM, Rob Crittenden wrote: Add failover to the ipa command. If the server defined in /etc/ipa/default.conf is not available then each ldap SRV record in DNS is tried until either one is found that works or none of the available servers are responding. ticket #15 rob ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel ACK ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel