Univention Bugzilla – Attachment 5601 Details for
Bug 33258
IP address of additional network interfaces is not correctly written into LDAP
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix same network addresses
33258_uss-networks.diff (text/plain), 4.58 KB, created by
Philipp Hahn
on 2013-11-12 09:51:59 CET
(
hide
)
Description:
Fix same network addresses
Filename:
MIME Type:
Creator:
Philipp Hahn
Created:
2013-11-12 09:51:59 CET
Size:
4.58 KB
patch
obsolete
>diff --git a/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/netconf/__init__.py b/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/netconf/__init__.py >index c09c226..e222e92 100644 >--- a/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/netconf/__init__.py >+++ b/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/netconf/__init__.py >@@ -73,19 +73,19 @@ class ChangeSet(object): > > @property > def old_ipv4s(self): >- return set(iface.ipv4_address() for _name, iface in self.old_interfaces.ipv4_interfaces) >+ return [iface.ipv4_address() for _name, iface in self.old_interfaces.ipv4_interfaces] > > @property > def new_ipv4s(self): >- return set(iface.ipv4_address() for _name, iface in self.new_interfaces.ipv4_interfaces) >+ return [iface.ipv4_address() for _name, iface in self.new_interfaces.ipv4_interfaces] > > @property > def old_ipv6s(self): >- return set(iface.ipv6_address(name) for iface, name in self.old_interfaces.ipv6_interfaces) >+ return [iface.ipv6_address(name) for iface, name in self.old_interfaces.ipv6_interfaces] > > @property > def new_ipv6s(self): >- return set(iface.ipv6_address(name) for iface, name in self.new_interfaces.ipv6_interfaces) >+ return [iface.ipv6_address(name) for iface, name in self.new_interfaces.ipv6_interfaces] > > > class SkipPhase(Exception): >diff --git a/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/netconf/conditions.py b/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/netconf/conditions.py >index 16a6664..c2d6c88 100644 >--- a/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/netconf/conditions.py >+++ b/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/netconf/conditions.py >@@ -48,7 +48,7 @@ class AddressChange(Phase): > new_ipv4s = set((_.ip for _ in self.changeset.new_ipv4s)) > old_ipv6s = set((_.ip for _ in self.changeset.old_ipv6s)) > new_ipv6s = set((_.ip for _ in self.changeset.new_ipv6s)) >- if (old_ipv4s == new_ipv4s and old_ipv6s == new_ipv6s): >+ if old_ipv4s == new_ipv4s and old_ipv6s == new_ipv6s: > raise SkipPhase("No address change") > > >diff --git a/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/netconf/modules/LdapDns.py b/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/netconf/modules/LdapDns.py >index 910c555..0ff7134 100644 >--- a/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/netconf/modules/LdapDns.py >+++ b/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/netconf/modules/LdapDns.py >@@ -15,7 +15,7 @@ class PhaseLdapDns(AddressMap, Ldap, Executable): > self._create_reverse_dns_ipv6() > > def _create_reverse_dns_ipv4(self): >- for ipv4 in self.changeset.new_ipv4s - self.changeset.old_ipv4s: >+ for ipv4 in set(self.changeset.new_ipv4s) - set(self.changeset.old_ipv4s): > self.call([ > self.executable, > "--binddn", self.binddn, >@@ -36,7 +36,7 @@ class PhaseLdapDns(AddressMap, Ldap, Executable): > ]) > > def _create_reverse_dns_ipv6(self): >- for ipv6 in self.changeset.new_ipv6s - self.changeset.old_ipv6s: >+ for ipv6 in set(self.changeset.new_ipv6s) - set(self.changeset.old_ipv6s): > self.call([ > self.executable, > "--binddn", self.binddn, >diff --git a/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/netconf/modules/LdapSelf.py b/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/netconf/modules/LdapSelf.py >index 4807cf9..d13622c 100644 >--- a/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/netconf/modules/LdapSelf.py >+++ b/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/netconf/modules/LdapSelf.py >@@ -90,7 +90,8 @@ class PhaseLdapSelf(AddressMap, LdapChange, Executable): > computer.modify() > > def _update_ips(self, computer): >- computer.info["ip"] = [str(addr.ip) for addr in self.changeset.new_ipv4s | self.changeset.new_ipv6s] >+ all_addr = [str(addr.ip) for addr in (self.changeset.new_ipv4s + self.changeset.new_ipv6s)] >+ computer.info["ip"] = list(set(all_addr)) > > def _update_reverse_zones(self, computer): > reverse_module = modules.get("dns/reverse_zone") >@@ -102,7 +103,7 @@ class PhaseLdapSelf(AddressMap, LdapChange, Executable): > computer.info["dnsEntryZoneReverse"] = [ > [zone.dn, str(addr.ip)] > for zone in reverse_zones >- for addr in self.changeset.new_ipv4s | self.changeset.new_ipv6s >+ for addr in (self.changeset.new_ipv4s + self.changeset.new_ipv6s) > if addr.ip in convert_udm_subnet_to_network(zone.info["subnet"]) > ] >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 33258
: 5601