There was no way to validate argument input from plugins and
cause the installer to bail out. If a plugin needs to validate
some input it can use the validate_args() method and raise
ConfigurationError() if an issue is found.
https://fedorahosted.org/ipsilon/ticket/78
Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
def install_args(self, group):
raise NotImplementedError
def install_args(self, group):
raise NotImplementedError
+ def validate_args(self, args):
+ return
+
def configure_server(self, opts):
raise NotImplementedError
def configure_server(self, opts):
raise NotImplementedError
def install_args(self, group):
raise NotImplementedError
def install_args(self, group):
raise NotImplementedError
+ def validate_args(self, args):
+ return
+
def unconfigure(self, opts):
return
def unconfigure(self, opts):
return
if len(args['hostname'].split('.')) < 2:
raise ConfigurationError('Hostname: %s is not a FQDN')
if len(args['hostname'].split('.')) < 2:
raise ConfigurationError('Hostname: %s is not a FQDN')
+ for plugin_group in plugins:
+ for plugin_name in plugins[plugin_group]:
+ plugin = plugins[plugin_group][plugin_name]
+ plugin.validate_args(args)
+
try:
pwd.getpwnam(args['system_user'])
except KeyError:
try:
pwd.getpwnam(args['system_user'])
except KeyError:
def install_args(self, group):
raise NotImplementedError
def install_args(self, group):
raise NotImplementedError
+ def validate_args(self, args):
+ return
+
def configure(self, opts):
raise NotImplementedError
def configure(self, opts):
raise NotImplementedError
def install_args(self, group):
raise NotImplementedError
def install_args(self, group):
raise NotImplementedError
+ def validate_args(self, args):
+ return
+
def configure(self, opts):
raise NotImplementedError
def configure(self, opts):
raise NotImplementedError