Thomas Waldmann
087c1d2c93
deduplicated fqdn lookup uniqueness check, fixed _update return values (must be Response objects, not bool)
2013-11-24 10:43:15 +01:00
Thomas Waldmann
9cd1b7d9f9
blacklist validator: fix validation error msg
...
do not talk about "domain" if we check a hostname.
also tell it is because of the blacklist.
2013-11-24 09:50:57 +01:00
Thomas Waldmann
d83df3ead1
use get_user_model and AUTH_USER_MODEL
2013-11-24 09:37:47 +01:00
Thomas Waldmann
a1210b21eb
cleanup created_by in models
...
looks like there was some reference to settings.AUTH_USER_MODEL (which is undefined)
brought Host and Domain model in sync for some fields
2013-11-24 08:34:01 +01:00
Thomas Waldmann
9c82ec021f
remove comment from Host __unicode__() for consistency (we do not have the comment in Domain __unicode__() either)
2013-11-24 05:23:20 +01:00
Thomas Waldmann
dd09b6b5af
nameserver update key / secret terminology cleanup
...
key = secret + algorithm
2013-11-24 05:04:07 +01:00
Thomas Waldmann
972a411ef4
make adding a domain workflow more similar to adding a host
...
don't ask for the secret in the first form, just autocreate one and show the configuration example with it.
2013-11-24 04:14:31 +01:00
Thomas Waldmann
ed074dd33b
catch exception when trying to delete a host we are not allowed to modify anyway
2013-11-23 02:57:15 +01:00
Thomas Waldmann
ab421fb686
models: use sane field lengths
...
for unique fields there seems to be a limit of 255 chars (not: 256)
some fields are much less than we initially had
2013-11-23 02:51:18 +01:00
Thomas Waldmann
d6b5041573
a real nic update api test, using basic auth
...
generate_secret was modified to support giving a secret (not generating a random one), so it matches the test database
add a User and a Host to the test db
2013-11-16 01:25:05 +01:00
Thomas Waldmann
cc7b22d63f
more help texts
2013-11-08 08:03:12 +01:00
Thomas Waldmann
c3ec4c5a50
Fix/generalize ns update secret generation. Reduce code duplication. Fixes #74 .
2013-11-06 02:21:12 +01:00
Thomas Waldmann
e2f51d5eb1
more pep8 fixes
2013-11-05 00:32:07 +01:00
Thomas Waldmann
e194ac0e46
show whether we received last v4/v6 update via SSL
2013-11-03 08:32:43 +01:00
Thomas Waldmann
4f50664977
add comment field for Domains
2013-11-02 12:37:27 +01:00
Thomas Waldmann
35c953347c
domain editing, shared secret generation, show bind9 configuration
2013-11-02 11:29:06 +01:00
Thomas Waldmann
87b3711fd5
handle deletion of a Domain
...
as we reference the Domain as ForeignKey in the Host, it'll kill all Hosts that reference the deleted Domain also.
needs to be the PRE_delete signal as some of the data we need is already gone when using POST.
2013-11-02 00:12:36 +01:00
Thomas Waldmann
979f2f8b3e
separate ipv4 and v6 update timestamps
2013-10-27 13:09:46 +01:00
Thomas Waldmann
1cc4236d58
add help texts to Domain model fields, improve view
2013-10-27 11:59:16 +01:00
Thomas Waldmann
a210936dcf
use now() from django.utils.timezone - it is utc and not naive
2013-10-27 07:29:58 +01:00
Thomas Waldmann
4cf62af8ab
rename Domain field available_for_everyone to public (so it is not confused with "available" field)
...
"public" field means that this zone can be used by every user (not just the owner) to create hosts there
"available" field means that the nameserver is operating and reachable
2013-10-27 05:28:30 +01:00
Thomas Waldmann
6bf1f57fc1
deal with not responding nameservers (offline or unreachable)
...
if a nameserver does not respond, we flag it in the database
(available = False) and stop talking to it for 5 minutes.
after 5 minutes, we flag it available = True again and retry talking to it
(and if not successful, flag it as unavailable again).
this avoids a unresponsive UI as we do a lot of ns queries from the templates
to get v4 and v6 addresses of our hosts from master nameservers.
we log a warning when setting unavailable and a info when setting available.
2013-10-27 05:14:47 +01:00
Thomas Waldmann
49693121ea
use zones/nameserver IPs/update keys from DB, logging (thanks to asmaps)
...
remove unneeded stuff from settings
(we still need some in conftest.py for the tests, though)
init DB for tests via conftest.py
more update algorithm choices
give origin zone (if we already know it) to dnstools functions
new views: DomainOverview, DeleteDomain
unify deletion templates using delete_object.html
add django-extensions
2013-10-18 15:30:17 -07:00
Bastian Blank
b161265cad
Use GenericIPAddressField to allow IPv6
2013-10-17 23:59:07 +02:00
Bastian Blank
d2eab62ac4
Move all stuff into own top-level package
2013-10-17 23:59:07 +02:00
Thomas Waldmann
1924888b37
reorder imports: stdlib, other libs, django, nsupdate stuff (views, etc.)
2013-10-03 19:26:39 +02:00
Thomas Waldmann
c9e21202cc
remove outdated TODO about hashing the update_secret
2013-10-03 17:42:58 +02:00
Thomas Waldmann
51caaea41f
use newstyle classes
2013-10-03 17:21:18 +02:00
Thomas Waldmann
42a89b4b42
fix pep8, fix indentation
2013-10-03 03:22:09 +02:00
Fabian Faessler
ec4e6c5df7
added Exceptions
2013-09-30 01:40:31 +02:00
Fabian Faessler
c00345df20
some overview ui changes
2013-09-29 23:49:18 +02:00
Arne Schauf
df971fe8e9
more fields
2013-09-29 22:48:09 +02:00
Fabian Faessler
beafe06852
added logic for last_api_update. field updated with Hosts.poke() method
2013-09-29 21:00:08 +02:00
Fabian Faessler
053f2f9a65
added last_api_update field and migrated db
2013-09-29 20:50:33 +02:00
Fabian Faessler
e1cad04b1e
fixed IPv6 display in the overview table
2013-09-29 20:45:55 +02:00
Fabian Faessler
a4e3ab4e58
fixed uncaptured exceptions NXDOMAIN. increased table size in the overview
2013-09-29 20:43:48 +02:00
Fabian Faessler
0db1697898
added ns query call to get the IP from hosts
2013-09-29 20:39:07 +02:00
Fabian Faessler
e917680144
post_delete fix
2013-09-29 20:30:10 +02:00
Fabian Faessler
750b264fdf
Merge branch 'master' of github.com:asmaps/nsupdate.info
2013-09-29 19:58:15 +02:00
Fabian Faessler
58159fba0c
generate secret view and logic. host view ui update.
2013-09-29 19:58:08 +02:00
Arne Schauf
13511a7982
fqdn fix
2013-09-29 18:15:15 +02:00
Fabian Faessler
43ec24bcf8
typo in model
2013-09-29 17:45:50 +02:00
Fabian Faessler
8e66e702f7
added get_fqdn() method to Host model. added post_save signal to delete dns entry when Host object is deleted
2013-09-29 17:43:17 +02:00
Fabian Faessler
3f3e142aa0
added optional attribut to user field in domain model
2013-09-29 16:38:30 +02:00
Arne Schauf
1abe15e9ab
pep8
2013-09-29 16:12:19 +02:00
Arne Schauf
4d8a6a76a5
Merge branch 'master' of github.com:asmaps/nsupdate.info
...
Conflicts:
nsupdate/main/models.py
nsupdate/main/views.py
2013-09-29 16:07:33 +02:00
Arne Schauf
34a8bbe6b8
pep8 and so on
2013-09-29 16:03:56 +02:00
Thomas Waldmann
28e17fdeb4
redundant parens, use tuple
2013-09-29 15:44:29 +02:00
Fabian Faessler
dcd78ac304
pep8 fixes
2013-09-29 15:37:58 +02:00
Thomas Waldmann
105315548a
remove resolved TODO, the update_secret is hashed using django's "sha1" hasher (salted sha1)
2013-09-29 15:13:11 +02:00