Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nibalizer/nodenta
Curl based zfs management using node.js
https://github.com/nibalizer/nodenta
Last synced: about 1 month ago
JSON representation
Curl based zfs management using node.js
- Host: GitHub
- URL: https://github.com/nibalizer/nodenta
- Owner: nibalizer
- License: other
- Created: 2013-12-10T07:15:39.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-28T21:43:06.000Z (almost 11 years ago)
- Last Synced: 2024-10-26T20:09:27.631Z (about 2 months ago)
- Language: JavaScript
- Size: 145 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
nodenta
=======A node app to consume REST calls and make ZFS/NFS changes on the host system.
System Requirements
===================This has been developed on FreeBSD. In theory, any system with both zfs and node should work. Nodenta doesn't know how to ask for sudo permissions, and so must be run as root for now.
Installation and use
====================git clone https://github.com/nibalizer/nodenta.git
cd nodenta
npm install
node app.jsapi endpoints
=============list
----Lists zfs filesystems.
curl -H "Content-Type: application/json" http://127.0.0.1:3000/list
Example response:
[
{
"name": "picombinator",
"used": 201728,
"avail": 983547510784,
"refer": 32768,
"mountpoint": "/picombinator"
},
{
"name": "picombinator/nibalizer",
"used": 64512,
"avail": 983547510784,
"refer": 32768,
"mountpoint": "/picombinator/nibalizer"
},
{
"name": "picombinator/nibalizer/science",
"used": 31744,
"avail": 10737418240,
"refer": 31744,
"mountpoint": "/picombinator/nibalizer/science"
}]
create
------Creates zfs filesystems
curl -d '{"filesystem": "picombinator/nibalizer/science"}' \
-H "Content-Type: application/json" \
http://127.0.0.1:3000/api/1/createExample response:
Creating zfs filesystem
destroy
-------Destroys zfs filesystems
curl -d '{"filesystem": "picombinator/nibalizer/test"}' \
-H "Content-Type: application/json" \
http://127.0.0.1:3000/api/1/destroyExample response:
Destroying zfs filesystem
get
---Gets a property from a filesystem
curl -d '{"filesystem": "picombinator/nibalizer/science", \
"property": "quota"}' -H "Content-Type: application/json" \
http://127.0.0.1:3000/api/1/getExample response:
{
"name": "picombinator/nibalizer/science",
"property": "quota",
"value": "10737418240",
"source": "local"
}set
---Sets a property on a filesystem
curl -d '{"filesystem": "picombinator/nibalizer/science", \
"property": "quota", "value": "10737418240"}' -H \
"Content-Type: application/json" \
http://127.0.0.1:3000/api/1/set
Example responseNo response
Contributing
============Please contribute! Right now things are simple but more advanced control should be possible.
Copyright
=========Copyright 2013 Spencer Krum
License
=======Apache 2