[Freeipa-users] FreeIPA 4.4 plugin migration path

David Kupka dkupka at redhat.com
Tue Jan 17 10:48:22 UTC 2017


On 17/01/17 11:30, Peter Fern wrote:
> On 17/01/17 20:39, David Kupka wrote:
>> in 4.4 we split the plugins to the server and client plugins. Simple
>> plugins (like server plugin) needs to exist only on server and all
>> what is needed is to move it from ipalib/plugins to ipaserver/plugins.
>>
>> But if commands in your plugin define interactive_prompt_callback
>> (like dns plugin) or forward (like vault plugin) you will need to
>> split the client and server part of the plugin.
>>
> Hi David,
>
> I tried that, but it didn't end well.  My plugin is quite simple, just
> adds an attribute to the user model and UI/CLI extensions to manage it.
> However it looks like plugin structure has changed (I see @register
> decorators(?) and such), and ipalib.user no longer exists.  My old
> plugin is available here:
>
> https://github.com/pdf/freeipa-user-mailalternateaddress/blob/master/user_mailalternateaddress.py
>
> Unfortunately Python is not a language I'm particularly familiar, so
> I've not come across some of the patterns used in the new plugins, and
> any pointers would be appreciated.
>
> Thanks,
>
> Pete
>

Ok, your plugin is not really a plugin but that should not be a problem.
To make it work:

1) replace "from ipalib.plugins.user import user" with "from 
ipaserver.plugins.user import user"
2) make sure "user_mailalternateaddress.py" is also in ipaserver/plugins/
3) restart httpd

-- 
David Kupka




More information about the Freeipa-users mailing list