Fabian Deutsch has uploaded a new change for review. Change subject: auto-install: Raise error if NIC does not exist ......................................................................
auto-install: Raise error if NIC does not exist Change-Id: I4b02255941e0cddaa524d274205a59ea8775ffae Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1265175 Signed-off-by: Fabian Deutsch <[email protected]> --- M src/ovirtnode/network.py 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/36/47536/1 diff --git a/src/ovirtnode/network.py b/src/ovirtnode/network.py index 39fc0dc..05ecba7 100644 --- a/src/ovirtnode/network.py +++ b/src/ovirtnode/network.py @@ -62,6 +62,7 @@ def build_network_auto_transaction(): from ovirt.node.config.defaults import Network, Nameservers, \ Timeservers, Hostname + from ovirt.node.utils.network import NIC txs = Transaction("Automatic Installation") @@ -73,6 +74,9 @@ logger.debug("Got netmodel: %s" % netmodel) if netmodel["iface"]: + if not NIC(netmodel["iface"]).exists(): + raise RuntimeError("NIC %r does not exist" % netmodel["iface"]) + if not netmodel["ipaddr"]: txs.append(SetDefaultBootproto()) -- To view, visit https://gerrit.ovirt.org/47536 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4b02255941e0cddaa524d274205a59ea8775ffae Gerrit-PatchSet: 1 Gerrit-Project: ovirt-node Gerrit-Branch: ovirt-3.6 Gerrit-Owner: Fabian Deutsch <[email protected]> Gerrit-Reviewer: Fabian Deutsch <[email protected]> _______________________________________________ node-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/node-patches
