From 510c55e843ea0a1c049b39a9f57ff044190fcbd9 Mon Sep 17 00:00:00 2001 From: Ken Raffenetti Date: Tue, 29 Aug 2006 16:33:36 +0000 Subject: Added all the django application code includes database models, file templates, and web apps git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2135 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Server/Hostbase/hostbase/__init__.py | 0 src/lib/Server/Hostbase/hostbase/__init__.pyc | Bin 0 -> 197 bytes src/lib/Server/Hostbase/hostbase/__init__.pyo | Bin 0 -> 149 bytes src/lib/Server/Hostbase/hostbase/models.py | 143 +++++ src/lib/Server/Hostbase/hostbase/models.pyc | Bin 0 -> 6943 bytes src/lib/Server/Hostbase/hostbase/models.pyo | Bin 0 -> 206 bytes src/lib/Server/Hostbase/hostbase/views.py | 654 +++++++++++++++++++++ src/lib/Server/Hostbase/hostbase/views.pyc | Bin 0 -> 19040 bytes src/lib/Server/Hostbase/hostbase/views.pyo | Bin 0 -> 146 bytes .../Hostbase/hostbase/webtemplates/confirm.html | 189 ++++++ .../Server/Hostbase/hostbase/webtemplates/dns.html | 133 +++++ .../Hostbase/hostbase/webtemplates/dnsedit.html | 192 ++++++ .../Hostbase/hostbase/webtemplates/edit.html | 314 ++++++++++ .../Hostbase/hostbase/webtemplates/errors.html | 126 ++++ .../Hostbase/hostbase/webtemplates/host.html | 173 ++++++ .../Server/Hostbase/hostbase/webtemplates/new.html | 191 ++++++ .../Hostbase/hostbase/webtemplates/results.html | 141 +++++ .../Hostbase/hostbase/webtemplates/search.html | 183 ++++++ 18 files changed, 2439 insertions(+) create mode 100644 src/lib/Server/Hostbase/hostbase/__init__.py create mode 100644 src/lib/Server/Hostbase/hostbase/__init__.pyc create mode 100644 src/lib/Server/Hostbase/hostbase/__init__.pyo create mode 100644 src/lib/Server/Hostbase/hostbase/models.py create mode 100644 src/lib/Server/Hostbase/hostbase/models.pyc create mode 100644 src/lib/Server/Hostbase/hostbase/models.pyo create mode 100644 src/lib/Server/Hostbase/hostbase/views.py create mode 100644 src/lib/Server/Hostbase/hostbase/views.pyc create mode 100644 src/lib/Server/Hostbase/hostbase/views.pyo create mode 100644 src/lib/Server/Hostbase/hostbase/webtemplates/confirm.html create mode 100644 src/lib/Server/Hostbase/hostbase/webtemplates/dns.html create mode 100644 src/lib/Server/Hostbase/hostbase/webtemplates/dnsedit.html create mode 100644 src/lib/Server/Hostbase/hostbase/webtemplates/edit.html create mode 100644 src/lib/Server/Hostbase/hostbase/webtemplates/errors.html create mode 100644 src/lib/Server/Hostbase/hostbase/webtemplates/host.html create mode 100644 src/lib/Server/Hostbase/hostbase/webtemplates/new.html create mode 100644 src/lib/Server/Hostbase/hostbase/webtemplates/results.html create mode 100644 src/lib/Server/Hostbase/hostbase/webtemplates/search.html (limited to 'src/lib/Server/Hostbase/hostbase') diff --git a/src/lib/Server/Hostbase/hostbase/__init__.py b/src/lib/Server/Hostbase/hostbase/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/lib/Server/Hostbase/hostbase/__init__.pyc b/src/lib/Server/Hostbase/hostbase/__init__.pyc new file mode 100644 index 000000000..928d88eff Binary files /dev/null and b/src/lib/Server/Hostbase/hostbase/__init__.pyc differ diff --git a/src/lib/Server/Hostbase/hostbase/__init__.pyo b/src/lib/Server/Hostbase/hostbase/__init__.pyo new file mode 100644 index 000000000..13344544e Binary files /dev/null and b/src/lib/Server/Hostbase/hostbase/__init__.pyo differ diff --git a/src/lib/Server/Hostbase/hostbase/models.py b/src/lib/Server/Hostbase/hostbase/models.py new file mode 100644 index 000000000..6253a7b50 --- /dev/null +++ b/src/lib/Server/Hostbase/hostbase/models.py @@ -0,0 +1,143 @@ +from django.db import models + +# Create your models here. +class Host(models.Model): + NETGROUP_CHOICES = ( + ('none', 'none'),('cave', 'cave'),('ccst', 'ccst'),('mcs', 'mcs'), + ('mmlab', 'mmlab'),('sp', 'sp'),('red', 'red'),('virtual', 'virtual'), + ('win', 'win'),('xterm', 'xterm'),('lcrc', 'lcrc'),('anlext', 'anlext'), + ('teragrid', 'teragrid') + ) + STATUS_CHOICES = ( + ('active','active'),('dormant','dormant') + ) + SUPPORT_CHOICES = ( + ('green','green'),('yellow','yellow'),('red','red') + ) + CLASS_CHOICES = ( + ('scientific','scientific'), + ('operations','operations'),('guest','guest'), + ('confidential','confidential'),('public','public') + ) + hostname = models.CharField(maxlength=64) + whatami = models.CharField(maxlength=16) + netgroup = models.CharField(maxlength=32, choices=NETGROUP_CHOICES) + security_class = models.CharField('class', maxlength=16) + support = models.CharField(maxlength=8, choices=SUPPORT_CHOICES) + csi = models.CharField(maxlength=32, blank=True) + printq = models.CharField(maxlength=32) + dhcp = models.BooleanField() + outbound_smtp = models.BooleanField() + primary_user = models.EmailField() + administrator = models.EmailField(blank=True) + location = models.CharField(maxlength=16) + comments = models.TextField(blank=True) + expiration_date = models.DateField(null=True, blank=True) + last = models.DateField(auto_now=True, auto_now_add=True) + status = models.CharField(maxlength=7, choices=STATUS_CHOICES) + + class Admin: + list_display = ('hostname', 'last') + search_fields = ['hostname'] + + def __str__(self): + return self.hostname + +class Interface(models.Model): + TYPE_CHOICES = ( + ('eth', 'ethernet'), ('wl', 'wireless'), ('myr', 'myr'), + ('mgmt', 'mgmt'), ('tape', 'tape'), ('fe', 'fe') + ) + host = models.ForeignKey(Host, edit_inline=models.TABULAR, num_in_admin=2) + mac_addr = models.CharField(maxlength=32, core=True) + hdwr_type = models.CharField('type', maxlength=16, choices=TYPE_CHOICES, + radio_admin=True, blank=True) + + def __str__(self): + return self.mac_addr + + class Admin: + list_display = ('mac_addr', 'host') + search_fields = ['mac_addr'] + +class IP(models.Model): + interface = models.ForeignKey(Interface, + edit_inline=models.TABULAR, num_in_admin=1) + ip_addr = models.IPAddressField(core=True) + num = models.IntegerField() + + def __str__(self): + return self.ip_addr + + class Admin: + pass + + class Meta: + ordering = ('ip_addr', ) + +class MX(models.Model): + priority = models.IntegerField() + mx = models.CharField(maxlength=64, core=True) + + def __str__(self): + return (" ".join([str(self.priority), self.mx])) + + class Admin: + pass + +class Name(models.Model): + DNS_CHOICES = ( + ('global','global'),('internal','ANL internal'), + ('mcs-internal','MCS internal'),('private','private') + ) + ip = models.ForeignKey(IP, edit_inline=models.TABULAR, num_in_admin=1) + name = models.CharField(maxlength=64, core=True) + dns_view = models.CharField(maxlength=16, choices=DNS_CHOICES) + only = models.BooleanField(blank=True) + mxs = models.ManyToManyField(MX) + + def __str__(self): + return self.name + + class Admin: + pass + +class CName(models.Model): + name = models.ForeignKey(Name, edit_inline=models.TABULAR, num_in_admin=1) + cname = models.CharField(maxlength=64, core=True) + + def __str__(self): + return self.cname + + class Admin: + pass + +class Nameserver(models.Model): + name = models.CharField(maxlength=64) + + def __str__(self): + return self.name + + class Admin: + pass + +class Zone(models.Model): + zone = models.CharField(maxlength=64) + serial = models.IntegerField() + admin = models.CharField(maxlength=64) + primary_master = models.CharField(maxlength=64) + expire = models.IntegerField() + retry = models.IntegerField() + refresh = models.IntegerField() + ttl = models.IntegerField() + nameservers = models.ManyToManyField(Nameserver) + mxs = models.ManyToManyField(MX) + addresses = models.ManyToManyField(IP, blank=True) + aux = models.TextField(blank=True) + + def __str__(self): + return self.zone + + class Admin: + pass + diff --git a/src/lib/Server/Hostbase/hostbase/models.pyc b/src/lib/Server/Hostbase/hostbase/models.pyc new file mode 100644 index 000000000..f76cc7d76 Binary files /dev/null and b/src/lib/Server/Hostbase/hostbase/models.pyc differ diff --git a/src/lib/Server/Hostbase/hostbase/models.pyo b/src/lib/Server/Hostbase/hostbase/models.pyo new file mode 100644 index 000000000..02c6a5e3d Binary files /dev/null and b/src/lib/Server/Hostbase/hostbase/models.pyo differ diff --git a/src/lib/Server/Hostbase/hostbase/views.py b/src/lib/Server/Hostbase/hostbase/views.py new file mode 100644 index 000000000..1077cbede --- /dev/null +++ b/src/lib/Server/Hostbase/hostbase/views.py @@ -0,0 +1,654 @@ +# Create your views here. +"""Views.py +Contains all the views associated with the hostbase app +Also has does form validation +""" +__revision__ = 0.1 + +from django.http import HttpResponse, HttpResponseRedirect +from models import * +from Cheetah.Template import Template +from datetime import date +from django.db import connection +import re + +attribs = ['hostname', 'whatami', 'netgroup', 'security_class', 'support', + 'csi', 'printq', 'primary_user', 'administrator', 'location', + 'comments', 'status'] + +dispatch = {'mac_addr':'i.mac_addr LIKE \'%%%%%s%%%%\'', + 'ip_addr':'p.ip_addr LIKE \'%%%%%s%%%%\'', + 'name':'n.name LIKE \'%%%%%s%%%%\'', + 'cname':'c.cname LIKE \'%%%%%s%%%%\'', + 'mx':'m.mx LIKE \'%%%%%s%%%%\'', + 'dns_view':'n.dns_view = \'%s\'', + 'hdwr_type':'i.hdwr_type = \'%s\''} + + +## def netreg(request): +## if request.GET.has_key('sub'): +## failures = [] +## validated = True +## # do validation right in here +## macaddr_regex = re.compile('^[0-9abcdef]{2}(:[0-9abcdef]{2}){5}$') +## if not (request.POST['mac_addr'] and macaddr_regex.match(request.POST['mac_addr'])): +## validated = False +## userregex = re.compile('^[a-z0-9-_\.@]+$') +## if not (request.POST['email_address'] and userregex.match(request.POST['email_address'])): +## validated = False +## if not validated: +## t = Template(open('./hostbase/webtemplates/errors.html').read()) +## t.failures = validate(request, True) +## return HttpResponse(str(t)) +## return HttpResponseRedirect('/hostbase/%s/' % host.id) +## else: +## t = Template(open('./hostbase/webtemplates/netreg.html').read()) +## t.TYPE_CHOICES = Interface.TYPE_CHOICES +## t.failures = False +## return HttpResponse(str(t)) + + +def search(request): + """Search for hosts in the database + If more than one field is entered, logical AND is used + """ + if request.GET.has_key('sub'): + querystring = """SELECT DISTINCT h.hostname, h.id, h.status + FROM (((((hostbase_host h + INNER JOIN hostbase_interface i ON h.id = i.host_id) + INNER JOIN hostbase_ip p ON i.id = p.interface_id) + INNER JOIN hostbase_name n ON p.id = n.ip_id) + INNER JOIN hostbase_name_mxs x ON n.id = x.name_id) + INNER JOIN hostbase_mx m ON m.id = x.mx_id) + LEFT JOIN hostbase_cname c ON n.id = c.name_id + WHERE """ + + _and = False + for field in request.POST: + if request.POST[field] and field in dispatch: + if _and: + querystring += ' AND ' + querystring += dispatch[field] % request.POST[field] + _and = True + elif request.POST[field]: + if _and: + querystring += ' AND ' + querystring += "h.%s LIKE \'%%%%%s%%%%\'" % (field, request.POST[field]) + _and = True + + + if not _and: + cursor = connection.cursor() + cursor.execute("""SELECT hostname, id, status + FROM hostbase_host ORDER BY hostname""") + results = cursor.fetchall() + else: + querystring += " ORDER BY h.hostname" + cursor = connection.cursor() + cursor.execute(querystring) + results = cursor.fetchall() + + temp = Template(open('./hostbase/webtemplates/results.html').read()) + temp.hosts = results + return HttpResponse(str(temp)) + else: + temp = Template(open('./hostbase/webtemplates/search.html').read()) + temp.TYPE_CHOICES = Interface.TYPE_CHOICES + temp.DNS_CHOICES = Name.DNS_CHOICES + temp.yesno = [(1, 'yes'), (0, 'no')] + return HttpResponse(str(temp)) + +def look(request, host_id): + """Displays general host information""" + temp = Template(open('./hostbase/webtemplates/host.html').read()) + hostdata = gethostdata(host_id) + temp = fill(temp, hostdata) + return HttpResponse(str(temp)) + +def dns(request, host_id): + temp = Template(open('./hostbase/webtemplates/dns.html').read()) + hostdata = gethostdata(host_id, True) + temp = fill(temp, hostdata, True) + return HttpResponse(str(temp)) + +def edit(request, host_id): + """Edit general host information + Data is validated before being committed to the database""" + # fix bug when ip address changes, update the dns info appropriately + + if request.GET.has_key('sub'): + host = Host.objects.get(id=host_id) + interfaces = host.interface_set.all() + if not validate(request, False, host_id): + if (request.POST.has_key('outbound_smtp') + and not host.outbound_smtp or + not request.POST.has_key('outbound_smtp') + and host.outbound_smtp): + host.outbound_smtp = not host.outbound_smtp + if (request.POST.has_key('dhcp') and not host.dhcp or + not request.POST.has_key('dhcp') and host.dhcp): + host.dhcp = not host.dhcp + # add validation for attribs here + # likely use a helper fucntion + for attrib in attribs: + if request.POST.has_key(attrib): + host.__dict__[attrib] = request.POST[attrib] + if len(request.POST['expiration_date'].split("-")) == 3: + (year, month, day) = request.POST['expiration_date'].split("-") + host.expiration_date = date(int(year), int(month), int(day)) + for inter in interfaces: + ips = IP.objects.filter(interface=inter.id) + inter.mac_addr = request.POST['mac_addr%d' % inter.id] + oldtype = inter.hdwr_type + inter.hdwr_type = request.POST['hdwr_type%d' % inter.id] + oldname = "-".join([host.hostname.split(".", 1)[0], oldtype]) + oldname += "." + host.hostname.split(".", 1)[1] + newname = "-".join([host.hostname.split(".", 1)[0], + inter.hdwr_type]) + newname += "." + host.hostname.split(".", 1)[1] + for name in Name.objects.filter(name=oldname): + name.name = newname + name.save() + for ip in ips: + oldip = ip.ip_addr + ip.ip_addr = request.POST['ip_addr%d' % ip.id] + ip.save() + oldname = "-".join([host.hostname.split(".", 1)[0], + oldip.split(".")[2]]) + oldname += "." + host.hostname.split(".", 1)[1] + newname = "-".join([host.hostname.split(".", 1)[0], + ip.ip_addr.split(".")[2]]) + newname += "." + host.hostname.split(".", 1)[1] + if Name.objects.filter(name=oldname): + name = Name.objects.get(name=oldname, ip=ip.id) + name.name = newname + name.save() + if request.POST['%dip_addr' % inter.id]: + mx, created = MX.objects.get_or_create(priority=30, mx='mailgw.mcs.anl.gov') + if created: + mx.save() + new_ip = IP(interface=inter, num=len(ips), + ip_addr=request.POST['%dip_addr' % inter.id]) + new_ip.save() + new_name = "-".join([host.hostname.split(".")[0], + new_ip.ip_addr.split(".")[2]]) + new_name += "." + host.hostname.split(".", 1)[1] + name = Name(ip=new_ip, name=new_name, + dns_view='global', only=False) + name.save() + name.mxs.add(mx) + new_name = "-".join([host.hostname.split(".")[0], + inter.hdwr_type]) + new_name += "." + host.hostname.split(".", 1)[1] + name = Name(ip=new_ip, name=new_name, + dns_view='global', only=False) + name.save() + name.mxs.add(mx) + name = Name(ip=new_ip, name=host.hostname, + dns_view='global', only=False) + name.save() + name.mxs.add(mx) + inter.save() + if request.POST['mac_addr_new']: + new_inter = Interface(host=host, + mac_addr=request.POST['mac_addr_new'], + hdwr_type=request.POST['hdwr_type_new']) + new_inter.save() + if request.POST['mac_addr_new'] and request.POST['ip_addr_new']: + mx, created = MX.objects.get_or_create(priority=30, mx='mailgw.mcs.anl.gov') + if created: + mx.save() + new_ip = IP(interface=new_inter, num=0, + ip_addr=request.POST['ip_addr_new']) + new_ip.save() + new_name = "-".join([host.hostname.split(".")[0], + new_ip.ip_addr.split(".")[2]]) + new_name += "." + host.hostname.split(".", 1)[1] + name = Name(ip=new_ip, name=new_name, + dns_view='global', only=False) + name.save() + name.mxs.add(mx) + new_name = "-".join([host.hostname.split(".")[0], + new_inter.hdwr_type]) + new_name += "." + host.hostname.split(".", 1)[1] + name = Name(ip=new_ip, name=new_name, + dns_view='global', only=False) + name.save() + name.mxs.add(mx) + name = Name(ip=new_ip, name=host.hostname, + dns_view='global', only=False) + name.save() + name.mxs.add(mx) + if request.POST['ip_addr_new'] and not request.POST['mac_addr_new']: + mx, created = MX.objects.get_or_create(priority=30, mx='mailgw.mcs.anl.gov') + if created: + mx.save() + new_inter = Interface(host=host, mac_addr="", + hdwr_type=request.POST['hdwr_type_new']) + new_inter.save() + new_ip = IP(interface=new_inter, num=0, + ip_addr=request.POST['ip_addr_new']) + new_ip.save() + new_name = "-".join([host.hostname.split(".")[0], + new_ip.ip_addr.split(".")[2]]) + new_name += "." + host.hostname.split(".", 1)[1] + name = Name(ip=new_ip, name=new_name, + dns_view='global', only=False) + name.save() + new_name = "-".join([host.hostname.split(".")[0], + new_inter.hdwr_type]) + new_name += "." + host.hostname.split(".", 1)[1] + name = Name(ip=new_ip, name=new_name, + dns_view='global', only=False) + name.save() + name = Name(ip=new_ip, name=host.hostname, + dns_view='global', only=False) + name.save() + host.save() + return HttpResponseRedirect('/hostbase/%s/' % host.id) + else: + t = Template(open('./hostbase/webtemplates/errors.html').read()) + t.failures = validate(request, False, host_id) + return HttpResponse(str(t)) + # examine the check boxes for any changes + else: + t = Template(open('./hostbase/webtemplates/edit.html').read()) + hostdata = gethostdata(host_id) + t = fill(t, hostdata) + t.type_choices = Interface.TYPE_CHOICES + t.request = request + return HttpResponse(str(t)) + +def confirm(request, item, item_id, host_id, name_id=None): + """Asks if the user is sure he/she wants to remove an item""" + if request.GET.has_key('sub'): + if item == 'interface': + for ip in Interface.objects.get(id=item_id).ip_set.all(): + for name in ip.name_set.all(): + name.cname_set.all().delete() + ip.name_set.all().delete() + Interface.objects.get(id=item_id).ip_set.all().delete() + Interface.objects.get(id=item_id).delete() + elif item=='ip': + for name in IP.objects.get(id=item_id).name_set.all(): + name.cname_set.all().delete() + IP.objects.get(id=item_id).name_set.all().delete() + IP.objects.get(id=item_id).delete() + elif item=='cname': + CName.objects.get(id=item_id).delete() + elif item=='mx': + mx = MX.objects.get(id=item_id) + Name.objects.get(id=name_id).mxs.remove(mx) + elif item=='name': + Name.objects.get(id=item_id).cname_set.all().delete() + Name.objects.get(id=item_id).delete() + if item == 'cname' or item == 'mx' or item == 'name': + return HttpResponseRedirect('/hostbase/%s/dns' % host_id) + else: + return HttpResponseRedirect('/hostbase/%s/edit' % host_id) + else: + temp = Template(open('./hostbase/webtemplates/confirm.html').read()) + interface = None + ips = [] + names = {} + cnames = {} + mxs = {} + if item == 'interface': + interface = Interface.objects.get(id=item_id) + ips = interface.ip_set.all() + for ip in ips: + names[ip.id] = ip.name_set.all() + for name in names[ip.id]: + cnames[name.id] = name.cname_set.all() + mxs[name.id] = name.mx_set.all() + elif item=='ip': + ips = [IP.objects.get(id=item_id)] + names[ips[0].id] = ips[0].name_set.all() + for name in names[ips[0].id]: + cnames[name.id] = name.cname_set.all() + mxs[name.id] = name.mx_set.all() + elif item=='name': + names = [Name.objects.get(id=item_id)] + for name in names: + cnames[name.id] = name.cname_set.all() + mxs[name.id] = name.mxs.all() + elif item=='cname': + cnames = [CName.objects.get(id=item_id)] + elif item=='mx': + mxs = [MX.objects.get(id=item_id)] + temp.interface = interface + temp.ips = ips + temp.names = names + temp.cnames = cnames + temp.mxs = mxs + temp.id = item_id + temp.type = item + temp.host_id = host_id + return HttpResponse(str(temp)) + +def dnsedit(request, host_id): + """Edits specific DNS information + Data is validated before committed to the database""" + if request.GET.has_key('sub'): + hostdata = gethostdata(host_id, True) + for ip in hostdata['names']: + ipaddr = IP.objects.get(id=ip) + ipaddrstr = ipaddr.__str__() + for name in hostdata['cnames']: + for cname in hostdata['cnames'][name]: + cname.cname = request.POST['cname%d' % cname.id] + cname.save() + for name in hostdata['mxs']: + for mx in hostdata['mxs'][name]: + mx.priority = request.POST['priority%d' % mx.id] + mx.mx = request.POST['mx%d' % mx.id] + mx.save() + for name in hostdata['names'][ip]: + name.name = request.POST['name%d' % name.id] + if request.POST['%dcname' % name.id]: + cname = CName(name=name, + cname=request.POST['%dcname' % name.id]) + cname.save() + if (request.POST['%dpriority' % name.id] and + request.POST['%dmx' % name.id]): + mx, created = MX.objects.get_or_create(priority=request.POST['%dpriority' % name.id], + mx=request.POST['%dmx' % name.id]) + if created: + mx.save() + name.mxs.add(mx) + name.save() + if request.POST['%sname' % ipaddrstr]: + name = Name(ip=ipaddr, + dns_view=request.POST['%sdns_view' % ipaddrstr], + name=request.POST['%sname' % ipaddrstr], only=False) + name.save() + if request.POST['%scname' % ipaddrstr]: + cname = CName(name=name, + cname=request.POST['%scname' % ipaddrstr]) + cname.save() + if (request.POST['%smx' % ipaddrstr] and + request.POST['%spriority' % ipaddrstr]): + mx, created = MX.objects.get_or_create(priority=request.POST['%spriority' % ipaddrstr], + mx=request.POST['%smx' % ipaddrstr]) + if created: + mx.save() + name.mxs.add(mx) + return HttpResponseRedirect('/hostbase/%s/dns' % host_id) + else: + temp = Template(open('./hostbase/webtemplates/dnsedit.html').read()) + hostdata = gethostdata(host_id, True) + temp = fill(temp, hostdata, True) + temp.request = request + return HttpResponse(str(temp)) + +def gethostdata(host_id, dnsdata=False): + """Grabs the necessary data about a host + Replaces a lot of repeated code""" + hostdata = {} + hostdata['ips'] = {} + hostdata['names'] = {} + hostdata['cnames'] = {} + hostdata['mxs'] = {} + hostdata['host'] = Host.objects.get(id=host_id) + hostdata['interfaces'] = hostdata['host'].interface_set.all() + for interface in hostdata['interfaces']: + hostdata['ips'][interface.id] = interface.ip_set.all() + if dnsdata: + for ip in hostdata['ips'][interface.id]: + hostdata['names'][ip.id] = ip.name_set.all() + for name in hostdata['names'][ip.id]: + hostdata['cnames'][name.id] = name.cname_set.all() + hostdata['mxs'][name.id] = name.mxs.all() + return hostdata + +def fill(template, hostdata, dnsdata=False): + """Fills a generic template + Replaces a lot of repeated code""" + if dnsdata: + template.names = hostdata['names'] + template.cnames = hostdata['cnames'] + template.mxs = hostdata['mxs'] + template.host = hostdata['host'] + template.interfaces = hostdata['interfaces'] + template.ips = hostdata['ips'] + return template + + +def new(request): + """Function for creating a new host in hostbase + Data is validated before committed to the database""" + if request.GET.has_key('sub'): + if not validate(request, True): + host = Host() + # this is the stuff that validate() should take care of + # examine the check boxes for any changes + host.outbound_smtp = request.POST.has_key('outbound_smtp') + host.dhcp = request.POST.has_key('dhcp') + for attrib in attribs: + if request.POST.has_key(attrib): + host.__dict__[attrib] = request.POST[attrib] + host.status = 'active' + host.save() + else: + temp = Template(open('./hostbase/webtemplates/errors.html').read()) + temp.failures = validate(request, True) + return HttpResponse(str(temp)) + if request.POST['mac_addr_new']: + new_inter = Interface(host=host, + mac_addr=request.POST['mac_addr_new'], + hdwr_type=request.POST['hdwr_type_new']) + new_inter.save() + if request.POST['mac_addr_new'] and request.POST['ip_addr_new']: + new_ip = IP(interface=new_inter, + num=0, ip_addr=request.POST['ip_addr_new']) + new_ip.save() + new_name = "-".join([host.hostname.split(".")[0], + new_ip.ip_addr.split(".")[2]]) + new_name += "." + host.hostname.split(".", 1)[1] + name = Name(ip=new_ip, name=new_name, dns_view='global', only=False) + name.save() + mx = MX(name=name, priority=30, mx='mailgw.mcs.anl.gov') + mx.save() + new_name = "-".join([host.hostname.split(".")[0], + new_inter.hdwr_type]) + new_name += "." + host.hostname.split(".", 1)[1] + name = Name(ip=new_ip, name=new_name, + dns_view='global', only=False) + name.save() + mx = MX(name=name, priority=30, mx='mailgw.mcs.anl.gov') + mx.save() + name = Name(ip=new_ip, name=host.hostname, + dns_view='global', only=False) + name.save() + mx = MX(name=name, priority=30, mx='mailgw.mcs.anl.gov') + mx.save() + if request.POST['ip_addr_new1'] and not request.POST['mac_addr_new1']: + new_inter = Interface(host=host, + mac_addr="", + hdwr_type=request.POST['hdwr_type_new1']) + new_inter.save() + new_ip = IP(interface=new_inter, num=0, + ip_addr=request.POST['ip_addr_new1']) + new_ip.save() + new_name = "-".join([host.hostname.split(".")[0], + new_ip.ip_addr.split(".")[2]]) + new_name += "." + host.hostname.split(".", 1)[1] + name = Name(ip=new_ip, name=new_name, + dns_view='global', only=False) + name.save() + mx = MX(name=name, priority=30, mx='mailgw.mcs.anl.gov') + mx.save() + new_name = "-".join([host.hostname.split(".")[0], + new_inter.hdwr_type]) + new_name += "." + host.hostname.split(".", 1)[1] + name = Name(ip=new_ip, name=new_name, + dns_view='global', only=False) + name.save() + mx = MX(name=name, priority=30, mx='mailgw.mcs.anl.gov') + mx.save() + name = Name(ip=new_ip, name=host.hostname, + dns_view='global', only=False) + name.save() + mx = MX(name=name, priority=30, mx='mailgw.mcs.anl.gov') + mx.save() + if request.POST['mac_addr_new2']: + new_inter = Interface(host=host, + mac_addr=request.POST['mac_addr_new2'], + hdwr_type=request.POST['hdwr_addr_new2']) + new_inter.save() + if request.POST['mac_addr_new2'] and request.POST['ip_addr_new2']: + new_ip = IP(interface=new_inter, num=0, + ip_addr=request.POST['ip_addr_new2']) + new_ip.save() + new_name = "-".join([host.hostname.split(".")[0], + new_ip.ip_addr.split(".")[2]]) + new_name += "." + host.hostname.split(".", 1)[1] + name = Name(ip=new_ip, name=new_name, + dns_view='global', only=False) + name.save() + mx = MX(name=name, priority=30, mx='mailgw.mcs.anl.gov') + mx.save() + new_name = "-".join([host.hostname.split(".")[0], + new_inter.hdwr_type]) + new_name += "." + host.hostname.split(".", 1)[1] + name = Name(ip=new_ip, name=new_name, + dns_view='global', only=False) + name.save() + mx = MX(name=name, priority=30, mx='mailgw.mcs.anl.gov') + mx.save() + name = Name(ip=new_ip, name=host.hostname, + dns_view='global', only=False) + name.save() + mx = MX(name=name, priority=30, mx='mailgw.mcs.anl.gov') + mx.save() + if request.POST['ip_addr_new2'] and not request.POST['mac_addr_new2']: + new_inter = Interface(host=host, + mac_addr="", + hdwr_type=request.POST['hdwr_type_new2']) + new_inter.save() + new_ip = IP(interface=new_inter, num=0, + ip_addr=request.POST['ip_addr_new2']) + new_ip.save() + new_name = "-".join([host.hostname.split(".")[0], + new_ip.ip_addr.split(".")[2]]) + new_name += "." + host.hostname.split(".", 1)[1] + name = Name(ip=new_ip, name=new_name, + dns_view='global', only=False) + name.save() + mx = MX(name=name, priority=30, mx='mailgw.mcs.anl.gov') + mx.save() + new_name = "-".join([host.hostname.split(".")[0], + new_inter.hdwr_type]) + new_name += "." + host.hostname.split(".", 1)[1] + name = Name(ip=new_ip, name=new_name, + dns_view='global', only=False) + name.save() + mx = MX(name=name, priority=30, mx='mailgw.mcs.anl.gov') + mx.save() + name = Name(ip=new_ip, name=host.hostname, + dns_view='global', only=False) + name.save() + mx = MX(name=name, priority=30, mx='mailgw.mcs.anl.gov') + mx.save() + host.save() + return HttpResponseRedirect('/hostbase/%s/' % host.id) + else: + temp = Template(open('./hostbase/webtemplates/new.html').read()) + temp.TYPE_CHOICES = Interface.TYPE_CHOICES + temp.NETGROUP_CHOICES = Host.NETGROUP_CHOICES + temp.CLASS_CHOICES = Host.CLASS_CHOICES + temp.SUPPORT_CHOICES = Host.SUPPORT_CHOICES + temp.failures = False + return HttpResponse(str(temp)) + +def validate(request, new=False, host_id=None): + """Function for checking form data""" + failures = [] + dateregex = re.compile('^[0-9]{4}-[0-9]{2}-[0-9]{2}$') + if (request.POST['expiration_date'] + and dateregex.match(request.POST['expiration_date'])): + try: + (year, month, day) = request.POST['expiration_date'].split("-") + date(int(year), int(month), int(day)) + except (ValueError): + failures.append('expiration_date') + elif request.POST['expiration_date']: + failures.append('expiration_date') + + hostregex = re.compile('^[a-z0-9-_]+(\.[a-z0-9-_]+)+$') + if not (request.POST['hostname'] + and hostregex.match(request.POST['hostname'])): + failures.append('hostname') + + printregex = re.compile('^[a-z0-9-]+$') + if not printregex.match(request.POST['printq']) and request.POST['printq']: + failures.append('printq') + + userregex = re.compile('^[a-z0-9-_\.@]+$') + if not userregex.match(request.POST['primary_user']): + failures.append('primary_user') + + if (not userregex.match(request.POST['administrator']) + and request.POST['administrator']): + failures.append('administrator') + + locationregex = re.compile('^[0-9]{3}-[a-z][0-9]{3}$|none|bmr|cave|dsl|evl|mobile|offsite|mural|activespaces') + if not (request.POST['location'] + and locationregex.match(request.POST['location'])): + failures.append('location') + + if new: + macaddr_regex = re.compile('^[0-9abcdef]{2}(:[0-9abcdef]{2}){5}$') + if (not macaddr_regex.match(request.POST['mac_addr_new']) + and request.POST['mac_addr_new']): + failures.append('mac_addr (#1)') + if ((request.POST['mac_addr_new'] or request.POST['ip_addr_new']) and + not request.has_key('hdwr_type_new')): + failures.append('hdwr_type (#1)') + if ((request.POST['mac_addr_new2'] or request.POST['ip_addr_new']) and + not request.has_key('hdwr_type_new2')): + failures.append('hdwr_type (#2)') + + if (not macaddr_regex.match(request.POST['mac_addr_new2']) + and request.POST['mac_addr_new2']): + failures.append('mac_addr (#2)') + + ipaddr_regex = re.compile('^[0-9]{1,3}(\.[0-9]{1,3}){3}$') + if (not ipaddr_regex.match(request.POST['ip_addr_new']) + and request.POST['ip_addr_new']): + failures.append('ip_addr (#1)') + if (not ipaddr_regex.match(request.POST['ip_addr_new2']) + and request.POST['ip_addr_new2']): + failures.append('ip_addr (#2)') + + [failures.append('ip_addr (#1)') for number in + request.POST['ip_addr_new'].split(".") + if number.isdigit() and int(number) > 255 + and 'ip_addr (#1)' not in failures] + [failures.append('ip_addr (#2)') for number in + request.POST['ip_addr_new2'].split(".") + if number.isdigit() and int(number) > 255 + and 'ip_addr (#2)' not in failures] + + elif host_id: + macaddr_regex = re.compile('^[0-9abcdef]{2}(:[0-9abcdef]{2}){5}$') + ipaddr_regex = re.compile('^[0-9]{1,3}(\.[0-9]{1,3}){3}$') + interfaces = Interface.objects.filter(host=host_id) + for interface in interfaces: + if (not macaddr_regex.match(request.POST['mac_addr%d' % interface.id]) + and request.POST['mac_addr%d' % interface.id]): + failures.append('mac_addr (%s)' % request.POST['mac_addr%d' % interface.id]) + for ip in interface.ip_set.all(): + if not ipaddr_regex.match(request.POST['ip_addr%d' % ip.id]): + failures.append('ip_addr (%s)' % request.POST['ip_addr%d' % ip.id]) + [failures.append('ip_addr (%s)' % request.POST['ip_addr%d' % ip.id]) + for number in request.POST['ip_addr%d' % ip.id].split(".") + if (number.isdigit() and int(number) > 255 and + 'ip_addr (%s)' % request.POST['ip_addr%d' % ip.id] not in failures)] + + + + + if not failures: + return 0 + return failures diff --git a/src/lib/Server/Hostbase/hostbase/views.pyc b/src/lib/Server/Hostbase/hostbase/views.pyc new file mode 100644 index 000000000..24619902c Binary files /dev/null and b/src/lib/Server/Hostbase/hostbase/views.pyc differ diff --git a/src/lib/Server/Hostbase/hostbase/views.pyo b/src/lib/Server/Hostbase/hostbase/views.pyo new file mode 100644 index 000000000..04623e621 Binary files /dev/null and b/src/lib/Server/Hostbase/hostbase/views.pyo differ diff --git a/src/lib/Server/Hostbase/hostbase/webtemplates/confirm.html b/src/lib/Server/Hostbase/hostbase/webtemplates/confirm.html new file mode 100644 index 000000000..96ed4ed4f --- /dev/null +++ b/src/lib/Server/Hostbase/hostbase/webtemplates/confirm.html @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Argonne National Laboratory
+ Mathematics + and Computer Science
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
MCS + Home > + +
+ + + +
+
+

