class entitle_import(Method): __doc__ = _("Import an entitlement certificate.") takes_args = (parameters.Str( 'usercertificate', required=False, multivalue=True, cli_name='certificate_file', ), ) takes_options = ( parameters.Str( 'setattr', required=False, multivalue=True, doc= _(u'Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.' ), exclude=('webui', ), ), parameters.Str( 'addattr', required=False, multivalue=True, doc= _(u'Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.' ), exclude=('webui', ), ), parameters.Str( 'uuid', required=False, label=_(u'UUID'), doc=_(u'Enrollment UUID'), default=u'IMPORTED', autofill=True, ), ) has_output = (output.Output( 'result', dict, doc=_(u'Dictionary mapping variable name to value'), ), )
class idrange(Object): takes_params = ( parameters.Str( 'cn', primary_key=True, label=_(u'Range name'), ), parameters.Int( 'ipabaseid', label=_(u'First Posix ID of the range'), ), parameters.Int( 'ipaidrangesize', label=_(u'Number of IDs in the range'), ), parameters.Int( 'ipabaserid', required=False, label=_(u'First RID of the corresponding RID range'), ), parameters.Int( 'ipasecondarybaserid', required=False, label=_(u'First RID of the secondary RID range'), ), parameters.Str( 'ipanttrusteddomainsid', required=False, label=_(u'Domain SID of the trusted domain'), ), parameters.Str( 'ipanttrusteddomainname', required=False, label=_(u'Name of the trusted domain'), ), parameters.Str( 'iparangetype', required=False, label=_(u'Range type'), doc=_(u'ID range type, one of ipa-ad-trust-posix, ipa-ad-trust, ipa-local'), ), )
class user_show(Method): __doc__ = _("Display information about a user.") takes_args = (parameters.Str( 'uid', cli_name='login', label=_(u'User login'), default_from=DefaultFrom(lambda givenname, sn: givenname[0] + sn, 'principal'), no_convert=True, ), ) takes_options = ( parameters.Flag( 'rights', label=_(u'Rights'), doc= _(u'Display the access rights of this entry (requires --all). See ipa man page for details.' ), default=False, autofill=True, ), parameters.Flag( 'all', doc= _(u'Retrieve and print all attributes from the server. Affects command output.' ), exclude=('webui', ), default=False, autofill=True, ), parameters.Flag( 'raw', doc= _(u'Print entries as stored on the server. Only affects output format.' ), exclude=('webui', ), default=False, autofill=True, ), ) has_output = ( output.Output( 'summary', (unicode, type(None)), doc=_(u'User-friendly description of action performed'), ), output.Entry('result', ), output.Output( 'value', unicode, doc=_( u"The primary_key value of the entry, e.g. 'jdoe' for a user"), ), )
class hbacsvc(Object): takes_params = ( parameters.Str( 'cn', primary_key=True, label=_(u'Service name'), doc=_(u'HBAC service'), ), parameters.Str( 'description', required=False, label=_(u'Description'), doc=_(u'HBAC service description'), ), parameters.Str( 'memberof_hbacsvcgroup', required=False, label=_(u'Member of HBAC service groups'), ), )
class role_show(Method): __doc__ = _("Display information about a role.") takes_args = ( parameters.Str( 'cn', cli_name='name', label=_(u'Role name'), ), ) takes_options = ( parameters.Flag( 'rights', label=_(u'Rights'), doc=_(u'Display the access rights of this entry (requires --all). See ipa man page for details.'), default=False, autofill=True, ), parameters.Flag( 'all', doc=_(u'Retrieve and print all attributes from the server. Affects command output.'), exclude=('webui',), default=False, autofill=True, ), parameters.Flag( 'raw', doc=_(u'Print entries as stored on the server. Only affects output format.'), exclude=('webui',), default=False, autofill=True, ), parameters.Flag( 'no_members', doc=_(u'Suppress processing of membership attributes.'), exclude=('webui', 'cli'), default=False, autofill=True, ), ) has_output = ( output.Output( 'summary', (unicode, type(None)), doc=_(u'User-friendly description of action performed'), ), output.Entry( 'result', ), output.PrimaryKey( 'value', doc=_(u"The primary_key value of the entry, e.g. 'jdoe' for a user"), ), )
class cert_remove_hold(Command): __doc__ = _("Take a revoked certificate off hold.") takes_args = (parameters.Str( 'serial_number', label=_(u'Serial number'), doc=_( u'Serial number in decimal or if prefixed with 0x in hexadecimal'), no_convert=True, ), ) has_output = (output.Output('result', ), )
class automountlocation_tofiles(Method): __doc__ = _("Generate automount files for a specific location.") takes_args = (parameters.Str( 'cn', cli_name='location', label=_(u'Location'), doc=_(u'Automount location name.'), ), ) takes_options = () has_output = (output.Output('result', ), )
class trustconfig_show(Method): __doc__ = _("Show global trust configuration.") takes_options = ( parameters.Flag( 'rights', label=_(u'Rights'), doc= _(u'Display the access rights of this entry (requires --all). See ipa man page for details.' ), default=False, autofill=True, ), parameters.Str( 'trust_type', cli_name='type', cli_metavar="['ad']", label=_(u'Trust type (ad for Active Directory, default)'), default=u'ad', autofill=True, ), parameters.Flag( 'all', doc= _(u'Retrieve and print all attributes from the server. Affects command output.' ), exclude=('webui', ), default=False, autofill=True, ), parameters.Flag( 'raw', doc= _(u'Print entries as stored on the server. Only affects output format.' ), exclude=('webui', ), default=False, autofill=True, ), ) has_output = ( output.Output( 'summary', (unicode, type(None)), doc=_(u'User-friendly description of action performed'), ), output.Entry('result', ), output.Output( 'value', unicode, doc=_( u"The primary_key value of the entry, e.g. 'jdoe' for a user"), ), )
class automountmap_del(Method): __doc__ = _("Delete an automount map.") takes_args = ( parameters.Str( 'automountlocationcn', cli_name='automountlocation', label=_(u'Location'), ), parameters.Str( 'automountmapname', multivalue=True, cli_name='map', label=_(u'Map'), doc=_(u'Automount map name.'), ), ) takes_options = (parameters.Flag( 'continue', doc=_(u"Continuous mode: Don't stop on errors."), default=False, autofill=True, ), ) has_output = ( output.Output( 'summary', (unicode, type(None)), doc=_(u'User-friendly description of action performed'), ), output.Output( 'result', dict, doc=_(u'List of deletions that failed'), ), output.Output( 'value', unicode, doc=_( u"The primary_key value of the entry, e.g. 'jdoe' for a user"), ), )
class topologysuffix(Object): takes_params = ( parameters.Str( 'cn', primary_key=True, label=_(u'Suffix name'), ), parameters.DNParam( 'iparepltopoconfroot', label=_(u'Managed LDAP suffix DN'), ), )
class trust_fetch_domains(Method): __doc__ = _("Refresh list of the domains associated with the trust") takes_args = ( parameters.Str( 'cn', cli_name='realm', label=_(u'Realm name'), ), ) takes_options = ( parameters.Flag( 'rights', label=_(u'Rights'), doc=_(u'Display the access rights of this entry (requires --all). See ipa man page for details.'), default=False, autofill=True, ), parameters.Flag( 'all', doc=_(u'Retrieve and print all attributes from the server. Affects command output.'), exclude=('webui',), default=False, autofill=True, ), parameters.Flag( 'raw', doc=_(u'Print entries as stored on the server. Only affects output format.'), exclude=('webui',), default=False, autofill=True, ), ) has_output = ( output.Output( 'summary', (unicode, type(None)), doc=_(u'User-friendly description of action performed'), ), output.ListOfEntries( 'result', ), output.Output( 'count', int, doc=_(u'Number of entries returned'), ), output.Output( 'truncated', bool, doc=_(u'True if not all results were returned'), ), )
class selfservice(Object): takes_params = ( parameters.Str( 'aciname', primary_key=True, label=_(u'Self-service name'), ), parameters.Str( 'permissions', required=False, multivalue=True, label=_(u'Permissions'), doc=_(u'Permissions to grant (read, write). Default is write.'), ), parameters.Str( 'attrs', multivalue=True, label=_(u'Attributes'), doc=_(u'Attributes to which the permission applies.'), ), )
class cert_request(Command): __doc__ = _("Submit a certificate signing request.") takes_args = (parameters.Str( 'csr', cli_name='csr_file', label=_(u'CSR'), no_convert=True, ), ) takes_options = ( parameters.Str( 'principal', label=_(u'Principal'), doc=_( u'Principal for this certificate (e.g. HTTP/test.example.com)' ), ), parameters.Str( 'request_type', default=u'pkcs10', autofill=True, ), parameters.Flag( 'add', doc=_(u"automatically add the principal if it doesn't exist"), default=False, autofill=True, ), parameters.Str( 'profile_id', required=False, label=_(u'Profile ID'), doc=_(u'Certificate Profile to use'), ), ) has_output = (output.Output( 'result', dict, doc=_(u'Dictionary mapping variable name to value'), ), )
class krbtpolicy_show(Method): __doc__ = _("Display the current Kerberos ticket policy.") takes_args = (parameters.Str( 'uid', required=False, cli_name='user', label=_(u'User name'), doc=_(u'Manage ticket policy for specific user'), ), ) takes_options = ( parameters.Flag( 'rights', label=_(u'Rights'), doc= _(u'Display the access rights of this entry (requires --all). See ipa man page for details.' ), default=False, autofill=True, ), parameters.Flag( 'all', doc= _(u'Retrieve and print all attributes from the server. Affects command output.' ), exclude=('webui', ), default=False, autofill=True, ), parameters.Flag( 'raw', doc= _(u'Print entries as stored on the server. Only affects output format.' ), exclude=('webui', ), default=False, autofill=True, ), ) has_output = ( output.Output( 'summary', (unicode, type(None)), doc=_(u'User-friendly description of action performed'), ), output.Entry('result', ), output.PrimaryKey( 'value', doc=_( u"The primary_key value of the entry, e.g. 'jdoe' for a user"), ), )
class passwd(Command): __doc__ = _("Set a user's password.") takes_args = ( parameters.Str( 'principal', cli_name='user', label=_(u'User name'), default_from=DefaultFrom(lambda : None), # FIXME: # lambda: krb_utils.get_principal() autofill=True, no_convert=True, ), parameters.Password( 'password', label=_(u'New Password'), confirm=True, ), parameters.Password( 'current_password', label=_(u'Current Password'), default_from=DefaultFrom(lambda principal: None, 'principal'), # FIXME: # lambda principal: get_current_password(principal) autofill=True, ), ) takes_options = ( parameters.Password( 'otp', required=False, label=_(u'OTP'), doc=_(u'One Time Password'), ), ) has_output = ( output.Output( 'summary', (unicode, type(None)), doc=_(u'User-friendly description of action performed'), ), output.Output( 'result', bool, doc=_(u'True means the operation was successful'), ), output.PrimaryKey( 'value', doc=_(u"The primary_key value of the entry, e.g. 'jdoe' for a user"), ), )
class trustdomain_del(Method): __doc__ = _("Remove information about the domain associated with the trust.") takes_args = ( parameters.Str( 'trustcn', cli_name='trust', label=_(u'Realm name'), ), parameters.Str( 'cn', multivalue=True, cli_name='domain', label=_(u'Domain name'), ), ) takes_options = ( parameters.Flag( 'continue', doc=_(u"Continuous mode: Don't stop on errors."), default=False, autofill=True, ), ) has_output = ( output.Output( 'summary', (unicode, type(None)), doc=_(u'User-friendly description of action performed'), ), output.Output( 'result', dict, doc=_(u'List of deletions that failed'), ), output.ListOfPrimaryKeys( 'value', ), )
class stageuser_activate(Method): __doc__ = _("Activate a stage user.") takes_args = (parameters.Str( 'uid', cli_name='login', label=_(u'User login'), default_from=DefaultFrom(lambda givenname, sn: givenname[0] + sn, 'principal'), no_convert=True, ), ) takes_options = ( parameters.Flag( 'all', doc= _(u'Retrieve and print all attributes from the server. Affects command output.' ), exclude=('webui', ), default=False, autofill=True, ), parameters.Flag( 'raw', doc= _(u'Print entries as stored on the server. Only affects output format.' ), exclude=('webui', ), default=False, autofill=True, ), parameters.Flag( 'no_members', doc=_(u'Suppress processing of membership attributes.'), exclude=('webui', 'cli'), default=False, autofill=True, ), ) has_output = ( output.Output( 'summary', (unicode, type(None)), doc=_(u'User-friendly description of action performed'), ), output.Entry('result', ), output.PrimaryKey( 'value', doc=_( u"The primary_key value of the entry, e.g. 'jdoe' for a user"), ), )
class join(Command): __doc__ = _("Join an IPA domain") takes_args = ( parameters.Str( 'cn', cli_name='hostname', doc=_(u'The hostname to register as'), default_from=DefaultFrom(lambda : None), # FIXME: # lambda: unicode(installutils.get_fqdn()) autofill=True, ), ) takes_options = ( parameters.Str( 'realm', doc=_(u'The IPA realm'), default_from=DefaultFrom(lambda : None), # FIXME: # lambda: get_realm() autofill=True, ), parameters.Str( 'nshardwareplatform', required=False, cli_name='platform', doc=_(u'Hardware platform of the host (e.g. Lenovo T61)'), ), parameters.Str( 'nsosversion', required=False, cli_name='os', doc=_(u'Operating System and version of the host (e.g. Fedora 9)'), ), ) has_output = ( )
class server(Object): takes_params = ( parameters.Str( 'cn', primary_key=True, label=_(u'Server name'), doc=_(u'IPA server hostname'), ), parameters.Str( 'iparepltopomanagedsuffix', label=_(u'Managed suffix'), ), parameters.Int( 'ipamindomainlevel', label=_(u'Min domain level'), doc=_(u'Minimum domain level'), ), parameters.Int( 'ipamaxdomainlevel', label=_(u'Max domain level'), doc=_(u'Maximum domain level'), ), )
class privilege(Object): takes_params = ( parameters.Str( 'cn', primary_key=True, label=_(u'Privilege name'), ), parameters.Str( 'description', label=_(u'Description'), doc=_(u'Privilege description'), ), parameters.Str( 'memberof_permission', required=False, label=_(u'Permissions'), ), parameters.Str( 'member_role', required=False, label=_(u'Granting privilege to roles'), ), )
class trustdomain(Object): takes_params = ( parameters.Str( 'cn', primary_key=True, label=_(u'Domain name'), ), parameters.Str( 'ipantflatname', required=False, label=_(u'Domain NetBIOS name'), ), parameters.Str( 'ipanttrusteddomainsid', required=False, label=_(u'Domain Security Identifier'), ), parameters.Str( 'ipanttrustpartner', required=False, label=_(u'Trusted domain partner'), ), )
class trustconfig(Object): takes_params = ( parameters.Str( 'cn', label=_(u'Domain'), ), parameters.Str( 'ipantsecurityidentifier', label=_(u'Security Identifier'), ), parameters.Str( 'ipantflatname', label=_(u'NetBIOS name'), ), parameters.Str( 'ipantdomainguid', label=_(u'Domain GUID'), ), parameters.Str( 'ipantfallbackprimarygroup', label=_(u'Fallback primary group'), ), )
class aci_del(Method): __doc__ = _("Delete ACI.") NO_CLI = True takes_args = (parameters.Str( 'aciname', cli_name='name', label=_(u'ACI name'), ), ) takes_options = (parameters.Str( 'aciprefix', cli_name='prefix', cli_metavar="['permission', 'delegation', 'selfservice', 'none']", label=_(u'ACI prefix'), doc= _(u'Prefix used to distinguish ACI types (permission, delegation, selfservice, none)' ), ), ) has_output = ( output.Output( 'summary', (unicode, type(None)), doc=_(u'User-friendly description of action performed'), ), output.Output( 'result', bool, doc=_(u'True means the operation was successful'), ), output.Output( 'value', unicode, doc=_( u"The primary_key value of the entry, e.g. 'jdoe' for a user"), ), )
class server_conncheck(Method): __doc__ = _("Check connection to remote IPA server.") NO_CLI = True takes_args = ( parameters.Str( 'cn', cli_name='name', label=_(u'Server name'), doc=_(u'IPA server hostname'), ), parameters.Str( 'remote_cn', cli_name='remote_name', label=_(u'Remote server name'), doc=_(u'Remote IPA server hostname'), ), ) takes_options = ( ) has_output = ( output.Output( 'summary', (unicode, type(None)), doc=_(u'User-friendly description of action performed'), ), output.Output( 'result', bool, doc=_(u'True means the operation was successful'), ), output.PrimaryKey( 'value', doc=_(u"The primary_key value of the entry, e.g. 'jdoe' for a user"), ), )
class idoverridegroup(Object): takes_params = ( parameters.Str( 'ipaanchoruuid', primary_key=True, label=_(u'Anchor to override'), ), parameters.Str( 'description', required=False, label=_(u'Description'), ), parameters.Str( 'cn', required=False, label=_(u'Group name'), ), parameters.Int( 'gidnumber', required=False, label=_(u'GID'), doc=_(u'Group ID Number'), ), )
class env(Command): __doc__ = _("Show environment variables.") takes_args = ( parameters.Str( 'variables', required=False, multivalue=True, ), ) takes_options = ( parameters.Flag( 'server', required=False, doc=_(u'Forward to server instead of running locally'), default=False, autofill=True, ), parameters.Flag( 'all', doc=_(u'retrieve and print all attributes from the server. Affects command output.'), exclude=('webui',), default=True, autofill=True, ), ) has_output = ( output.Output( 'result', dict, doc=_(u'Dictionary mapping variable name to value'), ), output.Output( 'total', int, doc=_(u'Total number of variables env (>= count)'), ), output.Output( 'count', int, doc=_(u'Number of variables returned (<= total)'), ), output.Output( 'summary', (unicode, type(None)), doc=_(u'User-friendly description of action performed'), ), )
class cert_status(Command): __doc__ = _("Check the status of a certificate signing request.") takes_args = ( parameters.Str( 'request_id', label=_(u'Request id'), ), ) takes_options = ( ) has_output = ( output.Output( 'result', ), )
class role(Object): takes_params = ( parameters.Str( 'cn', primary_key=True, label=_(u'Role name'), ), parameters.Str( 'description', required=False, label=_(u'Description'), doc=_(u'A description of this role-group'), ), parameters.Str( 'member_user', required=False, label=_(u'Member users'), ), parameters.Str( 'member_group', required=False, label=_(u'Member groups'), ), parameters.Str( 'member_host', required=False, label=_(u'Member hosts'), ), parameters.Str( 'member_hostgroup', required=False, label=_(u'Member host-groups'), ), parameters.Str( 'memberof_privilege', required=False, label=_(u'Privileges'), ), parameters.Str( 'member_service', required=False, label=_(u'Member services'), ), )
class sudorule_enable(Method): __doc__ = _("Enable a Sudo Rule.") takes_args = ( parameters.Str( 'cn', cli_name='sudorule_name', label=_(u'Rule name'), ), ) takes_options = ( ) has_output = ( output.Output( 'result', ), )
class cert_revoke(Command): __doc__ = _("Revoke a certificate.") takes_args = (parameters.Str( 'serial_number', label=_(u'Serial number'), doc=_( u'Serial number in decimal or if prefixed with 0x in hexadecimal'), no_convert=True, ), ) takes_options = (parameters.Int( 'revocation_reason', label=_(u'Reason'), doc=_(u'Reason for revoking the certificate (0-10)'), default=0, autofill=True, ), ) has_output = (output.Output('result', ), )