Validate externalhost (when added by --addattr/--setattr)

Change the externalhost attribute of hbacrule, netgroup
and sudorule into a full-fledged Parameter, and attach
a validator to it.
The validator is relaxed to allow underscores, so that
some hosts with nonstandard names can be added.

Tests included.

https://fedorahosted.org/freeipa/ticket/2649
This commit is contained in:
Petr Viktorin
2012-05-11 08:14:20 +02:00
committed by Martin Kosek
parent f19218f7d8
commit 1565ce3a8c
7 changed files with 105 additions and 3 deletions
+1
View File
@@ -219,6 +219,7 @@ class hbacrule(LDAPObject):
label=_('Service Groups'),
flags=['no_create', 'no_update', 'no_search'],
),
external_host_param,
)
api.register(hbacrule)