Are you sure?

+Are you sure you want to remove these items? + +#if $interface +
    +
  • interface: $interface.__str__
  • +#end if + + +#if $ips +
      +#for $ip in $ips +
    • ip: $ip.__str__
    • +
        +#for $name in $names[$ip.id] +
      • name: $name.__str__
      • +
          +#for $cname in $cnames[$name.id] +
        • cname: $cname.__str__
        • +#end for +
        +
          +#for $mx in $mxs[$name.id] +
        • mx: $mx.priority $mx.__str__
        • +#end for +
        +#end for +
      +#end for +
    +#end if + +#if $names and not $ips +
      +#for $name in $names +
    • name: $name.__str__
    • +
        +#for $cname in $cnames[$name.id] +
      • cname: $cname.__str__
      • +#end for +
      +
        +#for $mx in $mxs[$name.id] +
      • mx: $mx.priority $mx.__str__
      • +#end for +
      +#end for +
    +#end if + +#if $cnames and not $names +
      +#for $cname in $cnames +
    • cname: $cname.__str__
    • +#end for +
    +#end if + +#if $mxs and not $names +
      +#for $mx in $mxs +
    • mx: $mx.priority $mx.__str__
    • +#end for +
    +#end if + +#if $interface +
+#end if + + + +
+
+ + + + + + + + + +

