Commit a07edd16 authored by Nikolai Kristiansen's avatar Nikolai Kristiansen
Browse files

Use IPv6-field and adds ipv6 test data

parent c332f7bc
......@@ -8,8 +8,14 @@ A Django app for managing computer equipment.
python manage.py migrate
python manage.py runserver
## Development tasks
Dump test data:
python manage.py dumpdata mdb --natural-foreign --indent=4 > mdb/fixtures/test_data.json
## Features
* Creates DHCPD configuration files
* Creates DNS zone files for BIND
* TODO: Creates PXE config files (with random secret for use with Puppet autosign)
\ No newline at end of file
* TODO: Creates PXE config files (with random secret for use with Puppet autosign)
[
{
"pk": 1,
"model": "mdb.nameserver",
"fields": {
"hostname": "sega.neuf.no"
},
"model": "mdb.nameserver"
"pk": 1
},
{
"pk": 2,
"model": "mdb.nameserver",
"fields": {
"hostname": "atari.neuf.no"
},
"model": "mdb.nameserver"
"pk": 2
},
{
"pk": 1,
"model": "mdb.mailexchange",
"fields": {
"priority": 10,
"hostname": "mx.neuf.no"
},
"model": "mdb.mailexchange"
"pk": 1
},
{
"pk": 1,
"model": "mdb.domain",
"fields": {
"domain_admin": "sysadmin@neuf.no",
"created_date": "2015-10-03T13:02:53.581",
"domain_ipaddr": "127.0.0.1",
"domain_retry": 7200,
"domain_active_serial": 0,
"domain_nameservers": [
1,
2
],
"domain_soa": "sega.neuf.no",
"domain_retry": 7200,
"domain_expire": 604800,
"domain_ipaddr": "127.0.0.1",
"domain_mailexchanges": [
1
],
"domain_serial": 2015100301,
"domain_minimum_ttl": 86400,
"domain_ttl": 3600,
"domain_refresh": 28800,
"domain_name": "edb.technology",
"domain_admin": "sysadmin@neuf.no",
"domain_serial": 2015100313,
"domain_nameservers": [
1,
2
],
"domain_filename": "/tmp/bind-db.edb.technology",
"domain_minimum_ttl": 86400,
"domain_expire": 604800,
"domain_soa": "sega.neuf.no",
"domain_ttl": 3600
"created_date": "2015-10-03T13:02:53.581",
"domain_name": "edb.technology"
},
"model": "mdb.domain"
"pk": 1
},
{
"pk": 1,
"model": "mdb.dhcpconfig",
"fields": {
"log_facility": "local7",
"name": "default",
"max_lease_time": 7200,
"default_lease_time": 600,
"authoritative": false,
"ddns_update_style": "none",
"authoritative": false,
"serial": 2015100401,
"active_serial": 1,
"serial": 2015100302
"name": "default",
"default_lease_time": 600
},
"model": "mdb.dhcpconfig"
"pk": 1
},
{
"pk": 1,
"model": "mdb.ip6subnet",
"fields": {
"created_date": "2015-10-03T13:08:17.765",
"network": "10.0.3.0",
"name": "clients",
"created_date": "2015-10-04T12:50:12.248",
"domain_soa": "sega.neuf.no",
"domain_retry": 7200,
"domain_expire": 604800,
"domain_ttl": 3600,
"domain_minimum_ttl": 86400,
"network": "2001:16d8:eeb6:3",
"domain_serial": 1,
"domain_refresh": 28800,
"domain_admin": "sysadmin@neuf.no",
"domain_active_serial": 0,
"netmask": 64,
"domain_nameservers": [
1,
2
],
"dhcp_dynamic_end": "10.0.3.254",
"domain_serial": 2015100301,
"domain_filename": "/tmp/bind-reverse-v6-2001-16d8-eeb6-3-64.ip6.arpa",
"name": "client-ipv6",
"domain_name": "3.0.0.0.6.b.e.e.8.d.6.1.1.0.0.2.ip6.arpa"
},
"pk": 1
},
{
"model": "mdb.ip4subnet",
"fields": {
"created_date": "2015-10-03T13:08:17.765",
"domain_soa": "sega.neuf.no",
"dhcp_config": 1,
"domain_refresh": 28800,
"domain_name": "3.0.10.in-addr.arpa",
"netmask": "255.255.255.0",
"domain_retry": 7200,
"dhcp_dynamic_start": "10.0.3.2",
"domain_admin": "sysadmin@neuf.no",
"domain_filename": "/tmp/bind-db.3.0.10.in-addr.arpa",
"domain_minimum_ttl": 86400,
"domain_expire": 604800,
"domain_ttl": 3600,
"domain_nameservers": [
1,
2
],
"dhcp_dynamic_end": "10.0.3.254",
"domain_minimum_ttl": 86400,
"network": "10.0.3.0",
"domain_serial": 2015100313,
"domain_refresh": 28800,
"domain_admin": "sysadmin@neuf.no",
"domain_active_serial": 0,
"netmask": "255.255.255.0",
"dhcp_dynamic": true,
"domain_soa": "sega.neuf.no",
"domain_ttl": 3600
"domain_filename": "/tmp/bind-db.3.0.10.in-addr.arpa",
"name": "clients",
"domain_name": "3.0.10.in-addr.arpa"
},
"model": "mdb.ip4subnet"
"pk": 1
},
{
"pk": 1,
"model": "mdb.dhcpoption",
"fields": {
"ip4subnet": 1,
"key": "domain-name",
"ip4subnet": 1,
"value": "\"edb.technology\""
},
"model": "mdb.dhcpoption"
"pk": 1
},
{
"pk": 2,
"model": "mdb.dhcpoption",
"fields": {
"ip4subnet": 1,
"key": "domain-name-servers",
"ip4subnet": 1,
"value": "158.36.190.194, 158.36.190.199, 8.8.8.8"
},
"model": "mdb.dhcpoption"
"pk": 2
},
{
"pk": 3,
"model": "mdb.dhcpoption",
"fields": {
"ip4subnet": 1,
"key": "routers",
"ip4subnet": 1,
"value": "158.36.186.1"
},
"model": "mdb.dhcpoption"
"pk": 3
},
{
"pk": 1,
"model": "mdb.dhcpcustomfield",
"fields": {
"ip4subnet": 1,
"value": "deny unknown-clients"
},
"model": "mdb.dhcpcustomfield"
"pk": 1
},
{
"pk": 1,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.1"
"ping_avg_rtt": null,
"address": "10.0.3.1",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 1
},
{
"pk": 2,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.2"
"ping_avg_rtt": null,
"address": "10.0.3.2",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 2
},
{
"pk": 3,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.3"
"ping_avg_rtt": null,
"address": "10.0.3.3",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 3
},
{
"pk": 4,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.4"
"ping_avg_rtt": null,
"address": "10.0.3.4",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 4
},
{
"pk": 5,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.5"
"ping_avg_rtt": null,
"address": "10.0.3.5",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 5
},
{
"pk": 6,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.6"
"ping_avg_rtt": null,
"address": "10.0.3.6",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 6
},
{
"pk": 7,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.7"
"ping_avg_rtt": null,
"address": "10.0.3.7",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 7
},
{
"pk": 8,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.8"
"ping_avg_rtt": null,
"address": "10.0.3.8",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 8
},
{
"pk": 9,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.9"
"ping_avg_rtt": null,
"address": "10.0.3.9",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 9
},
{
"pk": 10,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.10"
"ping_avg_rtt": null,
"address": "10.0.3.10",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 10
},
{
"pk": 11,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.11"
"ping_avg_rtt": null,
"address": "10.0.3.11",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 11
},
{
"pk": 12,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.12"
"ping_avg_rtt": null,
"address": "10.0.3.12",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 12
},
{
"pk": 13,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.13"
"ping_avg_rtt": null,
"address": "10.0.3.13",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 13
},
{
"pk": 14,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.14"
"ping_avg_rtt": null,
"address": "10.0.3.14",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 14
},
{
"pk": 15,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.15"
"ping_avg_rtt": null,
"address": "10.0.3.15",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 15
},
{
"pk": 16,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.16"
"ping_avg_rtt": null,
"address": "10.0.3.16",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 16
},
{
"pk": 17,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.17"
"ping_avg_rtt": null,
"address": "10.0.3.17",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 17
},
{
"pk": 18,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.18"
"ping_avg_rtt": null,
"address": "10.0.3.18",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 18
},
{
"pk": 19,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.19"
"ping_avg_rtt": null,
"address": "10.0.3.19",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 19
},
{
"pk": 20,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.20"
"ping_avg_rtt": null,
"address": "10.0.3.20",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 20
},
{
"pk": 21,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.21"
"ping_avg_rtt": null,
"address": "10.0.3.21",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 21
},
{
"pk": 22,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.22"
"ping_avg_rtt": null,
"address": "10.0.3.22",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 22
},
{
"pk": 23,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.23"
"ping_avg_rtt": null,
"address": "10.0.3.23",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 23
},
{
"pk": 24,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.24"
"ping_avg_rtt": null,
"address": "10.0.3.24",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 24
},
{
"pk": 25,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.25"
"ping_avg_rtt": null,
"address": "10.0.3.25",
"last_contact": null
},
"model": "mdb.ip4address"
"pk": 25
},
{
"pk": 26,
"model": "mdb.ip4address",
"fields": {
"ping_avg_rtt": null,
"subnet": 1,
"last_contact": null,
"address": "10.0.3.26"
"ping_avg_rtt": null,
"address": "10.0.3.26",