mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 15:40:01 -06:00
Rename range CLI to idrange
This commit is contained in:
parent
1915c2d4dd
commit
377e1267b7
146
API.txt
146
API.txt
@ -1883,6 +1883,79 @@ output: Output('value', <type 'unicode'>, None)
|
||||
command: i18n_messages
|
||||
args: 0,0,1
|
||||
output: Output('messages', <type 'dict'>, 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', (<type 'unicode'>, <type 'NoneType'>), None)
|
||||
output: Entry('result', <type 'dict'>, Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None))
|
||||
output: Output('value', <type 'unicode'>, 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', (<type 'unicode'>, <type 'NoneType'>), None)
|
||||
output: Output('result', <type 'dict'>, None)
|
||||
output: Output('value', <type 'unicode'>, 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', (<type 'unicode'>, <type 'NoneType'>), None)
|
||||
output: ListOfEntries('result', (<type 'list'>, <type 'tuple'>), Gettext('A list of LDAP entries', domain='ipa', localedir=None))
|
||||
output: Output('count', <type 'int'>, None)
|
||||
output: Output('truncated', <type 'bool'>, 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', (<type 'unicode'>, <type 'NoneType'>), None)
|
||||
output: Entry('result', <type 'dict'>, Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None))
|
||||
output: Output('value', <type 'unicode'>, 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', (<type 'unicode'>, <type 'NoneType'>), None)
|
||||
output: Entry('result', <type 'dict'>, Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None))
|
||||
output: Output('value', <type 'unicode'>, None)
|
||||
command: json_metadata
|
||||
args: 2,3,3
|
||||
arg: Str('objname?')
|
||||
@ -2376,79 +2449,6 @@ option: Str('version?', exclude='webui')
|
||||
output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
|
||||
output: Entry('result', <type 'dict'>, Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None))
|
||||
output: Output('value', <type 'unicode'>, 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', (<type 'unicode'>, <type 'NoneType'>), None)
|
||||
output: Entry('result', <type 'dict'>, Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None))
|
||||
output: Output('value', <type 'unicode'>, 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', (<type 'unicode'>, <type 'NoneType'>), None)
|
||||
output: Output('result', <type 'dict'>, None)
|
||||
output: Output('value', <type 'unicode'>, 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', (<type 'unicode'>, <type 'NoneType'>), None)
|
||||
output: ListOfEntries('result', (<type 'list'>, <type 'tuple'>), Gettext('A list of LDAP entries', domain='ipa', localedir=None))
|
||||
output: Output('count', <type 'int'>, None)
|
||||
output: Output('truncated', <type 'bool'>, 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', (<type 'unicode'>, <type 'NoneType'>), None)
|
||||
output: Entry('result', <type 'dict'>, Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None))
|
||||
output: Output('value', <type 'unicode'>, 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', (<type 'unicode'>, <type 'NoneType'>), None)
|
||||
output: Entry('result', <type 'dict'>, Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None))
|
||||
output: Output('value', <type 'unicode'>, None)
|
||||
command: role_add
|
||||
args: 1,6,3
|
||||
arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, required=True)
|
||||
|
@ -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 \
|
||||
|
@ -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);
|
@ -53,7 +53,7 @@
|
||||
<script type="text/javascript" src="aci.js"></script>
|
||||
<script type="text/javascript" src="entitle.js"></script>
|
||||
<script type="text/javascript" src="trust.js"></script>
|
||||
<script type="text/javascript" src="range.js"></script>
|
||||
<script type="text/javascript" src="idrange.js"></script>
|
||||
|
||||
<script type="text/javascript" src="ext/extension.js"></script>
|
||||
<script type="text/javascript" src="webui.js"></script>
|
||||
|
@ -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
|
||||
|
@ -368,7 +368,7 @@
|
||||
"pwpolicy": {
|
||||
"identity": "Password Policy"
|
||||
},
|
||||
"range": {
|
||||
"idrange": {
|
||||
"details": "Range Settings",
|
||||
"ipabaseid": "Base ID",
|
||||
"ipabaserid": "Primary RID base",
|
||||
|
@ -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": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5882,7 +5882,7 @@
|
||||
],
|
||||
"uuid_attribute": ""
|
||||
},
|
||||
"range": {
|
||||
"idrange": {
|
||||
"aciattrs": [
|
||||
"cn",
|
||||
"ipabaseid",
|
||||
@ -7743,4 +7743,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ IPA.admin_navigation = function(spec) {
|
||||
]},
|
||||
{entity: 'selfservice'},
|
||||
{entity: 'delegation'},
|
||||
{entity: 'range'},
|
||||
{entity: 'idrange'},
|
||||
{entity: 'trust'},
|
||||
{entity: 'config'}
|
||||
]}];
|
||||
|
@ -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)
|
@ -506,7 +506,7 @@ class i18n_messages(Command):
|
||||
"pwpolicy": {
|
||||
"identity": _("Password Policy"),
|
||||
},
|
||||
"range": {
|
||||
"idrange": {
|
||||
"details": _("Range Settings"),
|
||||
"ipabaseid": _("Base ID"),
|
||||
"ipabaserid": _("Primary RID base"),
|
||||
|
@ -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,
|
||||
|
@ -18,7 +18,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
"""
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user