diff options
author | Jason DeTiberus <jdetiber@redhat.com> | 2016-12-21 15:54:38 -0500 |
---|---|---|
committer | Jason DeTiberus <jdetiber@redhat.com> | 2016-12-21 16:51:44 -0500 |
commit | 9b3852263ca7b1f399d3ac453cfe93ed64078205 (patch) | |
tree | 905029cb4a1e71eee4030dbc522205ea5609e1ad /playbooks/adhoc/grow_docker_vg/filter_plugins/oo_filters.py | |
parent | 0fb91190b7e5b5c18f4c96f9c01a4ae51436504a (diff) | |
download | openshift-9b3852263ca7b1f399d3ac453cfe93ed64078205.tar.gz openshift-9b3852263ca7b1f399d3ac453cfe93ed64078205.tar.bz2 openshift-9b3852263ca7b1f399d3ac453cfe93ed64078205.tar.xz openshift-9b3852263ca7b1f399d3ac453cfe93ed64078205.zip |
remove duplicate filter name and oo_pdb
Diffstat (limited to 'playbooks/adhoc/grow_docker_vg/filter_plugins/oo_filters.py')
-rw-r--r-- | playbooks/adhoc/grow_docker_vg/filter_plugins/oo_filters.py | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/playbooks/adhoc/grow_docker_vg/filter_plugins/oo_filters.py b/playbooks/adhoc/grow_docker_vg/filter_plugins/oo_filters.py deleted file mode 100644 index c19274e06..000000000 --- a/playbooks/adhoc/grow_docker_vg/filter_plugins/oo_filters.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- -# vim: expandtab:tabstop=4:shiftwidth=4 -''' -Custom filters for use in openshift-ansible -''' - -import pdb - - -class FilterModule(object): - ''' Custom ansible filters ''' - - @staticmethod - def oo_pdb(arg): - ''' This pops you into a pdb instance where arg is the data passed in - from the filter. - Ex: "{{ hostvars | oo_pdb }}" - ''' - pdb.set_trace() - return arg - - @staticmethod - def translate_volume_name(volumes, target_volume): - ''' - This filter matches a device string /dev/sdX to /dev/xvdX - It will then return the AWS volume ID - ''' - for vol in volumes: - translated_name = vol["attachment_set"]["device"].replace("/dev/sd", "/dev/xvd") - if target_volume.startswith(translated_name): - return vol["id"] - - return None - - def filters(self): - ''' returns a mapping of filters to methods ''' - return { - "translate_volume_name": self.translate_volume_name, - } |