holland-discuss team mailing list archive
-
holland-discuss team
-
Mailing list archive
-
Message #00154
Re: Creating a new backup plugin
We have pretty loose coding standards thus far that roughly follow
pep8. 4 spaces, avoid long lines, etc.
As far as plugins go, no particular standard has emerged. Typically
these are some python package and the plugin interface is defined in a
module called plugin.py. For core holland plugins, these are
currently placed under the holland.backup namespace, but "thirdparty"
plugins can define any namespace they like. Plugins are exposed via
a setuptools entrypoint under the "holland.backup" namespace[1].
Probably ./plugins/holland.backup.xtrabackup is one of the simpler
plugins to look at that follows the current holland style. The 1.0.x
plugin "api" is very primitive - it is just a python class with a
particular constructor signature[2] and estimate_backup_size() /
backup() methods.
If you have any questions feel free to ping the list.
[1] https://github.com/holland-backup/holland/blob/master/plugins/holland.backup.xtrabackup/setup.py#L23
[2] https://github.com/holland-backup/holland/blob/master/plugins/holland.backup.xtrabackup/holland/backup/xtrabackup/plugin.py#L55
~Andrew
On Fri, Feb 28, 2014 at 12:47 PM, Frostyfrog <frostyfrog2@xxxxxxxxx> wrote:
> So I'm trying to create a new backup plugin using lvm that I would like to
> send a pull request for once it's finished. Are there any coding
> standards/styles/practices that I should follow?
> ~ Frostyfrog ^.^
>
> _______________________________________________
> Mailing list: https://launchpad.net/~holland-discuss
> Post to : holland-discuss@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~holland-discuss
> More help : https://help.launchpad.net/ListHelp
>
References