Adding a validation layer for freezer jobs

Registered by Saad Zaher

Freezer validator is not working and is bypassed. for example you can run

  freezer-agent --action admin

Freezer won't ask you about a missing argument and will raise an error in the logs. So a validation layer is required here to check if you have provided all the required args for the job to start it or not. If all argument are present, freezer will execute the job if not freezer will raise argument missing.

Also we can add a general method for checking global arguments like backup name and/or container name and so on ...

Simple what needs to be done:

in freezer.job module:

in Job class:

add abstract method "_validate" and call it in the __init__ method so other classes are forced to implement it.

add another method "_general_validation" and put all common checks that we need to execute against the job to be executed.

Blueprint information

Status:
Not started
Approver:
Pierre-Arthur MATHIEU
Priority:
Undefined
Drafter:
Saad Zaher
Direction:
Needs approval
Assignee:
Saad Zaher
Definition:
Approved
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/validation-layer-for-freezer-jobs,n,z

Addressed by: https://review.openstack.org/362015
    Added Validation layer for freezer jobs

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.