contiv-experimental/volplugin

Functionality for rolling a policy back to a previous revision

dseevr opened this issue · 0 comments

Since we now record a revision entry for each policy upload, we should also provide a way to roll a policy back to a previous revision.

This could be a volcli command like: volcli policy rollback policy_name target_revision

Internally, the volcli command would need to:

  • ensure the target revision exists in the policy's revision history
  • ensure the target revision is not the current revision (if this is true, just print a notice and exit)
  • fetch the policy JSON and reupload it through the normal apimaster endpoint