summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift_api/build/generate.py
diff options
context:
space:
mode:
authorJoel Diaz <jdiaz@redhat.com>2016-04-19 11:44:46 -0400
committerJoel Diaz <jdiaz@redhat.com>2016-04-19 11:44:46 -0400
commit30c41f3bc24204bad68f30927ea59ec78821a43a (patch)
tree42b3cbefb3e915385b17ecd5e9b81721b98a4772 /roles/lib_openshift_api/build/generate.py
parent1bb3de7855096557a820845cef9efe4702093675 (diff)
parent3681ab5fb2a39ccb06024e6ad514ad50df21f9d2 (diff)
downloadopenshift-30c41f3bc24204bad68f30927ea59ec78821a43a.tar.gz
openshift-30c41f3bc24204bad68f30927ea59ec78821a43a.tar.bz2
openshift-30c41f3bc24204bad68f30927ea59ec78821a43a.tar.xz
openshift-30c41f3bc24204bad68f30927ea59ec78821a43a.zip
Merge pull request #1734 from joelddiaz/tools-roles-move
cleanup roles after roles move to openshift-tools
Diffstat (limited to 'roles/lib_openshift_api/build/generate.py')
-rwxr-xr-xroles/lib_openshift_api/build/generate.py64
1 files changed, 0 insertions, 64 deletions
diff --git a/roles/lib_openshift_api/build/generate.py b/roles/lib_openshift_api/build/generate.py
deleted file mode 100755
index 9fc1986f1..000000000
--- a/roles/lib_openshift_api/build/generate.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/env python
-'''
- Generate the openshift-ansible/roles/lib_openshift_cli/library/ modules.
-'''
-
-import os
-
-# pylint: disable=anomalous-backslash-in-string
-GEN_STR = "#!/usr/bin/env python\n" + \
- "# ___ ___ _ _ ___ ___ _ _____ ___ ___\n" + \
- "# / __| __| \| | __| _ \ /_\_ _| __| \\\n" + \
- "# | (_ | _|| .` | _|| / / _ \| | | _|| |) |\n" + \
- "# \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____\n" + \
- "# | \ / _ \ | \| |/ _ \_ _| | __| \_ _|_ _|\n" + \
- "# | |) | (_) | | .` | (_) || | | _|| |) | | | |\n" + \
- "# |___/ \___/ |_|\_|\___/ |_| |___|___/___| |_|\n"
-
-OPENSHIFT_ANSIBLE_PATH = os.path.dirname(os.path.realpath(__file__))
-
-
-FILES = {'oc_obj.py': ['src/base.py',
- '../../lib_yaml_editor/build/src/yedit.py',
- 'src/obj.py',
- 'ansible/obj.py',
- ],
- 'oc_secret.py': ['src/base.py',
- '../../lib_yaml_editor/build/src/yedit.py',
- 'src/secret.py',
- 'ansible/secret.py',
- ],
- 'oc_edit.py': ['src/base.py',
- '../../lib_yaml_editor/build/src/yedit.py',
- 'src/edit.py',
- 'ansible/edit.py',
- ],
- 'oadm_router.py': ['src/base.py',
- '../../lib_yaml_editor/build/src/yedit.py',
- 'src/router.py',
- 'ansible/router.py',
- ],
- }
-
-
-def main():
- ''' combine the necessary files to create the ansible module '''
- library = os.path.join(OPENSHIFT_ANSIBLE_PATH, '..', 'library/')
- for fname, parts in FILES.items():
- with open(os.path.join(library, fname), 'w') as afd:
- afd.seek(0)
- afd.write(GEN_STR)
- for fpart in parts:
- with open(os.path.join(OPENSHIFT_ANSIBLE_PATH, fpart)) as pfd:
- # first line is pylint disable so skip it
- for idx, line in enumerate(pfd):
- if idx == 0 and 'skip-file' in line:
- continue
-
- afd.write(line)
-
-
-if __name__ == '__main__':
- main()
-
-