summaryrefslogtreecommitdiffstats
path: root/src/virtBootstrap/progress.py
Commit message (Collapse)AuthorAgeFilesLines
* Define source code encodingRadostin Stoyanov2017-08-281-0/+1
| | | | | | | | | The default source code encoding in Python2.* is ASCII (PEP 263 [1]) and in Python3.* is UTF-8 (PEP 3120 [2]). Define the encoding on top of each file for consistency. [1] https://www.python.org/dev/peps/pep-0263/ [2] https://www.python.org/dev/peps/pep-3120/
* Add new module to store the progressRadostin Stoyanov2017-07-051-0/+67
This module is used to store the progress of the bootstrap process and could be used by other applications to get status of virt-bootstrap as well as percentage of completion. Convert some info messages to use this new system for a clean reporting in client applications. Example usage: import virtBootstrap def show_progress(data): print("Status: %s, Progress: %.2f" % (data['status'], data['value'])) virtBootstrap.bootstrap(uri='docker://ubuntu', dest="/tmp/test1", progress_cb=show_progress)