-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3c3f956
Showing
23 changed files
with
751 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use_nix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
|
||
# Created by https://www.gitignore.io/api/python | ||
|
||
### Python ### | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
|
||
### Python Patch ### | ||
.venv/ | ||
|
||
### Python.VirtualEnv Stack ### | ||
# Virtualenv | ||
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/ | ||
[Bb]in | ||
[Ii]nclude | ||
[Ll]ib | ||
[Ll]ib64 | ||
[Ll]ocal | ||
[Ss]cripts | ||
pyvenv.cfg | ||
pip-selfcheck.json | ||
|
||
|
||
# End of https://www.gitignore.io/api/python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Copyright (c) 2011, 2015 iXsystems, Inc. | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY | ||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY | ||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
Description | ||
--- | ||
|
||
ZFS_ Replicate Utility | ||
|
||
A small command line utility to handle remote replication of ZFS_ snapshots | ||
using SSH_. | ||
|
||
--- | ||
Getting Started | ||
--- | ||
|
||
Usage is pretty straight-forward and documented in the command's help output. | ||
For more information on ZFS_ snapshots, see: | ||
`Working With Oracle Solaris ZFS Snapshots and Clones <https://docs.oracle.com/cd/E26505_01/html/E37384/gavvx.html#scrolltoc>`_. | ||
|
||
--- | ||
Compared to Other Tools | ||
--- | ||
|
||
TODO | ||
|
||
--- | ||
Reporting Issues | ||
--- | ||
|
||
Any isseus discovered should be recorded on | ||
`Github <https://github.com/alunduil/zfs-replicate>`_. If you believe you've | ||
found an error or have a suggestion for a new feature, please ensure that it is | ||
reported. | ||
|
||
If you would like to contribute a fix or new feature, please submit a pull | ||
request. This project follows | ||
`git flow <http://nvie.com/posts/a-successful-git-branching-model/>`_ and | ||
utilizes travis_ to automatically check pull requests before a manual review. | ||
|
||
.. _SSH: https://www.openssh.com/ | ||
.. _trafis: https://travis-ci.org/aunduil/zfs-replicate | ||
.. _ZFS: http://open-zfs.org/wiki/System_Administration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ buildPythonApplication, click, glibcLocales, hypothesis | ||
, pylint, pytest, python, stdenv | ||
}: | ||
buildPythonApplication rec { | ||
pname = "zfs-replicate"; | ||
version = "1.0.0"; | ||
name = "${pname}-${version}"; | ||
|
||
src = ./.; | ||
|
||
checkInputs = [ | ||
hypothesis | ||
pylint | ||
pytest | ||
]; | ||
|
||
buildInputs = [ | ||
glibcLocales | ||
]; | ||
|
||
propagatedBuildInputs = [ | ||
click | ||
]; | ||
|
||
postPatch = '' | ||
patchShebangs bin | ||
''; | ||
|
||
doCheck = true; | ||
|
||
checkPhase = '' | ||
export LANG="en_US.UTF-8" | ||
export LC_ALL="en_US.UTF-8" | ||
pylint zfs/replicate | ||
pytest | ||
''; | ||
|
||
meta = with stdenv.lib; { | ||
homepage = https://github.com/alunduil/zfs-replicate; | ||
description = "ZFS Snapshot Replicator"; | ||
license = licenses.bsd2; | ||
maintainers = with maintainers; [ alunduil ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[metadata] | ||
name = zfs-replicate | ||
version = 1.0.0 | ||
description = ZFS Snapshot Replicator | ||
|
||
license = BSD-2 | ||
|
||
author = Alex Brandt | ||
author_email = [email protected] | ||
|
||
url = https://github.com/alunduil/zfs-replicate | ||
|
||
[options] | ||
setup_requires = | ||
pytest-runner | ||
install_requires = | ||
click | ||
tests_require = | ||
hypothesis | ||
pytest | ||
packages = | ||
zfs.replicate | ||
zfs.replicate.cli | ||
zfs.replicate.ssh.cipher | ||
provides = | ||
zfs.replicate | ||
zfs.replicate.cli | ||
zfs.replicate.ssh.cipher | ||
|
||
[options.entry_points] | ||
console_scripts = | ||
zfs-replicate = zfs.replicate.cli:main | ||
|
||
[aliases] | ||
test = pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from setuptools import setup; setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
let | ||
dependencies = ps: [ | ||
ps.click | ||
ps.hypothesis | ||
ps.pylint | ||
ps.pytest | ||
]; | ||
|
||
pkgs = import <nixpkgs> { }; | ||
in | ||
(pkgs.python36.withPackages dependencies).env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
"""ZFS replicate module.""" | ||
|
||
from . import subprocess |
Oops, something went wrong.