Alex Lourie has uploaded a new change for review.

Change subject: packaging: setup: Updated detecting network interfaces
......................................................................

packaging: setup: Updated detecting network interfaces

This patch updates the regex used to detect network
interfaces. It is required to find extended interfaces,
such as ones with VLAN notation (eth3.2 or eth0.34@eth3).

Change-Id: I1a53543671b02dcb9c66a2973ba40d238eb5220f
Bug-Url: https://bugzilla.redhat.com/970971
Signed-off-by: Alex Lourie <[email protected]>
---
M packaging/fedora/setup/common_utils.py
M packaging/setup/plugins/ovirt-engine-setup/config/hostname.py
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/15/16115/1

diff --git a/packaging/fedora/setup/common_utils.py 
b/packaging/fedora/setup/common_utils.py
index 0f6de49..eb6a321 100755
--- a/packaging/fedora/setup/common_utils.py
+++ b/packaging/fedora/setup/common_utils.py
@@ -604,11 +604,11 @@
     interfaces = {}
     addresses = {}
     interfacere = re.compile(
-        '^\d+:\s+(?P<interface>\w+):\s+<(?P<options>[^>]+).*'
+        '^\d+:\s+(?P<interface>\w+.*?):\s+<(?P<options>[^>]+).*'
     )
     addressre = re.compile(
         '\s+inet (?P<address>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}).+'
-        '\s+(?P<interface>\w+)$'
+        '\s+(?P<interface>\w+.*?)$'
     )
     cmd = [
         basedefs.EXEC_IP, "addr",
diff --git a/packaging/setup/plugins/ovirt-engine-setup/config/hostname.py 
b/packaging/setup/plugins/ovirt-engine-setup/config/hostname.py
index 6b48d02..d6c8091 100644
--- a/packaging/setup/plugins/ovirt-engine-setup/config/hostname.py
+++ b/packaging/setup/plugins/ovirt-engine-setup/config/hostname.py
@@ -54,7 +54,7 @@
             \d+
             :
             \s+
-            (?P<interface>\w+)
+            (?P<interface>\w+.?*)
             :
             \s+
             <(?P<options>[^>]+)
@@ -71,7 +71,7 @@
             (?P<address>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
             .+
             \s+
-            (?P<interface>\w+)
+            (?P<interface>\w+.*?)
             $
     """
     )


-- 
To view, visit http://gerrit.ovirt.org/16115
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a53543671b02dcb9c66a2973ba40d238eb5220f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alex Lourie <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to