-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wyng-backup as python module #118
Comments
I'm going to fork this project and investigate, how complex this change would be. |
Hi @sylv-io. I've started to reduce reliance on global variables, but its not complete. For example, the 'options' obj produced by ArgumentParser is referenced frequently in a number of different functions. To use Wyng as a module currently you would have to at least supply the params for sys.argv which populate 'options' on initialization. Alas, this may only allow one action per import in its current form. Also, any globals defined in main that are derived from the contents of 'options' may be a problem, in addition to 'l_vols' which tracks the selected storage pool for the archive. Properly adapting Wyng for use as a module may be possible by implementing something like a 'WyngController' class which is instantiated and returned by a special constructor function. Other tasks that may need to be done are to demarcate between internal and externally callable functions in addition to the usual handling of main(). Issue #16 also appears to require the module functionality sought in this issue. |
Move more path refs into ArchiveSet, issue #118 Fix duplicate prompt
Looking to the near future, I'm going to try getting module support as an experimental feature in the v0.4beta. In the meantime, I think I have made progress to where we can contemplate being able to create, say, a WyngController object that accepts an action + options and to have it function correctly. However, 'options' is still a global var of concern. The remaining globals defined in main should be OK as long as only one controller can be instantiated at a time. |
Check map_used() when queueing unchanged vols Localize options object, issue #118
Thanks for this awesome project. It is really reliable for such a sensitive topic like backups.
Are there any plans to convert this tool to a python module?
It would be great to be able to interact with this tool via import, instead having to of calling it with
subprocess
.Background:
I'm trying to integrate this tool into a project (written in python) which automatically generates backup,
when certain conditions are met. All backup sessions are uploaded to a server, which should be able to restore and mount any volume session for inspection. (like some kind of backup time machine)
The text was updated successfully, but these errors were encountered: