Revision ae130c81
ID | ae130c81dbb9b94d7f9fba2ec93f3e934e4e4604 |
SimpleConfigReader: add IP address lookup helpers
Add the following functions to SimpleConfigReader:
GetInstanceByIp, nic ip -> instance name
GetNodePrimaryIp, node name -> node primary ip
GetInstancePrimaryNode, instance name -> primary node
For the first one we precalculate the _ip_to_instance, so we don't have
to loop over all instances for each query.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Files
- added
- modified
- copied
- renamed
- deleted