Commit 1e1188b5 authored by Leigh Stoller's avatar Leigh Stoller

Add sanity check to Create() method.

parent 4d3b8496
......@@ -273,6 +273,14 @@ sub Create($$$)
return undef;
}
}
if (! (defined($card) && defined($ifrole) && defined($MAC) &&
defined($IP) && defined($port) && defined($mask) &&
defined($iftype) && defined($iface) && defined($max_speed) &&
defined($duplex) && defined($uuid))) {
print STDERR "Interface::Create: Missing fields in arguments:\n";
print STDERR Dumper($argref);
return undef;
}
DBQueryWarn("insert into interfaces set ".
" node_id='$node_id', " .
" card=$card, port=$port, role='$ifrole', ".
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment