Fix scheduled operation api validate
"operation_type" and "operation_definition" also need to verify. Change-Id: Ic02d11efe40fbaa708b155c8296214bf2dae5a6e
This commit is contained in:
parent
9922b17660
commit
2c85e4a0e8
|
@ -99,7 +99,7 @@ class ScheduledOperationController(wsgi.Controller):
|
|||
operation_type = operation_info.get("operation_type", None)
|
||||
operation_definition = operation_info.get(
|
||||
"operation_definition", None)
|
||||
if name is None:
|
||||
if not all([name, operation_type, operation_definition]):
|
||||
msg = _("Operation name or type or definition is not provided.")
|
||||
raise exc.HTTPBadRequest(explanation=msg)
|
||||
|
||||
|
|
Loading…
Reference in New Issue