Пример #1
0
 def validate(self):
     """Validates the object"""
     errors = []
     try:
         self._data_param_name, run, self._api = get_condition_api(self.app_name, self.action_name)
         self._condition_executable = get_condition(self.app_name, run)
         tmp_api = split_api_params(self._api, self._data_param_name)
         validate_condition_parameters(tmp_api, self.arguments, self.action_name)
     except UnknownApp:
         errors.append('Unknown app {}'.format(self.app_name))
     except UnknownCondition:
         errors.append('Unknown condition {}'.format(self.action_name))
     except InvalidArgument as e:
         errors.extend(e.errors)
     self.errors = errors
Пример #2
0
 def validate(self):
     """Validates the object"""
     errors = []
     try:
         self._data_param_name, self._run, self._api = get_transform_api(self.app_name, self.action_name)
         self._transform_executable = get_transform(self.app_name, self._run)
         tmp_api = split_api_params(self._api, self._data_param_name)
         validate_transform_parameters(tmp_api, self.arguments, self.action_name)
     except UnknownApp:
         errors.append('Unknown app {}'.format(self.app_name))
     except UnknownTransform:
         errors.append('Unknown transform {}'.format(self.action_name))
     except InvalidArgument as e:
         errors.extend(e.errors)
     self.errors = errors
Пример #3
0
 def validate(self):
     """Validates the object"""
     errors = []
     try:
         self._data_param_name, run, self._api = get_transform_api(self.app_name, self.action_name)
         get_transform(self.app_name, run)
         tmp_api = split_api_params(self._api, self._data_param_name)
         validate_transform_parameters(tmp_api, self.arguments, self.action_name)
     except UnknownApp:
         errors.append('Unknown app {}'.format(self.app_name))
     except UnknownTransform:
         errors.append('Unknown transform {}'.format(self.action_name))
     except InvalidArgument as e:
         errors.extend(e.errors)
     self.errors = errors