Convert to JSON format
This commit is contained in:
parent
d65e4fadf1
commit
d6b1a4932c
91
README.md
91
README.md
|
@ -4,37 +4,68 @@ EntityDB holds all network allocations and associated information.
|
|||
|
||||
## Format
|
||||
|
||||
Firstly create an entry by creating a directory with your unique username, `deavmi/` for example.
|
||||
Every 'entity' has its data stored in a JSON file named as 'UNIQUE.json' where UNIQUE is any unique identifier (UUID/hash/name etc.).
|
||||
|
||||
### Networks
|
||||
### Content of entity (data)
|
||||
|
||||
All network declarations are created as entries in the file `deavmi/network` as so:
|
||||
The data should be a JSON object with a anonymous top-level object and "route" as only object. "route" should be a list of all routes provided by the entity with a required list of devices named "device".
|
||||
|
||||
```
|
||||
[deavmi.home.network]
|
||||
# Required network information
|
||||
Prefix="fdd2:cbf2:61bd::/48"
|
||||
|
||||
# For network connectivity tests
|
||||
RouterIP="fdd2:cbf2:61bd::1"
|
||||
|
||||
[deavmi.community.network1]
|
||||
# Required network information
|
||||
Prefix="fd08:8441:e254::/48"
|
||||
|
||||
# For network connectivity tests
|
||||
RouterIP="fd08:8441:e254::1"
|
||||
```
|
||||
|
||||
### Services
|
||||
|
||||
All network services are declared within `deavmi/services` (file) like so:
|
||||
|
||||
```
|
||||
[Web server]
|
||||
address="fdd2:cbf2:61bd::2"
|
||||
port=80
|
||||
[Babel web]
|
||||
address="fdd2:cbf2:61bd::2"
|
||||
port=4444
|
||||
"device" must contain at least one device that is reachable. A router is commonly used as the only object for the network as it is necessary in most setups.
|
||||
|
||||
Every device should contain the CRXN IPv6 address, along the optional list of services as "service".
|
||||
|
||||
Services must have a type (eg. tcp, udp, http, rsync, git) and at least one endpoint in the endpoints list.
|
||||
|
||||
Every object may contain a optional description, except lists.
|
||||
|
||||
Descriptions should not be used other than for describing things in a human-readable form.
|
||||
|
||||
### Example
|
||||
|
||||
Here's a example that you may modify to your needs.
|
||||
|
||||
```json
|
||||
{
|
||||
"route": [
|
||||
"fdaa:bbcc:ddee::/48": {
|
||||
"description": "My home network",
|
||||
"device": [
|
||||
"router": {
|
||||
"description": "My custom router running BIRD",
|
||||
"address": "fdaa:bbcc:ddee::1"
|
||||
},
|
||||
"mail": {
|
||||
"description": "Electronic mail endpoint",
|
||||
"address": "fdaa:bbcc:ddee::5",
|
||||
"service": [
|
||||
{
|
||||
"type": "smtp",
|
||||
"endpoint": [
|
||||
{ "port": 25 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Super-secret authentication gateway",
|
||||
"type": "kerberos",
|
||||
"endpoint": [
|
||||
{ "port": 89 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "imap",
|
||||
"endpoint": [
|
||||
{ "port": 143 }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"fdcc:ba11:b00b::/48": {
|
||||
"device": [
|
||||
"router": "fdcc:ba11:b00b::1"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
"route": [
|
||||
"fdd2:cbf2:61bd::/48": {
|
||||
"description": "deavmi.home.network1",
|
||||
"device": [
|
||||
"router": {
|
||||
"address": "fdd2:cbf2:61bd::1"
|
||||
},
|
||||
"webserver": {
|
||||
"address": "fdd2:cbf2:61bd::2",
|
||||
"service": [
|
||||
{
|
||||
"description": "Personal webserver",
|
||||
"type": "http",
|
||||
"endpoint": [
|
||||
{ "port": 80 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Babel web",
|
||||
"type": "http",
|
||||
"endpoint": [
|
||||
{ "port": 4444 }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"fda2:a9b0:a02b::/48": {
|
||||
"description": "deavmi.home.network2",
|
||||
"device": [
|
||||
"router": "fda2:a9b0:a02b::1"
|
||||
]
|
||||
},
|
||||
"fd08:8441:e254::/48": {
|
||||
"description": "deavmi.community.network1",
|
||||
"device": [
|
||||
"router": "fd08:8441:e254::1"
|
||||
]
|
||||
},
|
||||
"fd1d:370c:38ee::/48": {
|
||||
"description": "deavmi.community.network2",
|
||||
"device": [
|
||||
"router": "fd1d:370c:38ee::1"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
[deavmi.home.network1]
|
||||
# Required network information
|
||||
Prefix="fdd2:cbf2:61bd::/48"
|
||||
|
||||
# For network connectivity tests
|
||||
RouterIP="fdd2:cbf2:61bd::1"
|
||||
|
||||
#Mikrotik network
|
||||
[deavmi.home.network2]
|
||||
# Required network information
|
||||
Prefix="fda2:a9b0:a02b::/48"
|
||||
|
||||
# For network connectivity tests
|
||||
RouterIP="fda2:a9b0:a02b::1"
|
||||
|
||||
[deavmi.community.network1]
|
||||
# Required network information
|
||||
Prefix="fd08:8441:e254::/48"
|
||||
|
||||
# For network connectivity tests
|
||||
RouterIP="fd08:8441:e254::1"
|
||||
|
||||
[deavmi.community.network2]
|
||||
# Required network information
|
||||
Prefix="fd1d:370c:38ee::/48"
|
||||
|
||||
# For network connectivity tests
|
||||
RouterIP="fd1d:370c:38ee::1"
|
|
@ -1,6 +0,0 @@
|
|||
[Web server (personal webserver)]
|
||||
address="fdd2:cbf2:61bd::2"
|
||||
port=80
|
||||
[Babel web]
|
||||
address="fdd2:cbf2:61bd::2"
|
||||
port=4444
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"route": [
|
||||
"fdcf:25b5:8c10::/48": {
|
||||
"description": "minus.home.network",
|
||||
"device": [
|
||||
"router": {
|
||||
"address": "fdcf:25b5:8c10::1"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
[minus.home.network]
|
||||
Prefix="fdcf:25b5:8c10::/48"
|
||||
|
||||
RouterIP="fdcf:25b5:8c10::1"
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"route": [
|
||||
"fdfb:1a20:a9bf::/48": {
|
||||
"description": "rany.server.network1",
|
||||
"device": [
|
||||
"router": {
|
||||
"address": "fdfb:1a20:a9bf::1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2a04:5b81:2055::/48": {
|
||||
"description": "rany.server.network2",
|
||||
"device": [
|
||||
"router": {
|
||||
"address": "2a04:5b81:2055::1"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
[rany.server.network1]
|
||||
# Required network information
|
||||
Prefix="fdfb:1a20:a9bf::/48"
|
||||
|
||||
# For network connectivity tests
|
||||
RouterIP="fdfb:1a20:a9bf::1"
|
||||
|
||||
[rany.server.network2]
|
||||
# Required network information
|
||||
Prefix="2a04:5b81:2055::/48"
|
||||
|
||||
# For network connectivity tests
|
||||
RouterIP="2a04:5b81:2055::1"
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"route": [
|
||||
"fd66:7afc:576::/48": {
|
||||
"description": "rnb.home.network",
|
||||
"device": [
|
||||
"router": {
|
||||
"address": "fd66:7afc:576::1"
|
||||
},
|
||||
"irc-server": {
|
||||
"address": "fd66:7afc:576::2",
|
||||
"service": [
|
||||
{
|
||||
"description": "BNET IRC server",
|
||||
"type": "irc",
|
||||
"endpoint": [
|
||||
{ "port": 6667 }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
[rnb.home.network]
|
||||
Prefix="fd66:7afc:576::/48"
|
||||
|
||||
RouterIP="fd66:7afc:576::1"
|
|
@ -1,3 +0,0 @@
|
|||
[IRC]
|
||||
address="fd66:7afc:576::2"
|
||||
port=6667
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"route": [
|
||||
"fd9a:1111:98cc::/48": {
|
||||
"description": "starland.galactic.network",
|
||||
"device": [
|
||||
"router": "fd9a:1111:98cc::1"
|
||||
]
|
||||
},
|
||||
"fd7e:33d3:de22::/48": {
|
||||
"description": "starland.solar.network",
|
||||
"device": [
|
||||
"router": "fd7e:33d3:de22::1"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
[starland.galactic.network]
|
||||
# Required network information
|
||||
Prefix="fd9a:1111:98cc::/48"
|
||||
|
||||
# For network connectivity tests
|
||||
RouterIP="fd9a:1111:98cc::1"
|
||||
|
||||
[starland.solar.network]
|
||||
# Required network information
|
||||
Prefix="fd7e:33d3:de22::/48"
|
||||
|
||||
# For network connectivity tests
|
||||
RouterIP="fd7e:33d3:de22::1"
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"route": [
|
||||
"fdd3:5d24:69d3::/48": {
|
||||
"description": "thooms@v17",
|
||||
"device": [
|
||||
"router": "fdd3:5d24:69d3::1"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
[thooms@v17]
|
||||
# Required network information
|
||||
Prefix="fdd3:5d24:69d3::/48"
|
||||
|
||||
# For network connectivity tests
|
||||
RouterIP="fdd3:5d24:69d3::1"
|
Loading…
Reference in New Issue