Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pjosols/datadomain
A Python package for interacting with the DataDomain backup appliance. It uses the DataDomain REST API where possible and reverts to sending commands via SSH where necessary.
https://github.com/pjosols/datadomain
Last synced: 29 days ago
JSON representation
A Python package for interacting with the DataDomain backup appliance. It uses the DataDomain REST API where possible and reverts to sending commands via SSH where necessary.
- Host: GitHub
- URL: https://github.com/pjosols/datadomain
- Owner: pjosols
- License: mit
- Created: 2019-07-30T17:39:28.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T05:57:14.000Z (about 2 years ago)
- Last Synced: 2023-03-21T12:33:00.306Z (almost 2 years ago)
- Language: Python
- Homepage:
- Size: 20.5 KB
- Stars: 3
- Watchers: 1
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
.. _datadomainpy:
datadomain.py
=============A Python package for interacting with the DataDomain backup appliance. It
uses the DataDomain REST API where possible and reverts to sending
commands via SSH where necessary.Features
--------- Create or delete an mtree
- Create or delete an NFS export
- Create or delete a VLAN interface
- Establish MTree replicationGet started
-----------
::pip install git+https://github.com/pauljolsen/datadomain
::
from datadomain import DataDomain
from secrets import password# Instantiate DataDomain
dd = DataDomain("nycdd01.mydomain.com")# Login
dd.login("mydomain\\pauljolsen", password)# Logout
dd.logout()Work with MTrees
~~~~~~~~~~~~~~~~::
# Create MTree
dd.create_mtree("pjo-test-22")# Get All MTrees
dd.get_mtree()# Get specific MTree
dd.get_mtree("pjo-test-22")# Delete MTree
dd.delete_mtree('pjo-test-22')Work with VLAN interfaces
~~~~~~~~~~~~~~~~~~~~~~~~~::
# Create VLAN Interface
dd.create_interface("10.0.1.125", "255.255.255.0", vlan_id=10, physical_int="veth2")# Get All VLAN Interfaces
dd.get_interface()# Get Specific VLAN Interface
dd.get_interface("veth2.10")# Delete VLAN Interface
dd.delete_interface("veth2.10")Work with NFS exports
~~~~~~~~~~~~~~~~~~~~~::
# Create NFS Export
dd.create_export(
name='pjo-test-22',
clients=[
{
"name": "10.0.1.0/24",
"options": "sec=sys rw no_root_squash no_all_squash secure version=3"
}
])# Get All NFS Exports
dd.get_export()# Get specific NFS Export
dd.get_export("pjo-test-22")# Delete NFS Export
dd.delete_export("pjo-test-22")Establish MTree replication
~~~~~~~~~~~~~~~~~~~~~~~~~~~Note that it is assumed the same credentials used on the source also
work on the destination.::
dd.replicate_mtree(mtree="pjo-test-22", destination="londd01.mydomain.com")