Commit dfef599c authored by Leigh B. Stoller's avatar Leigh B. Stoller

Change a several occurrences of control_net to control_iface. There

are couple left in the newnodes code that Rob will need to help me
with.
parent 95090ae6
...@@ -1506,7 +1506,7 @@ function TBIPtoNodeID($ip) { ...@@ -1506,7 +1506,7 @@ function TBIPtoNodeID($ip) {
DBQueryFatal("select n.node_id from interfaces as i ". DBQueryFatal("select n.node_id from interfaces as i ".
"left join nodes as n on n.node_id=i.node_id ". "left join nodes as n on n.node_id=i.node_id ".
"left join node_types as t ". "left join node_types as t ".
" on t.type=n.type and i.card=t.control_net ". " on t.type=n.type and i.iface=t.control_iface ".
"where i.IP='$ip'"); "where i.IP='$ip'");
if (mysql_num_rows($query_result) == 0) { if (mysql_num_rows($query_result) == 0) {
......
...@@ -125,7 +125,7 @@ function guess_IP ($prefix, $number) { ...@@ -125,7 +125,7 @@ function guess_IP ($prefix, $number) {
$query_result = DBQueryFatal("select IP from interfaces as i " . $query_result = DBQueryFatal("select IP from interfaces as i " .
"left join nodes as n on i.node_id = n.node_id left join " . "left join nodes as n on i.node_id = n.node_id left join " .
"node_types as nt on n.type = nt.type " . "node_types as nt on n.type = nt.type " .
"where n.node_id='$prefix$i' and i.card = nt.control_net"); "where n.node_id='$prefix$i' and i.iface = nt.control_iface");
if (mysql_num_rows($query_result)) { if (mysql_num_rows($query_result)) {
$row = mysql_fetch_array($query_result); $row = mysql_fetch_array($query_result);
$IP = $row[IP]; $IP = $row[IP];
......
...@@ -1516,7 +1516,7 @@ function SHOWNODE($node_id) { ...@@ -1516,7 +1516,7 @@ function SHOWNODE($node_id) {
"left join reserved as r on n.node_id=r.node_id ". "left join reserved as r on n.node_id=r.node_id ".
"left join node_activity as na on n.node_id=na.node_id ". "left join node_activity as na on n.node_id=na.node_id ".
"left join node_types as t on t.type=n.type ". "left join node_types as t on t.type=n.type ".
"left join interfaces as i on i.card=t.control_net ". "left join interfaces as i on i.iface=t.control_iface ".
" and i.node_id=n.node_id ". " and i.node_id=n.node_id ".
"left join interfaces as pi on pi.card=t.control_net ". "left join interfaces as pi on pi.card=t.control_net ".
" and pi.node_id=n.phys_nodeid ". " and pi.node_id=n.phys_nodeid ".
......
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