From e4437a3e7ffcb547a00a70614804dc35fefd630e Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Tue, 25 Jun 2013 14:25:44 +0200 Subject: 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 --- ipalib/plugins/idrange.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ipalib/plugins/idrange.py') diff --git a/ipalib/plugins/idrange.py b/ipalib/plugins/idrange.py index f258cbb1..7f8c1ab7 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.')) -- cgit