diff options
-rw-r--r-- | ipalib/plugins/f_service.py | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/ipalib/plugins/f_service.py b/ipalib/plugins/f_service.py index a353d52e..06d6a5d0 100644 --- a/ipalib/plugins/f_service.py +++ b/ipalib/plugins/f_service.py @@ -22,27 +22,30 @@ Frontend plugins for service (Identity). """ -from ipalib import frontend -from ipalib import crud -from ipalib.frontend import Param -from ipalib import api -from ipalib import errors -from ipalib import ipa_types - -class service(frontend.Object): +from ipalib import api, crud, errors +from ipalib import Object # Plugin base classes +from ipalib import Str, Flag # Parameter types + + +class service(Object): """ Service object. """ takes_params = ( - Param('principal', primary_key=True), + Str('principal', primary_key=True), ) api.register(service) class service_add(crud.Add): - 'Add a new service.' + """ + Add a new service. + """ + takes_options = ( - Param('force?', type=ipa_types.Bool(), default=False, doc='Force a service principal name'), + Flag('force', + doc='Force a service principal name', + ), ) def execute(self, principal, **kw): """ |