diff --git a/API.txt b/API.txt index ced63ad11..1781de6cf 100644 --- a/API.txt +++ b/API.txt @@ -1883,6 +1883,79 @@ output: Output('value', , None) command: i18n_messages args: 0,0,1 output: Output('messages', , None) +command: idrange_add +args: 1,11,3 +arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, required=True) +option: Int('ipabaseid', attribute=True, cli_name='base_id', multivalue=False, required=True) +option: Int('ipaidrangesize', attribute=True, cli_name='range_size', multivalue=False, required=True) +option: Int('ipabaserid', attribute=True, cli_name='rid_base', multivalue=False, required=True) +option: Int('ipasecondarybaserid', attribute=True, cli_name='secondary_rid_base', multivalue=False, required=False) +option: Str('ipanttrusteddomainsid', attribute=True, cli_name='dom_sid', multivalue=False, required=False) +option: Str('iparangetype', attribute=True, cli_name='iparangetype', multivalue=False, required=False) +option: Str('setattr*', cli_name='setattr', exclude='webui') +option: Str('addattr*', cli_name='addattr', exclude='webui') +option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui') +option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui') +option: Str('version?', exclude='webui') +output: Output('summary', (, ), None) +output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) +output: Output('value', , None) +command: idrange_del +args: 1,1,3 +arg: Str('cn', attribute=True, cli_name='name', multivalue=True, primary_key=True, query=True, required=True) +option: Flag('continue', autofill=True, cli_name='continue', default=False) +output: Output('summary', (, ), None) +output: Output('result', , None) +output: Output('value', , None) +command: idrange_find +args: 1,13,4 +arg: Str('criteria?', noextrawhitespace=False) +option: Str('cn', attribute=True, autofill=False, cli_name='name', multivalue=False, primary_key=True, query=True, required=False) +option: Int('ipabaseid', attribute=True, autofill=False, cli_name='base_id', multivalue=False, query=True, required=False) +option: Int('ipaidrangesize', attribute=True, autofill=False, cli_name='range_size', multivalue=False, query=True, required=False) +option: Int('ipabaserid', attribute=True, autofill=False, cli_name='rid_base', multivalue=False, query=True, required=False) +option: Int('ipasecondarybaserid', attribute=True, autofill=False, cli_name='secondary_rid_base', multivalue=False, query=True, required=False) +option: Str('ipanttrusteddomainsid', attribute=True, autofill=False, cli_name='dom_sid', multivalue=False, query=True, required=False) +option: Str('iparangetype', attribute=True, autofill=False, cli_name='iparangetype', multivalue=False, query=True, required=False) +option: Int('timelimit?', autofill=False, minvalue=0) +option: Int('sizelimit?', autofill=False, minvalue=0) +option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui') +option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui') +option: Str('version?', exclude='webui') +option: Flag('pkey_only?', autofill=True, default=False) +output: Output('summary', (, ), None) +output: ListOfEntries('result', (, ), Gettext('A list of LDAP entries', domain='ipa', localedir=None)) +output: Output('count', , None) +output: Output('truncated', , None) +command: idrange_mod +args: 1,13,3 +arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) +option: Int('ipabaseid', attribute=True, autofill=False, cli_name='base_id', multivalue=False, required=False) +option: Int('ipaidrangesize', attribute=True, autofill=False, cli_name='range_size', multivalue=False, required=False) +option: Int('ipabaserid', attribute=True, autofill=False, cli_name='rid_base', multivalue=False, required=False) +option: Int('ipasecondarybaserid', attribute=True, autofill=False, cli_name='secondary_rid_base', multivalue=False, required=False) +option: Str('ipanttrusteddomainsid', attribute=True, autofill=False, cli_name='dom_sid', multivalue=False, required=False) +option: Str('iparangetype', attribute=True, autofill=False, cli_name='iparangetype', multivalue=False, required=False) +option: Str('setattr*', cli_name='setattr', exclude='webui') +option: Str('addattr*', cli_name='addattr', exclude='webui') +option: Str('delattr*', cli_name='delattr', exclude='webui') +option: Flag('rights', autofill=True, default=False) +option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui') +option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui') +option: Str('version?', exclude='webui') +output: Output('summary', (, ), None) +output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) +output: Output('value', , None) +command: idrange_show +args: 1,4,3 +arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) +option: Flag('rights', autofill=True, default=False) +option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui') +option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui') +option: Str('version?', exclude='webui') +output: Output('summary', (, ), None) +output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) +output: Output('value', , None) command: json_metadata args: 2,3,3 arg: Str('objname?') @@ -2376,79 +2449,6 @@ option: Str('version?', exclude='webui') output: Output('summary', (, ), None) output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('value', , None) -command: range_add -args: 1,11,3 -arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, required=True) -option: Int('ipabaseid', attribute=True, cli_name='base_id', multivalue=False, required=True) -option: Int('ipaidrangesize', attribute=True, cli_name='range_size', multivalue=False, required=True) -option: Int('ipabaserid', attribute=True, cli_name='rid_base', multivalue=False, required=True) -option: Int('ipasecondarybaserid', attribute=True, cli_name='secondary_rid_base', multivalue=False, required=False) -option: Str('ipanttrusteddomainsid', attribute=True, cli_name='dom_sid', multivalue=False, required=False) -option: Str('iparangetype', attribute=True, cli_name='iparangetype', multivalue=False, required=False) -option: Str('setattr*', cli_name='setattr', exclude='webui') -option: Str('addattr*', cli_name='addattr', exclude='webui') -option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui') -option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui') -option: Str('version?', exclude='webui') -output: Output('summary', (, ), None) -output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) -output: Output('value', , None) -command: range_del -args: 1,1,3 -arg: Str('cn', attribute=True, cli_name='name', multivalue=True, primary_key=True, query=True, required=True) -option: Flag('continue', autofill=True, cli_name='continue', default=False) -output: Output('summary', (, ), None) -output: Output('result', , None) -output: Output('value', , None) -command: range_find -args: 1,13,4 -arg: Str('criteria?', noextrawhitespace=False) -option: Str('cn', attribute=True, autofill=False, cli_name='name', multivalue=False, primary_key=True, query=True, required=False) -option: Int('ipabaseid', attribute=True, autofill=False, cli_name='base_id', multivalue=False, query=True, required=False) -option: Int('ipaidrangesize', attribute=True, autofill=False, cli_name='range_size', multivalue=False, query=True, required=False) -option: Int('ipabaserid', attribute=True, autofill=False, cli_name='rid_base', multivalue=False, query=True, required=False) -option: Int('ipasecondarybaserid', attribute=True, autofill=False, cli_name='secondary_rid_base', multivalue=False, query=True, required=False) -option: Str('ipanttrusteddomainsid', attribute=True, autofill=False, cli_name='dom_sid', multivalue=False, query=True, required=False) -option: Str('iparangetype', attribute=True, autofill=False, cli_name='iparangetype', multivalue=False, query=True, required=False) -option: Int('timelimit?', autofill=False, minvalue=0) -option: Int('sizelimit?', autofill=False, minvalue=0) -option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui') -option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui') -option: Str('version?', exclude='webui') -option: Flag('pkey_only?', autofill=True, default=False) -output: Output('summary', (, ), None) -output: ListOfEntries('result', (, ), Gettext('A list of LDAP entries', domain='ipa', localedir=None)) -output: Output('count', , None) -output: Output('truncated', , None) -command: range_mod -args: 1,13,3 -arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) -option: Int('ipabaseid', attribute=True, autofill=False, cli_name='base_id', multivalue=False, required=False) -option: Int('ipaidrangesize', attribute=True, autofill=False, cli_name='range_size', multivalue=False, required=False) -option: Int('ipabaserid', attribute=True, autofill=False, cli_name='rid_base', multivalue=False, required=False) -option: Int('ipasecondarybaserid', attribute=True, autofill=False, cli_name='secondary_rid_base', multivalue=False, required=False) -option: Str('ipanttrusteddomainsid', attribute=True, autofill=False, cli_name='dom_sid', multivalue=False, required=False) -option: Str('iparangetype', attribute=True, autofill=False, cli_name='iparangetype', multivalue=False, required=False) -option: Str('setattr*', cli_name='setattr', exclude='webui') -option: Str('addattr*', cli_name='addattr', exclude='webui') -option: Str('delattr*', cli_name='delattr', exclude='webui') -option: Flag('rights', autofill=True, default=False) -option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui') -option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui') -option: Str('version?', exclude='webui') -output: Output('summary', (, ), None) -output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) -output: Output('value', , None) -command: range_show -args: 1,4,3 -arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) -option: Flag('rights', autofill=True, default=False) -option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui') -option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui') -option: Str('version?', exclude='webui') -output: Output('summary', (, ), None) -output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) -output: Output('value', , None) command: role_add args: 1,6,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, required=True) diff --git a/install/ui/Makefile.am b/install/ui/Makefile.am index 841e210e2..1dc321602 100644 --- a/install/ui/Makefile.am +++ b/install/ui/Makefile.am @@ -54,7 +54,7 @@ app_DATA = \ overpass_regular-web.ttf \ overpass_regular-web.woff \ policy.js \ - range.js \ + idrange.js \ reset_password.js \ reset_password.html \ rule.js \ diff --git a/install/ui/range.js b/install/ui/idrange.js similarity index 64% rename from install/ui/range.js rename to install/ui/idrange.js index ea9b47c98..b2ce3169f 100644 --- a/install/ui/range.js +++ b/install/ui/idrange.js @@ -22,9 +22,9 @@ /* REQUIRES: ipa.js, details.js, search.js, add.js, facet.js, entity.js */ -IPA.range = {}; +IPA.idrange = {}; -IPA.range.entity = function(spec) { +IPA.idrange.entity = function(spec) { var that = IPA.entity(spec); @@ -48,28 +48,28 @@ IPA.range.entity = function(spec) { 'iparangetype', { name: 'ipabaseid', - label: IPA.messages.objects.range.ipabaseid, - tooltip: IPA.get_entity_param('range', 'ipabaseid').label + label: IPA.messages.objects.idrange.ipabaseid, + tooltip: IPA.get_entity_param('idrange', 'ipabaseid').label }, { name: 'ipaidrangesize', - label: IPA.messages.objects.range.ipaidrangesize, - tooltip: IPA.get_entity_param('range', 'ipaidrangesize').label + label: IPA.messages.objects.idrange.ipaidrangesize, + tooltip: IPA.get_entity_param('idrange', 'ipaidrangesize').label }, { name: 'ipabaserid', - label: IPA.messages.objects.range.ipabaserid, - tooltip: IPA.get_entity_param('range', 'ipabaserid').label + label: IPA.messages.objects.idrange.ipabaserid, + tooltip: IPA.get_entity_param('idrange', 'ipabaserid').label }, { name: 'ipasecondarybaserid', - label: IPA.messages.objects.range.ipasecondarybaserid, - tooltip: IPA.get_entity_param('range', 'ipasecondarybaserid').label + label: IPA.messages.objects.idrange.ipasecondarybaserid, + tooltip: IPA.get_entity_param('idrange', 'ipasecondarybaserid').label }, { name: 'ipanttrusteddomainsid', - label: IPA.messages.objects.range.ipanttrusteddomainsid, - tooltip: IPA.get_entity_param('range', 'ipanttrusteddomainsid').label + label: IPA.messages.objects.idrange.ipanttrusteddomainsid, + tooltip: IPA.get_entity_param('idrange', 'ipanttrusteddomainsid').label } ] } @@ -79,43 +79,43 @@ IPA.range.entity = function(spec) { fields: [ { name: 'cn', - widget: 'range.cn' + widget: 'idrange.cn' }, { name: 'ipabaseid', - label: IPA.messages.objects.range.ipabaseid, - tooltip: IPA.get_entity_param('range', 'ipabaseid').label, - widget: 'range.ipabaseid' + label: IPA.messages.objects.idrange.ipabaseid, + tooltip: IPA.get_entity_param('idrange', 'ipabaseid').label, + widget: 'idrange.ipabaseid' }, { name: 'ipaidrangesize', - label: IPA.messages.objects.range.ipaidrangesize, - tooltip: IPA.get_entity_param('range', 'ipaidrangesize').label, - widget: 'range.ipaidrangesize' + label: IPA.messages.objects.idrange.ipaidrangesize, + tooltip: IPA.get_entity_param('idrange', 'ipaidrangesize').label, + widget: 'idrange.ipaidrangesize' }, { name: 'ipabaserid', - label: IPA.messages.objects.range.ipabaserid, - tooltip: IPA.get_entity_param('range', 'ipabaserid').label, - widget: 'range.ipabaserid' + label: IPA.messages.objects.idrange.ipabaserid, + tooltip: IPA.get_entity_param('idrange', 'ipabaserid').label, + widget: 'idrange.ipabaserid' }, { name: 'ipasecondarybaserid', - label: IPA.messages.objects.range.ipasecondarybaserid, - tooltip: IPA.get_entity_param('range', 'ipasecondarybaserid').label, + label: IPA.messages.objects.idrange.ipasecondarybaserid, + tooltip: IPA.get_entity_param('idrange', 'ipasecondarybaserid').label, widget: 'type.ipasecondarybaserid' }, { name: 'ipanttrusteddomainsid', - label: IPA.messages.objects.range.ipanttrusteddomainsid, - tooltip: IPA.get_entity_param('range', 'ipanttrusteddomainsid').label, + label: IPA.messages.objects.idrange.ipanttrusteddomainsid, + tooltip: IPA.get_entity_param('idrange', 'ipanttrusteddomainsid').label, widget: 'type.ipanttrusteddomainsid' } ], widgets: [ { type: 'details_table_section_nc', - name: 'range', + name: 'idrange', widgets: [ 'cn', 'ipabaseid', @@ -126,18 +126,18 @@ IPA.range.entity = function(spec) { { type: 'multiple_choice_section', name: 'type', - label: IPA.messages.objects.range.type, + label: IPA.messages.objects.idrange.type, choices: [ { name: 'local', - label: IPA.messages.objects.range.type_local, + label: IPA.messages.objects.idrange.type_local, fields: ['ipasecondarybaserid'], required: ['ipasecondarybaserid'], enabled: true }, { name: 'ad', - label: IPA.messages.objects.range.type_ad, + label: IPA.messages.objects.idrange.type_ad, fields: ['ipanttrusteddomainsid'], required: ['ipanttrusteddomainsid'] } @@ -159,4 +159,4 @@ IPA.range.entity = function(spec) { return that; }; -IPA.register('range', IPA.range.entity); +IPA.register('idrange', IPA.idrange.entity); diff --git a/install/ui/index.html b/install/ui/index.html index ab51b6d57..ba86a5216 100644 --- a/install/ui/index.html +++ b/install/ui/index.html @@ -53,7 +53,7 @@ - + diff --git a/install/ui/jsl.conf b/install/ui/jsl.conf index 5faeed932..935566d4f 100644 --- a/install/ui/jsl.conf +++ b/install/ui/jsl.conf @@ -157,7 +157,7 @@ +process dns.js +process automount.js +process automember.js -+process range.js ++process idrange.js +process trust.js +process webui.js +process login.js diff --git a/install/ui/test/data/range_add.json b/install/ui/test/data/idrange_add.json similarity index 100% rename from install/ui/test/data/range_add.json rename to install/ui/test/data/idrange_add.json diff --git a/install/ui/test/data/range_find.json b/install/ui/test/data/idrange_find.json similarity index 100% rename from install/ui/test/data/range_find.json rename to install/ui/test/data/idrange_find.json diff --git a/install/ui/test/data/range_find_pkeys.json b/install/ui/test/data/idrange_find_pkeys.json similarity index 100% rename from install/ui/test/data/range_find_pkeys.json rename to install/ui/test/data/idrange_find_pkeys.json diff --git a/install/ui/test/data/range_get_records.json b/install/ui/test/data/idrange_get_records.json similarity index 100% rename from install/ui/test/data/range_get_records.json rename to install/ui/test/data/idrange_get_records.json diff --git a/install/ui/test/data/range_mod.json b/install/ui/test/data/idrange_mod.json similarity index 100% rename from install/ui/test/data/range_mod.json rename to install/ui/test/data/idrange_mod.json diff --git a/install/ui/test/data/range_show.json b/install/ui/test/data/idrange_show.json similarity index 100% rename from install/ui/test/data/range_show.json rename to install/ui/test/data/idrange_show.json diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json index d4f2fa4a7..ede472412 100644 --- a/install/ui/test/data/ipa_init.json +++ b/install/ui/test/data/ipa_init.json @@ -368,7 +368,7 @@ "pwpolicy": { "identity": "Password Policy" }, - "range": { + "idrange": { "details": "Range Settings", "ipabaseid": "Base ID", "ipabaserid": "Primary RID base", diff --git a/install/ui/test/data/ipa_init_commands.json b/install/ui/test/data/ipa_init_commands.json index cfb2703f0..4237cc8a8 100644 --- a/install/ui/test/data/ipa_init_commands.json +++ b/install/ui/test/data/ipa_init_commands.json @@ -13708,7 +13708,7 @@ } ] }, - "range_add": { + "idrange_add": { "takes_args": [], "takes_options": [ { @@ -13797,7 +13797,7 @@ } ] }, - "range_del": { + "idrange_del": { "takes_args": [], "takes_options": [ { @@ -13811,7 +13811,7 @@ } ] }, - "range_find": { + "idrange_find": { "takes_args": [], "takes_options": [ { @@ -13941,7 +13941,7 @@ } ] }, - "range_mod": { + "idrange_mod": { "takes_args": [], "takes_options": [ { @@ -14045,7 +14045,7 @@ } ] }, - "range_show": { + "idrange_show": { "takes_args": [], "takes_options": [ { @@ -18180,4 +18180,4 @@ "methods": {}, "objects": {} } -} \ No newline at end of file +} diff --git a/install/ui/test/data/ipa_init_objects.json b/install/ui/test/data/ipa_init_objects.json index 02ac25f4d..6458e4cda 100644 --- a/install/ui/test/data/ipa_init_objects.json +++ b/install/ui/test/data/ipa_init_objects.json @@ -5882,7 +5882,7 @@ ], "uuid_attribute": "" }, - "range": { + "idrange": { "aciattrs": [ "cn", "ipabaseid", @@ -7743,4 +7743,4 @@ } } } -} \ No newline at end of file +} diff --git a/install/ui/webui.js b/install/ui/webui.js index e91946011..f381ab0be 100644 --- a/install/ui/webui.js +++ b/install/ui/webui.js @@ -84,7 +84,7 @@ IPA.admin_navigation = function(spec) { ]}, {entity: 'selfservice'}, {entity: 'delegation'}, - {entity: 'range'}, + {entity: 'idrange'}, {entity: 'trust'}, {entity: 'config'} ]}]; diff --git a/ipalib/plugins/range.py b/ipalib/plugins/idrange.py similarity index 95% rename from ipalib/plugins/range.py rename to ipalib/plugins/idrange.py index cc0c12753..23c8e0c34 100644 --- a/ipalib/plugins/range.py +++ b/ipalib/plugins/idrange.py @@ -31,7 +31,7 @@ __doc__ = _(""" Manage ID ranges """) -class range(LDAPObject): +class idrange(LDAPObject): """ Range object. """ @@ -46,8 +46,8 @@ class range(LDAPObject): 'ipasecondarybaserid', 'ipanttrusteddomainsid', 'iparangetype'] - label = _('Ranges') - label_singular = _('Range') + label = _('ID Ranges') + label_singular = _('ID Range') takes_params = ( Str('cn', @@ -143,7 +143,7 @@ class range(LDAPObject): error=_('range modification leaving objects with ID out ' 'of the defined range is not allowed')) -class range_add(LDAPCreate): +class idrange_add(LDAPCreate): __doc__ = _('Add new ID range.') msg_summary = _('Added ID range "%(value)s"') @@ -168,7 +168,7 @@ class range_add(LDAPCreate): self.obj.handle_iparangetype(entry_attrs, options, keep_objectclass=True) return dn -class range_del(LDAPDelete): +class idrange_del(LDAPDelete): __doc__ = _('Delete an ID range.') msg_summary = _('Deleted ID range "%(value)s"') @@ -185,7 +185,7 @@ class range_del(LDAPDelete): old_base_id, old_range_size, 0, 0) return dn -class range_find(LDAPSearch): +class idrange_find(LDAPSearch): __doc__ = _('Search for ranges.') msg_summary = ngettext( @@ -204,7 +204,7 @@ class range_find(LDAPSearch): self.obj.handle_iparangetype(entry, options) return truncated -class range_show(LDAPRetrieve): +class idrange_show(LDAPRetrieve): __doc__ = _('Display information about a range.') def pre_callback(self, ldap, dn, attrs_list, *keys, **options): @@ -217,7 +217,7 @@ class range_show(LDAPRetrieve): self.obj.handle_iparangetype(entry_attrs, options) return dn -class range_mod(LDAPUpdate): +class idrange_mod(LDAPUpdate): __doc__ = _('Modify ID range.') msg_summary = _('Modified ID range "%(value)s"') @@ -249,9 +249,9 @@ class range_mod(LDAPUpdate): self.obj.handle_iparangetype(entry_attrs, options) return dn -api.register(range) -api.register(range_add) -api.register(range_mod) -api.register(range_del) -api.register(range_find) -api.register(range_show) +api.register(idrange) +api.register(idrange_add) +api.register(idrange_mod) +api.register(idrange_del) +api.register(idrange_find) +api.register(idrange_show) diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py index 98a5ceeb5..a08549c30 100644 --- a/ipalib/plugins/internal.py +++ b/ipalib/plugins/internal.py @@ -506,7 +506,7 @@ class i18n_messages(Command): "pwpolicy": { "identity": _("Password Policy"), }, - "range": { + "idrange": { "details": _("Range Settings"), "ipabaseid": _("Base ID"), "ipabaserid": _("Primary RID base"), diff --git a/ipalib/plugins/trust.py b/ipalib/plugins/trust.py index f19a0a874..5af5111d5 100644 --- a/ipalib/plugins/trust.py +++ b/ipalib/plugins/trust.py @@ -182,7 +182,7 @@ class trust_add(LDAPCreate): range_name = keys[-1].upper()+'_id_range' try: - old_range = api.Command['range_show'](range_name) + old_range = api.Command['idrange_show'](range_name) except errors.NotFound, e: old_range = None @@ -209,7 +209,7 @@ class trust_add(LDAPCreate): base_id = 200000 + (pysss_murmur.murmurhash3(dom_sid, len(dom_sid), 0xdeadbeef) % 10000) * 200000 try: - new_range = api.Command['range_add'](range_name, + new_range = api.Command['idrange_add'](range_name, ipabaseid=base_id, ipaidrangesize=options['range_size'], ipabaserid=0, diff --git a/tests/test_xmlrpc/test_range_plugin.py b/tests/test_xmlrpc/test_range_plugin.py index d7d4dac0f..00e430bf0 100644 --- a/tests/test_xmlrpc/test_range_plugin.py +++ b/tests/test_xmlrpc/test_range_plugin.py @@ -18,7 +18,7 @@ # along with this program. If not, see . """ -Test the `ipalib/plugins/range.py` module, and XML-RPC in general. +Test the `ipalib/plugins/idrange.py` module, and XML-RPC in general. """ from ipalib import api, errors, _ @@ -38,15 +38,15 @@ group1_gid = 900100 class test_range(Declarative): cleanup_commands = [ - ('range_del', [testrange1], {}), + ('idrange_del', [testrange1], {}), ('user_del', [user1], {}), ('group_del', [group1], {}), ] tests = [ dict( - desc='Create range %r' % (testrange1), - command=('range_add', [testrange1], + desc='Create ID range %r' % (testrange1), + command=('idrange_add', [testrange1], dict(ipabaseid=testrange1_base_id, ipaidrangesize=testrange1_size, ipabaserid=1000, ipasecondarybaserid=20000)), expected=dict( @@ -67,8 +67,8 @@ class test_range(Declarative): ), dict( - desc='Retrieve range %r' % (testrange1), - command=('range_show', [testrange1], dict()), + desc='Retrieve ID range %r' % (testrange1), + command=('idrange_show', [testrange1], dict()), expected=dict( result=dict( dn=DN(('cn',testrange1),('cn','ranges'),('cn','etc'), @@ -87,7 +87,7 @@ class test_range(Declarative): dict( - desc='Create user %r in range %r' % (user1, testrange1), + desc='Create user %r in ID range %r' % (user1, testrange1), command=( 'user_add', [user1], dict(givenname=u'Test', sn=u'User1', uidnumber=user1_uid) @@ -125,7 +125,7 @@ class test_range(Declarative): dict( - desc='Create group %r in range %r' % (group1, testrange1), + desc='Create group %r in ID range %r' % (group1, testrange1), command=( 'group_add', [group1], dict(description=u'Test desc 1', gidnumber=group1_gid) @@ -146,8 +146,8 @@ class test_range(Declarative): dict( - desc='Try to modify range %r to get out bounds object #1' % (testrange1), - command=('range_mod', [testrange1], dict(ipabaseid=90001)), + desc='Try to modify ID range %r to get out bounds object #1' % (testrange1), + command=('idrange_mod', [testrange1], dict(ipabaseid=90001)), expected=errors.ValidationError(name='ipabaseid,ipaidrangesize', error=u'range modification leaving objects with ID out of the' u' defined range is not allowed'), @@ -155,8 +155,8 @@ class test_range(Declarative): dict( - desc='Try to modify range %r to get out bounds object #2' % (testrange1), - command=('range_mod', [testrange1], dict(ipaidrangesize=100)), + desc='Try to modify ID range %r to get out bounds object #2' % (testrange1), + command=('idrange_mod', [testrange1], dict(ipaidrangesize=100)), expected=errors.ValidationError(name='ipabaseid,ipaidrangesize', error=u'range modification leaving objects with ID out of the' u' defined range is not allowed'), @@ -164,8 +164,8 @@ class test_range(Declarative): dict( - desc='Try to modify range %r to get out bounds object #3' % (testrange1), - command=('range_mod', [testrange1], dict(ipabaseid=100, ipaidrangesize=100)), + desc='Try to modify ID range %r to get out bounds object #3' % (testrange1), + command=('idrange_mod', [testrange1], dict(ipabaseid=100, ipaidrangesize=100)), expected=errors.ValidationError(name='ipabaseid,ipaidrangesize', error=u'range modification leaving objects with ID out of the' u' defined range is not allowed'), @@ -173,8 +173,8 @@ class test_range(Declarative): dict( - desc='Modify range %r' % (testrange1), - command=('range_mod', [testrange1], dict(ipaidrangesize=90000)), + desc='Modify ID range %r' % (testrange1), + command=('idrange_mod', [testrange1], dict(ipaidrangesize=90000)), expected=dict( result=dict( cn=[testrange1], @@ -191,8 +191,8 @@ class test_range(Declarative): dict( - desc='Try to delete range %r with active IDs inside it' % testrange1, - command=('range_del', [testrange1], {}), + desc='Try to delete ID range %r with active IDs inside it' % testrange1, + command=('idrange_del', [testrange1], {}), expected=errors.ValidationError(name='ipabaseid,ipaidrangesize', error=u'range modification leaving objects with ID out of the' u' defined range is not allowed'), @@ -222,8 +222,8 @@ class test_range(Declarative): dict( - desc='Delete range %r' % testrange1, - command=('range_del', [testrange1], {}), + desc='Delete ID range %r' % testrange1, + command=('idrange_del', [testrange1], {}), expected=dict( result=dict(failed=u''), value=testrange1,