summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Hostbase/hostbase/views.py
diff options
context:
space:
mode:
authorKen Raffenetti <raffenet@mcs.anl.gov>2006-11-17 16:51:38 +0000
committerKen Raffenetti <raffenet@mcs.anl.gov>2006-11-17 16:51:38 +0000
commit2493bbac17bf610a2d87cdacef6dcd6ec3a18af5 (patch)
tree74c9314feb10b664df9fe89e1d86fb78a8f91122 /src/lib/Server/Hostbase/hostbase/views.py
parent8a62cf766f44fa19fd3d5263e6e283a0b9db72b1 (diff)
downloadbcfg2-2493bbac17bf610a2d87cdacef6dcd6ec3a18af5.tar.gz
bcfg2-2493bbac17bf610a2d87cdacef6dcd6ec3a18af5.tar.bz2
bcfg2-2493bbac17bf610a2d87cdacef6dcd6ec3a18af5.zip
removed 'num' attribute from IP model
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2503 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Hostbase/hostbase/views.py')
-rw-r--r--src/lib/Server/Hostbase/hostbase/views.py21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/lib/Server/Hostbase/hostbase/views.py b/src/lib/Server/Hostbase/hostbase/views.py
index 6349f88d7..241c01296 100644
--- a/src/lib/Server/Hostbase/hostbase/views.py
+++ b/src/lib/Server/Hostbase/hostbase/views.py
@@ -218,8 +218,7 @@ def edit(request, host_id):
mx, created = MX.objects.get_or_create(priority=settings.PRIORITY, mx=settings.DEFAULT_MX)
if created:
mx.save()
- new_ip = IP(interface=inter, num=len(ips),
- ip_addr=request.POST['%dip_addr' % inter.id])
+ new_ip = IP(interface=inter, ip_addr=request.POST['%dip_addr' % inter.id])
new_ip.save()
new_name = "-".join([host.hostname.split(".")[0],
new_ip.ip_addr.split(".")[2]])
@@ -250,8 +249,7 @@ def edit(request, host_id):
mx, created = MX.objects.get_or_create(priority=settings.PRIORITY, mx=settings.DEFAULT_MX)
if created:
mx.save()
- new_ip = IP(interface=new_inter, num=0,
- ip_addr=request.POST['ip_addr_new'])
+ new_ip = IP(interface=new_inter, ip_addr=request.POST['ip_addr_new'])
new_ip.save()
new_name = "-".join([host.hostname.split(".")[0],
new_ip.ip_addr.split(".")[2]])
@@ -279,8 +277,7 @@ def edit(request, host_id):
hdwr_type=request.POST['hdwr_type_new'],
dhcp=False)
new_inter.save()
- new_ip = IP(interface=new_inter, num=0,
- ip_addr=request.POST['ip_addr_new'])
+ new_ip = IP(interface=new_inter, ip_addr=request.POST['ip_addr_new'])
new_ip.save()
new_name = "-".join([host.hostname.split(".")[0],
new_ip.ip_addr.split(".")[2]])
@@ -519,8 +516,7 @@ def new(request):
dhcp=request.POST.has_key('dhcp_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 = IP(interface=new_inter, ip_addr=request.POST['ip_addr_new'])
new_ip.save()
mx, created = MX.objects.get_or_create(priority=settings.PRIORITY, mx=settings.DEFAULT_MX)
if created:
@@ -548,8 +544,7 @@ def new(request):
hdwr_type=request.POST['hdwr_type_new1'],
dhcp=False)
new_inter.save()
- new_ip = IP(interface=new_inter, num=0,
- ip_addr=request.POST['ip_addr_new1'])
+ new_ip = IP(interface=new_inter, ip_addr=request.POST['ip_addr_new1'])
new_ip.save()
mx, created = MX.objects.get_or_create(priority=settings.PRIORITY, mx=settings.DEFAULT_MX)
if created:
@@ -579,8 +574,7 @@ def new(request):
dhcp=request.POST.has_key('dhcp_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 = IP(interface=new_inter, ip_addr=request.POST['ip_addr_new2'])
new_ip.save()
mx, created = MX.objects.get_or_create(priority=settings.PRIORITY, mx=settings.DEFAULT_MX)
if created:
@@ -609,8 +603,7 @@ def new(request):
hdwr_type=request.POST['hdwr_type_new2'],
dhcp=False)
new_inter.save()
- new_ip = IP(interface=new_inter, num=0,
- ip_addr=request.POST['ip_addr_new2'])
+ new_ip = IP(interface=new_inter, ip_addr=request.POST['ip_addr_new2'])
new_ip.save()
mx, created = MX.objects.get_or_create(priority=settings.PRIORITY, mx=settings.DEFAULT_MX)
if created: