Hi, can anybody help me with extending the FreeIPA Server? I have few custom 
attributes in DS schema. I would like to be able to change the new attributes 
added via the JSON API and thus via the CLI tool.

Today I updated from version ipa-server-4.2.0 to ipa-server-4.4.0 from standart 
RHEL repo and I see plugin directory is on another location 
/usr/lib/python2.7/site-packages/ipaclient/plugins (old location was in version 
4.2.0 /usr/lib/python2.7/site-packages/ipalib/plugins/) and my old CLI 
extension stopped working with this error message:

ipa: ERROR: ImportError: No module named plugins

There is no documentation about that, or some examples. Can you anybody help me 
rewrite this simple code to working with new API version?

from ipalib.plugins import user
from ipalib.parameters import Int
from ipalib.parameters import Str
from ipalib import _
 
user.user.takes_params = user.user.takes_params + (
    Str('mailroutingaddress?',
    cli_name='mailroutingaddress',
    label=_('Mail routing address'),
    ),      
)


[root@ipa-03 plugins]# rpm -qa | grep ipa-server
ipa-server-4.4.0-12.el7.x86_64
ipa-server-common-4.4.0-12.el7.noarch
ipa-server-dns-4.4.0-12.el7.noarch

https://serverfault.com/questions/809810/minimal-example-of-extending-already-existing-api-and-cli-call-in-freeipa-4


Thank you a lot!
David

-- 
Manage your subscription for the Freeipa-users mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-users
Go to http://freeipa.org for more info on the project

Reply via email to