+ + + + + + +
U.S. Department of EnergyThe University of ChicagoOffice of Science - Department of Energy
+ + + +
Privacy & Security Notice | Contact Us
+ + + diff --git a/src/lib/Server/Hostbase/hostbase/webtemplates/dns.html b/src/lib/Server/Hostbase/hostbase/webtemplates/dns.html new file mode 100644 index 000000000..a937fb833 --- /dev/null +++ b/src/lib/Server/Hostbase/hostbase/webtemplates/dns.html @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Argonne National Laboratory
+ Mathematics + and Computer Science
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
MCS + Home > + +
+ + + +
+DNS Information for host "$host.hostname" + + #for $interface in $interfaces + #for $ip in $ips[$interface.id] +
  • ip_addr: $ip.ip_addr
  • + #for $name in $names[$ip.id] +
    • name: $name.name
      • + #for $cname in $cnames[$name.id] +
      • cname: $cname.cname
      • + #end for + #for $mx in $mxs[$name.id] +
      • mx: $mx.priority $mx.mx
      • + #end for +
    + #end for +
+ #end for + #end for +
+ + + + + + + + + +

+ + + + + + +
U.S. Department of EnergyThe University of ChicagoOffice of Science - Department of Energy
+ + + +
Privacy & Security Notice | Contact Us
+ + + diff --git a/src/lib/Server/Hostbase/hostbase/webtemplates/dnsedit.html b/src/lib/Server/Hostbase/hostbase/webtemplates/dnsedit.html new file mode 100644 index 000000000..9065153da --- /dev/null +++ b/src/lib/Server/Hostbase/hostbase/webtemplates/dnsedit.html @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Argonne National Laboratory
+ Mathematics + and Computer Science
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
MCS + Home > + +
+ + + +
+ +#set $cont = 1 + +#if $request.GET.has_key('sub') +ok, submitted +#end if + + +#if $cont +
+ +Edit DNS information below for individual IP addresses. + + + + + #for $interface in $interfaces + + + + + + + #for $ip in $ips[$interface.id] + + + #for $name in $names[$ip.id] + + + #for $cname in $cnames[$name.id] + + + #end for + + + #for $mx in $mxs[$name.id] + + + #end for + + + #end for + + + + + + + + + #end for + #end for +

