batch, schema: use Dict instead of Any

Add new Dict parameter class and use it in the batch and command_defaults
plugins.

https://fedorahosted.org/freeipa/ticket/4739

Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
Jan Cholasta
2016-06-15 14:03:51 +02:00
parent 3ac2215ddb
commit e2a8290af1
5 changed files with 16 additions and 17 deletions
+9
View File
@@ -1961,3 +1961,12 @@ class DNSNameParam(Param):
def _rule_only_relative(self, _, value):
if self.only_relative and value.is_absolute():
return _('must be relative')
class Dict(Param):
"""
A parameter for dictionary.
"""
type = dict
type_error = _("must be dictionary")