BackupProcessor.process_backups should return the results of running the backups, instead of printing them to stdout

Bug #1951916 reported by Jose Guedez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-backup-all
Fix Released
Wishlist
Jose Guedez

Bug Description

Current master (commit c8ffbeacbe3be3428e4f68f15545ea8abe689994)

The main cli entrypoint (Cli) delegates the heavy lifting to `BackupProcessor.process_backups`. However, this method does not return the result of performing the backups, but instead prints them (stdout). This makes it inconvenient to use BackupProcessor from external code (as a library):

https://git.launchpad.net/juju-backup-all/tree/jujubackupall/process.py?id=c8ffbeacbe3be3428e4f68f15545ea8abe689994#n104

It would probably be better for `BackupProcessor.process_backups` to return the json (that it already produces) instead, and let the caller decide what it wants to do with it. This way Cli.run can just print it, but library users can handle it differently.

Related branches

Jose Guedez (jfguedez)
Changed in juju-backup-all:
status: New → In Progress
assignee: nobody → Jose Guedez (jfguedez)
importance: Undecided → High
importance: High → Wishlist
Jose Guedez (jfguedez)
Changed in juju-backup-all:
status: In Progress → Fix Committed
Changed in juju-backup-all:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.