diff options
author | Petr Viktorin <pviktori@redhat.com> | 2012-05-21 05:03:21 -0400 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-05-29 09:23:26 +0200 |
commit | 1af36da933cd3c788e3a48257e2f5c286e985e22 (patch) | |
tree | 472816360fa7ad147e958b63e240f45ed04a72b0 /ipalib/parameters.py | |
parent | e0930d42a54e586a0170c853fbc9e66f9193d5b0 (diff) | |
download | freeipa-1af36da933cd3c788e3a48257e2f5c286e985e22.tar.gz freeipa-1af36da933cd3c788e3a48257e2f5c286e985e22.tar.xz freeipa-1af36da933cd3c788e3a48257e2f5c286e985e22.zip |
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
Diffstat (limited to 'ipalib/parameters.py')
-rw-r--r-- | ipalib/parameters.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ipalib/parameters.py b/ipalib/parameters.py index 83a86544d..529f15b37 100644 --- a/ipalib/parameters.py +++ b/ipalib/parameters.py @@ -330,6 +330,9 @@ class Param(ReadOnly): commands * no_update: do not include the parameter for crud.update based commands + * no_option: this attribute is not displayed in the CLI, usually + because there's a better way of setting it (for example, a + separate command) * virtual_attribute: the parameter is not stored physically in the LDAP and thus attribute `attribute` is not enabled * suppress_empty (Output parameters only): do not display parameter |