interface type $interface.hdwr_type
mac_addr $interface.mac_addr


ip_addr$ip.ip_addr
name(dns) + + remove
cname + remove
cname
mx + + remove
mx +
name +
cname
mx +


+ +

+

+#end if +
+ + + + + + + + + +

+ + + + + + +
U.S. Department of EnergyThe University of ChicagoOffice of Science - Department of Energy
+ + + +
Privacy & Security Notice | Contact Us
+ + + diff --git a/src/lib/Server/Hostbase/hostbase/webtemplates/edit.html b/src/lib/Server/Hostbase/hostbase/webtemplates/edit.html new file mode 100644 index 000000000..71ca621a1 --- /dev/null +++ b/src/lib/Server/Hostbase/hostbase/webtemplates/edit.html @@ -0,0 +1,314 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Argonne National Laboratory
+ Mathematics + and Computer Science
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
MCS + Home > + +
+ + + +
+ + + + +#set $cont = 1 + +#if $request.GET.has_key('sub') +ok, submitted +#end if + +#if $cont +
+ + + + + + + + + + + + + + + + + + + + + + #else + + #end if + + + #else + + #end if + + + + + + + + + #for $interface in $interfaces + + + + #for $ip in $ips[$interface.id] + + + #end for + + + +
hostname
whatami
netgroup + +
class +
support +
csi
printq
dhcp + #if $host.dhcp +
outbound_smtp + #if $host.outbound_smtp +
primary_user
administrator
location
expiration_date YYYY-MM-DD

