summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/idrange.py
diff options
context:
space:
mode:
authorTomas Babej <tbabej@redhat.com>2013-06-25 14:25:44 +0200
committerAlexander Bokovoy <abokovoy@redhat.com>2013-07-11 12:39:28 +0300
commite4437a3e7ffcb547a00a70614804dc35fefd630e (patch)
treefe731be5f0e7533453c96d8432c430be2ec34dcb /ipalib/plugins/idrange.py
parentfb166e8f5c0a959f0f1dd9ceb5d9cc8ddd3e7ef6 (diff)
downloadfreeipa-e4437a3e7ffcb547a00a70614804dc35fefd630e.tar.gz
freeipa-e4437a3e7ffcb547a00a70614804dc35fefd630e.tar.xz
freeipa-e4437a3e7ffcb547a00a70614804dc35fefd630e.zip
Add --range-type option that forces range type of the trusted domain
Adds --range-type option to ipa trust-add command. It takes two allowed values: 'ipa-ad-trust-posix' and 'ipa-ad-trust'. When --range-type option is not specified, the range type should be determined by ID range discovery. https://fedorahosted.org/freeipa/ticket/3650
Diffstat (limited to 'ipalib/plugins/idrange.py')
-rw-r--r--ipalib/plugins/idrange.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipalib/plugins/idrange.py b/ipalib/plugins/idrange.py
index f258cbb15..7f8c1ab7b 100644
--- a/ipalib/plugins/idrange.py
+++ b/ipalib/plugins/idrange.py
@@ -458,12 +458,12 @@ class idrange_add(LDAPCreate):
entry_attrs['objectclass'].append('ipatrustedaddomainrange')
# Default to ipa-ad-trust if no type set
- if 'iparangetype' not in entry_attrs:
+ if not is_set('iparangetype'):
entry_attrs['iparangetype'] = u'ipa-ad-trust'
if entry_attrs['iparangetype'] not in (u'ipa-ad-trust',
u'ipa-ad-trust-posix'):
- raise errors.ValidationError('ID Range setup',
+ raise errors.ValidationError(name='ID Range setup',
error=_('IPA Range type must be one of ipa-ad-trust '
'or ipa-ad-trust-posix when SID of the trusted '
'domain is specified.'))