Commit ff0eb4c6 authored by Gary Wong's avatar Gary Wong

Give out the IP address of the control interface of the physical node.

parent 6e9ecd85
......@@ -133,6 +133,8 @@ sub Resolve($)
"uuid" => $node->uuid(),
"role" => $node->role(),
"hostname" => $node->node_id() . ".${OURDOMAIN}",
"physctrl" =>
Interface->LookupControl( $node->phys_nodeid() )->IP(),
};
#
......
......@@ -137,10 +137,7 @@ for cm in response[ "value" ]:
params[ "uuid" ] = node
rval, response = do_method( None, "Resolve", params,
cm[ "url" ] )
for interface in response[ "value" ][ "interfaces" ]:
if interface[ "role" ] == "ctrl":
Say( interface[ "IP" ] )
break
Say( response[ "value" ][ "physctrl" ] )
else:
Say( NOTREADY )
......
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