Interface +

+ #for $choice in $interface.TYPE_CHOICES + #if $interface.hdwr_type == $choice[0] + $choice[1] + #else + $choice[1] + #end if + #end for +
mac_addr + remove +
ip_addr + + remove +
+
+ + + + + + +
ip_addr
+
+ Add a New IP Address + + + + + #end for + + + + +
+
+ + + + + + + + + +

Interface

+ #for $choice in $type_choices + $choice[1] + #end for +
mac_addr
ip_addr
+
+Add a New Interface + + + + + + + + + +
comments
+edit detailed DNS information for this host +
+this host is +
+last update on $host.last
+

+

+#end if +
+ + + + + + + + + +

+ + + + + + +
U.S. Department of EnergyThe University of ChicagoOffice of Science - Department of Energy
+ + + +
Privacy & Security Notice | Contact Us
+ + + diff --git a/src/lib/Server/Hostbase/hostbase/webtemplates/errors.html b/src/lib/Server/Hostbase/hostbase/webtemplates/errors.html new file mode 100644 index 000000000..83f5cd014 --- /dev/null +++ b/src/lib/Server/Hostbase/hostbase/webtemplates/errors.html @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Argonne National Laboratory
+ Mathematics + and Computer Science
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
MCS + Home > + +
+ + + +
+#if $failures +There were errors in the following fields

+#for $failure in $failures + +$failure
+ +#end for +#end if +
+Press the back button on your browser and edit those field(s) +
+ + + + + + + + + +

+ + + + + + +
U.S. Department of EnergyThe University of ChicagoOffice of Science - Department of Energy
+ + + +
Privacy & Security Notice | Contact Us
+ + + + diff --git a/src/lib/Server/Hostbase/hostbase/webtemplates/host.html b/src/lib/Server/Hostbase/hostbase/webtemplates/host.html new file mode 100644 index 000000000..a9ec9014b --- /dev/null +++ b/src/lib/Server/Hostbase/hostbase/webtemplates/host.html @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Argonne National Laboratory
+ Mathematics + and Computer Science
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
MCS + Home > + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + #if $host.dhcp + + #else + + #end if + + #if $host.outbound_smtp + + #else + + #end if + + + + + + + + + #for $interface in $interfaces + + #if $interface.hdwr_type != 'no' + + #end if + + + #for $ip in $ips[$interface.id] + + + #end for + #end for + + + +
hostname $host.hostname
whatami $host.whatami
netgroup $host.netgroup
class $host.security_class
support $host.support
csi $host.csi
printq $host.printq
dhcp y
n
outbound_smtp y
n
primary_user $host.primary_user
administrator $host.administrator
location $host.location
expiration_date $host.expiration_date

