diff options
Diffstat (limited to 'roles/kubernetes-net/filter_plugins')
-rw-r--r-- | roles/kubernetes-net/filter_plugins/kubenet.py | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/roles/kubernetes-net/filter_plugins/kubenet.py b/roles/kubernetes-net/filter_plugins/kubenet.py deleted file mode 100644 index c1312dd8..00000000 --- a/roles/kubernetes-net/filter_plugins/kubenet.py +++ /dev/null @@ -1,33 +0,0 @@ -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -from ansible import errors - - -def direct_net_zone(data, myname, peer): - try: - zones = [] - for zone in data: - if myname in data[zone]['node_interface'] and peer in data[zone]['node_interface']: - zones.append(zone) - - if not zones: - return "" - if len(zones) > 1: - raise errors.AnsibleFilterError("host '%s' and '%s' have multiple direct net zones in common: %s" % - (myname, peer, zones.join(','))) - return zones[0] - - except Exception as e: - raise errors.AnsibleFilterError("direct_net_zones(): %s" % str(e)) - - -class FilterModule(object): - - ''' Kubernetes Network Filters ''' - filter_map = { - 'direct_net_zone': direct_net_zone, - } - - def filters(self): - return self.filter_map |