From 34f8ff47932c49ab3a2b19a64c84b7d3ae0b514a Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Wed, 11 Jul 2012 14:09:17 +0200 Subject: Add range-mod command range plugin was missing range-mod command that could be used for example to fix a size for a range generated during upgrades. The range should be updated with a caution though, a misconfiguration could break trusts. iparangetype is now also handled better and filled in all commands instead of just range-show. objectclass attribute is deleted only when really needed now. --- tests/test_xmlrpc/test_range_plugin.py | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'tests/test_xmlrpc') diff --git a/tests/test_xmlrpc/test_range_plugin.py b/tests/test_xmlrpc/test_range_plugin.py index 7c95cd57..76ffc58b 100644 --- a/tests/test_xmlrpc/test_range_plugin.py +++ b/tests/test_xmlrpc/test_range_plugin.py @@ -49,7 +49,8 @@ class test_range(Declarative): ipabaseid=[u'900000'], ipabaserid=[u'1000'], ipasecondarybaserid=[u'20000'], - ipaidrangesize=[u'99999'] + ipaidrangesize=[u'99999'], + iparangetype=[u'local domain range'], ), value=testrange1, summary=u'Added ID range "%s"' % (testrange1), @@ -69,11 +70,29 @@ class test_range(Declarative): ipabaserid=[u'1000'], ipasecondarybaserid=[u'20000'], ipaidrangesize=[u'99999'], - iparangetype=u'local domain range', + iparangetype=[u'local domain range'], ), value=testrange1, summary=None, ), ), + + dict( + desc='Modify range %r' % (testrange1), + command=('range_mod', [testrange1], dict(ipaidrangesize=90000)), + expected=dict( + result=dict( + cn=[testrange1], + ipabaseid=[u'900000'], + ipabaserid=[u'1000'], + ipasecondarybaserid=[u'20000'], + ipaidrangesize=[u'90000'], + iparangetype=[u'local domain range'], + ), + value=testrange1, + summary=u'Modified ID range "%s"' % (testrange1), + ), + ), + ] -- cgit