Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guilhem/tentacool
REST API to manage Linux networking via netlink
https://github.com/guilhem/tentacool
dhcp gateway go netlink network rest route
Last synced: 3 months ago
JSON representation
REST API to manage Linux networking via netlink
- Host: GitHub
- URL: https://github.com/guilhem/tentacool
- Owner: guilhem
- License: apache-2.0
- Created: 2014-08-25T22:14:25.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-10T18:35:40.000Z (almost 8 years ago)
- Last Synced: 2024-10-17T18:27:20.537Z (3 months ago)
- Topics: dhcp, gateway, go, netlink, network, rest, route
- Language: Go
- Homepage:
- Size: 5.36 MB
- Stars: 63
- Watchers: 13
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tentacool
[![Build Status](https://travis-ci.org/guilhem/tentacool.svg?branch=master)](https://travis-ci.org/guilhem/tentacool)
[![Go report](http://goreportcard.com/badge/guilhem/tentacool)](http://goreportcard.com/report/guilhem/tentacool)## Description
`tentacool` is a Go server controlled via RESTful API through a Unix Domain Socket.
## Goal
Main goal is to manage all under the hood services for a simple "box".
All done with a auditable, fast and bulletproof software.So many software do frontend, backend and system... And finally run in `root` by easiness.
## Configuration
Recommended `/etc/network/interfaces` config for your default interface (for instance `eth0`):
```
auto eth0
iface eth0 inet manual
pre-up ifconfig $IFACE up
post-down ifconfig $IFACE down
```## API
### addresses
* `link`: interface to manage
* `ip`: ip to add ([CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) format)
* `id`#### `GET /addresses`
List all current addresses
##### Response
* Array
* [address](#address)#### `GET /addresses/:id`
##### Response
* [address](#address)
#### `POST /addresses`
Add a new address to manage.
##### parameters
* [address](#address)
`id` optional##### Response
* [address](#address)
* headers
* `X-Error`: if address is stored in BD but fail to by apply.##### Example
* without id
```json
==>
{
"link":"eth0",
"ip":"192.168.32.11/32",
}
```
```json
<==
{
"id":"1",
"link":"eth0",
"ip":"192.168.32.11/32",
}
```
* with id
```json
==>
{
"id":"foo",
"link":"eth0",
"ip":"192.168.32.12/32",
}
```
```json
<==
{
"id":"foo",
"link":"eth0",
"ip":"192.168.32.12/32",
}
```#### `PUT /addresses/:id`
Modify an existing address
##### parameters
* [address](#address)
`id` ignored##### Response
* [address](#address)
* headers
* `X-Error`: if address is stored in BD but fail to by apply.### dhcp
#### `GET /dhcp`
Checks if DHCP is running on the default interface.
##### Response
`{'active': true|false}`
#### `POST /dhcp`
Activate/deactive DHCP for default interface.
##### parameters
* active `true` or `false`