Alon Bar-Lev has posted comments on this change. Change subject: packaging: setup: correctly verify local IPv6 addresses ......................................................................
Patch Set 1: Code-Review-1 (2 comments) this code will work also if only ipv6 exists, while vdsm does not support ipv6 only. .................................................... File packaging/setup/plugins/ovirt-engine-setup/config/hostname.py Line 129: super(Plugin, self).__init__(context=context) Line 130: Line 131: def _is_valid_IPv6_address(self, address): Line 132: # We do not use a regexp to validate an IPv6 address Line 133: # because it's too complex. Simply use the library for that. I prefer single return ret = False try: aaaa ret = True except ..: pass return ret Line 134: try: Line 135: socket.inet_pton(socket.AF_INET6, address) Line 136: except socket.error: Line 137: return False Line 145: self.command.get('ip'), Line 146: 'addr', Line 147: ), Line 148: ) Line 149: currentinterface = '' why do we need to store the interface between iterations? oh... in ipv6 they broke the contract of each line has its interface. bad. Line 150: for line in stdout: Line 151: interfacematch = self._INTERFACE_RE.match(line) Line 152: addressmatch = self._ADDRESS_RE.match(line) Line 153: v6addressmatch = self._IPV6_ADDRESS_RE.match(line) -- To view, visit http://gerrit.ovirt.org/21709 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4f4bffdb083755c60704f436a24a960848fbd056 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yedidyah Bar David <d...@redhat.com> Gerrit-Reviewer: Alex Lourie <alou...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Ofer Schreiber <oschr...@redhat.com> Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com> Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches