diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2008-09-24 11:59:44 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2008-09-24 11:59:44 -0400 |
commit | c26ed212309485281670e6c909bc0a719533c201 (patch) | |
tree | cc7842547380c122561d6883a77e1b7501bb98a8 /cobbler/webui/CobblerWeb.py | |
parent | 8b6fc47792a7b769eb6779ee5cd3bb095fec5ff2 (diff) | |
download | cobbler-c26ed212309485281670e6c909bc0a719533c201.tar.gz cobbler-c26ed212309485281670e6c909bc0a719533c201.tar.xz cobbler-c26ed212309485281670e6c909bc0a719533c201.zip |
Applied jeckersb's patch to teach cobbler about an infinite number of interfaces, as a consequence
the system edit page of the web app is not functional, so we need to rewrite that part.
Diffstat (limited to 'cobbler/webui/CobblerWeb.py')
-rw-r--r-- | cobbler/webui/CobblerWeb.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cobbler/webui/CobblerWeb.py b/cobbler/webui/CobblerWeb.py index 800bce85..764afebf 100644 --- a/cobbler/webui/CobblerWeb.py +++ b/cobbler/webui/CobblerWeb.py @@ -383,8 +383,10 @@ class CobblerWeb(object): self.remote.modify_system(system, 'virt-path', virtpath, self.token) - for x in range(0,7): - interface = "intf%s" % x + interfaces = args.get("interfaces","") + interfaces = interfaces.split(",") + + for x in interfaces: macaddress = args.get("macaddress-%s" % interface, "") ipaddress = args.get("ipaddress-%s" % interface, "") hostname = args.get("hostname-%s" % interface, "") @@ -396,7 +398,7 @@ class CobblerWeb(object): if not (macaddress != "" or ipaddress != "" or hostname != "" or virtbridge != "" or dhcptag != "" or subnet != "" or gateway != ""): # if we have nothing to modify, request that we remove the interface unless it's the # the first interface, in which case it is NOT removeable - if not interface == "intf0": + if not interface == interfaces[0]: self.remote.modify_system(system,'delete-interface', interface, self.token) else: # it looks like we have at least one value to submit, just send the ones over that are |