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 authored and Martin Kosek committed 2012-05-11 08:14:20 +02:00
1 parent f19218f7d8
commit 1565ce3a8c
7 files changed
+105 -3

No files matched your search

+1
View File
@@ -217,6 +217,7 @@ class sudorule(LDAPObject):
doc=_('Run with the gid of a specified POSIX group'),
flags=['no_create', 'no_update', 'no_search'],
),
external_host_param,
)
order_not_unique_msg = _(