Interface

$interface.hdwr_type
mac_addr $interface.mac_addr
ip_addr $ip.ip_addr
comments $host.comments
+see detailed DNS information for this host +

+this host is $host.status
+last update on $host.last
+
+ + + + + + + + + +

+ + + + + + +
U.S. Department of EnergyThe University of ChicagoOffice of Science - Department of Energy
+ + + +
Privacy & Security Notice | Contact Us
+ + + diff --git a/src/lib/Server/Hostbase/hostbase/webtemplates/new.html b/src/lib/Server/Hostbase/hostbase/webtemplates/new.html new file mode 100644 index 000000000..bb00e57b0 --- /dev/null +++ b/src/lib/Server/Hostbase/hostbase/webtemplates/new.html @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Argonne National Laboratory
+ Mathematics + and Computer Science
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
MCS + Home > + +
+ + + +
+ Enter new host information + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
hostname
whatami
netgroup + +
class +
support +
csi
printq
dhcp +
outbound_smtp +
primary_user
administrator
location
expiration_date YYYY-MM-DD

Interface

+ #for $choice in $TYPE_CHOICES + $choice[1] + #end for +
mac_addr
ip_addr

Interface

+ #for $choice in $TYPE_CHOICES + $choice[1] + #end for +
mac_addr
ip_addr
comments
+
+

