Sandro Bonazzola has posted comments on this change. Change subject: packaging: setup: let the user configure engine VM networking ......................................................................
Patch Set 19: (3 comments) https://gerrit.ovirt.org/#/c/41357/19/src/plugins/ovirt-hosted-engine-setup/vm/cloud_init.py File src/plugins/ovirt-hosted-engine-setup/vm/cloud_init.py: Line 24: Line 25: Line 26: import ethtool Line 27: import gettext Line 28: import netaddr please look at vdsm.netinfo module, maybe we can avoid to add yet another dependency and maybe simplify your code. Line 29: import os Line 30: import pwd Line 31: import re Line 32: import shutil Line 111: self.command.get('ip'), Line 112: 'addr', Line 113: 'show', Line 114: self.environment[ohostedcons.NetworkEnv.BRIDGE_NAME], Line 115: ), I think you can use vdsm netinfo module: >>> from vdsm import netinfo >>> netinfo.getaddr('em1') '192.168.1.105' Line 116: ) Line 117: else: Line 118: self.logger.debug('Acquiring nic address') Line 119: rc, stdout, stderr = self.execute( Line 121: self.command.get('ip'), Line 122: 'addr', Line 123: 'show', Line 124: self.environment[ohostedcons.NetworkEnv.BRIDGE_IF], Line 125: ), same here Line 126: ) Line 127: for line in stdout: Line 128: addressmatch = self._INET_ADDRESS_RE.match(line) Line 129: if addressmatch is not None: -- To view, visit https://gerrit.ovirt.org/41357 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic09f4d92e44f1bf810f06ada703e533b8c5e2061 Gerrit-PatchSet: 19 Gerrit-Project: ovirt-hosted-engine-setup Gerrit-Branch: master Gerrit-Owner: Simone Tiraboschi <stira...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Lev Veyde <lve...@redhat.com> Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com> Gerrit-Reviewer: Simone Tiraboschi <stira...@redhat.com> Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches