Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
Checking mergeability… Don’t worry, you can still create the pull request.
  • 5 commits
  • 5 files changed
  • 0 commit comments
  • 3 contributors
View
17 README
@@ -27,4 +27,21 @@ How to install:
A basic guide on how to setup nodeshot for your community is available here:
http://wiki.ninux.org/InstallNodeshot
+<<<<<<< .merge_file_R33hh4
If you have any question, please feel free to contact us at contatti@ninux.org
+=======
+To run some test just type:
+
+ sudo pip install Django django-extensions
+ git clone git://github.com/ninuxorg/nodeshot.git mapserver
+ cd mapserver
+ cp settings.example.py settings.py
+ ./manage.py syncdb && ./manage.py runserver
+
+Enjoy on http://localhost:8000 !
+
+
+If you have any question, please feel free to contact us:
+ contatti@ninux.org
+
+>>>>>>> .merge_file_nB43h3
View
16 nodeshot/contrib/dns/admin.py
@@ -58,11 +58,25 @@ class UserRecordAdmin(BaseAdmin):
(None, {'fields': ['user']}),
]
+class ZoneToDnsAdmin(admin.ModelAdmin):
+ pass
+
+class NodeToDnsAdmin(admin.ModelAdmin):
+ pass
+
+class DeviceToDnsAdmin(admin.ModelAdmin):
+ pass
+
+class InterfaceToDnsAdmin(admin.ModelAdmin):
+ pass
admin.site.register(dns.models.Domain, DomainAdmin)
admin.site.register(dns.models.Record, RecordAdmin)
admin.site.register(dns.models.DomainPolicy, DomainPolicyAdmin)
admin.site.register(dns.models.UserRecord, UserRecordAdmin)
-#admin.site.register(dns.models.DomainManager)
+admin.site.register(dns.models.ZoneToDns, ZoneToDnsAdmin)
+admin.site.register(dns.models.NodeToDns, NodeToDnsAdmin)
+admin.site.register(dns.models.DeviceToDns, DeviceToDnsAdmin)
+admin.site.register(dns.models.InterfaceToDns, InterfaceToDnsAdmin)
View
8 nodeshot/contrib/dns/dnsscript.py
@@ -1,8 +0,0 @@
-from nodeshot.contrib import dns
-
-class dnsscript:
-
- def prova(self):
- print 'hello,world'
-
- return True
View
18 nodeshot/contrib/dns/models.py
@@ -125,19 +125,29 @@ class ZoneToDns(models.Model):
zone = models.OneToOneField(Zone, db_index=True, unique=True)
value = models.SlugField(_('value'), max_length=20)
+ def __unicode__(self):
+ return self.value
+
class NodeToDns(models.Model):
- zone = models.OneToOneField(Node, db_index=True, unique=True)
+ node = models.OneToOneField(Node, db_index=True, unique=True)
value = models.SlugField(_('value'), max_length=20)
+ def __unicode__(self):
+ return self.value
+
class DeviceToDns(models.Model):
- zone = models.OneToOneField(Device, db_index=True, unique=True)
+ device = models.OneToOneField(Device, db_index=True, unique=True)
value = models.SlugField(_('value'), max_length=20)
+ def __unicode__(self):
+ return self.value
+
class InterfaceToDns(models.Model):
- zone = models.OneToOneField(Interface, db_index=True)
+ interface = models.OneToOneField(Interface, db_index=True)
value = models.SlugField(_('value'), max_length=20)
-
+ def __unicode__(self):
+ return self.value
class DomainPolicy(BaseDate):
"""
View
11 nodeshot/contrib/dns/script/dnsimport.py
@@ -1,9 +1,14 @@
+from re import sub
+
class DnsImport:
- def domainize(self, *args, **kwargs)
+ def domainize(self, name, *args, **kwargs)
"""
- Method who convert a string in a domain compatible name, just containing a-z and -
+ Method who convert a string in a domain compatible name, just containing a-z and _
"""
- return True
+ dn = name.lower()
+ dn = sub(r'[^a-z0-9]+', '_', dn).strip('_')
+
+ return dn

No commit comments for this range

Something went wrong with that request. Please try again.