From 5bc338592cf9a189aaf393c93922a3cea6810222 Mon Sep 17 00:00:00 2001 From: Alexander Lutay Date: Fri, 7 Sep 2018 12:04:13 +0200 Subject: [PATCH] TT#42869 Revert "MT#21671 add get_ndb_ips" NGCP doesn't use NDB anymore and also it looks like non-safe commit as the commit has been done by user 'ngcp-config ' :-D Removing it. This reverts commit 9f4d913f6bcbe5ba02c21992f0245776132e029c. Change-Id: Ie91442a1f33e9ddcae5589c095d19c9e46cd68cb --- lib/get_ndb_ips | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 lib/get_ndb_ips diff --git a/lib/get_ndb_ips b/lib/get_ndb_ips deleted file mode 100644 index 649d57c5..00000000 --- a/lib/get_ndb_ips +++ /dev/null @@ -1,31 +0,0 @@ -[% -# vi: ft=tt2 - -# Return a hash of IPs from the interface of a given type for all nodes -# which act as a given role dbnode value of that host. -# -# @param argv.role The role of the node to process, one of: -# proxy, lb, mgmt -# @param argv.type The interface type of a node to extract the IP -# from, one of: -# web_int, web_ext, sip_int, sip_ext, ... -# @return out The hash of ips and dbnode values. - -out = {}; -FOREACH host IN hosts.keys; - NEXT UNLESS ngcp.has_role(host, argv.role); - - FOREACH iface IN hosts.$host.interfaces; - FOREACH realiface IN hosts.$host.keys; - NEXT IF realiface != iface; - NEXT UNLESS hosts.$host.$realiface.type.grep('^' _ argv.type _ '$').size(); - - ip = hosts.$host.$realiface.ip; - NEXT IF out.exists($ip); - - out.$ip = hosts.$host.dbnode; - END; - END; -END; - --%]