Commit b8739ed1 authored by Robert Ricci's avatar Robert Ricci
Browse files

Convert bandwidths we're going to put into the current_speed column

of the interfaces table from bps (which they are in the
interface_types table) into Mbps.

Units for bandwidths in assign_wrapper are a total mess!
parent b8aba0d0
......@@ -1981,8 +1981,11 @@ foreach $vnodeport (keys(%portbw)) {
defined($portbw{$vnodeport}) ) {
$pnode = $v2pmap{$vnode};
$pport = $portmap{$vnodeport};
# XXX - the following converts from bps to Mbps
$speed = $portbw{$vnodeport} / 1000;
DBQueryFatal("update interfaces set " .
" current_speed=\"$portbw{$vnodeport}\"" .
" current_speed=\"$speed\"" .
" where node_id=\"$pnode\" and iface=\"$pport\"");
}
}
......
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