From 213b9675a194086f93076e4d37791d7d8cd9af16 Mon Sep 17 00:00:00 2001 From: Scott Baker Date: Tue, 12 Nov 2013 17:51:44 -0800 Subject: [PATCH] filter out addresses not in current cluster --- plugins/hostmap.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/hostmap.py b/plugins/hostmap.py index 6a71ec2..8af33cf 100644 --- a/plugins/hostmap.py +++ b/plugins/hostmap.py @@ -38,6 +38,8 @@ def GetSlivers(data, config=None, plc=None): hostname = data['hostname'] + hostname_filter = ".".join(hostname.split(".")[1:]) + for sliver in data['slivers']: slicename = sliver['name'] for tag in sliver['attributes']: @@ -54,6 +56,9 @@ def GetSlivers(data, config=None, plc=None): if len(parts)==2: line = "%s pvt.%s private%d" % (parts[0], parts[1], index) + if not (hostname_filter in parts[1]): + continue + if (index==0): line = line + " headnode" -- 2.43.0