From 1af36da933cd3c788e3a48257e2f5c286e985e22 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Mon, 21 May 2012 05:03:21 -0400 Subject: Disallow setattr on no_update/no_create params Make --{set,add,del}attr fail on parameters with the no_update/no_create flag for the respective command. For attributes that can be modified, but we just don't want to display in the CLI, use the 'no_option' flag. These are "locking" attributes (ipaenabledflag, nsaccountlock) and externalhost. Document the 'no_option' flag. Add some tests. https://fedorahosted.org/freeipa/ticket/2580 --- tests/test_xmlrpc/test_attr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/test_xmlrpc/test_attr.py') diff --git a/tests/test_xmlrpc/test_attr.py b/tests/test_xmlrpc/test_attr.py index 5916ebd2..248d2157 100644 --- a/tests/test_xmlrpc/test_attr.py +++ b/tests/test_xmlrpc/test_attr.py @@ -471,7 +471,8 @@ class test_attr(Declarative): command=( 'config_mod', [], dict(addattr=u'ipacertificatesubjectbase=0=DOMAIN.COM') ), - expected=errors.OnlyOneValueAllowed(attr='ipacertificatesubjectbase'), + expected=errors.ValidationError(name='ipacertificatesubjectbase', + error='attribute is not configurable'), ), dict( -- cgit