+

+
+ + + + + + + + + +

+ + + + + + +
U.S. Department of EnergyThe University of ChicagoOffice of Science - Department of Energy
+ + + +
Privacy & Security Notice | Contact Us
+ + + diff --git a/src/lib/Server/Hostbase/hostbase/webtemplates/results.html b/src/lib/Server/Hostbase/hostbase/webtemplates/results.html new file mode 100644 index 000000000..efae1143f --- /dev/null +++ b/src/lib/Server/Hostbase/hostbase/webtemplates/results.html @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Argonne National Laboratory
+ Mathematics + and Computer Science
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
MCS + Home > + +
+ + + +
+#if $hosts + + + + + + + + + + #for $host in $hosts + + #if $host[2] + + #else + + #end if + + + + #end for +
hostname status
$host[0] active inactive view edit
+#else +No hosts matched your query
+Click the back button on your browser to edit your search +#end if +
+ + + + + + + + + +

+ + + + + + +
U.S. Department of EnergyThe University of ChicagoOffice of Science - Department of Energy
+ + + +
Privacy & Security Notice | Contact Us
+ + + diff --git a/src/lib/Server/Hostbase/hostbase/webtemplates/search.html b/src/lib/Server/Hostbase/hostbase/webtemplates/search.html new file mode 100644 index 000000000..29a684b1a --- /dev/null +++ b/src/lib/Server/Hostbase/hostbase/webtemplates/search.html @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Argonne National Laboratory + Mathematics + and Computer Science
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
MCS + Home > + +
+ + + +
+

Welcome to the hostbase database!

+Find hosts using one or more of the searchable fields below.
+#*...or go to this + page to enter hostinfo-like queries

*# +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
hostname
whatami
netgroup
class
support
csi
printq
dhcp + #for $choice in $yesno + $choice[1] + #end for +
outbound_smtp + #for $choice in $yesno + $choice[1] + #end for +
primary_user
administrator
location
expiration_date YYYY-MM-DD

Interface

+ #for $choice in $TYPE_CHOICES + $choice[1] + #end for +
mac_addr
ip_addr
name
dns_view + #for $choice in $DNS_CHOICES + $choice[1] + #end for +
cname
mx
+

+ +

+
+ + + + + + + + + +

+ + + + + + +
U.S. Department of EnergyThe University of ChicagoOffice of Science - Department of Energy
+ + + +
Privacy & Security Notice | Contact Us
+ + -- cgit v1.2.3-1-g7c22