summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/src/ansible
diff options
context:
space:
mode:
authorMonis Khan <mkhan@redhat.com>2017-02-16 16:03:01 -0500
committerMonis Khan <mkhan@redhat.com>2017-02-21 17:07:25 -0500
commitd20f526eb7adb27abd8d5c41c1e14c0eb22b0736 (patch)
tree602535782ce8e5c63ee5a4f1beea743d90785c0c /roles/lib_openshift/src/ansible
parentb718955622da88c875aa5814fd87bcb3f53599f6 (diff)
downloadopenshift-d20f526eb7adb27abd8d5c41c1e14c0eb22b0736.tar.gz
openshift-d20f526eb7adb27abd8d5c41c1e14c0eb22b0736.tar.bz2
openshift-d20f526eb7adb27abd8d5c41c1e14c0eb22b0736.tar.xz
openshift-d20f526eb7adb27abd8d5c41c1e14c0eb22b0736.zip
Add SDNValidator Module
Signed-off-by: Monis Khan <mkhan@redhat.com>
Diffstat (limited to 'roles/lib_openshift/src/ansible')
-rw-r--r--roles/lib_openshift/src/ansible/oc_sdnvalidator.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/roles/lib_openshift/src/ansible/oc_sdnvalidator.py b/roles/lib_openshift/src/ansible/oc_sdnvalidator.py
new file mode 100644
index 000000000..e91417d63
--- /dev/null
+++ b/roles/lib_openshift/src/ansible/oc_sdnvalidator.py
@@ -0,0 +1,24 @@
+# pylint: skip-file
+# flake8: noqa
+
+def main():
+ '''
+ ansible oc module for validating OpenShift SDN objects
+ '''
+
+ module = AnsibleModule(
+ argument_spec=dict(
+ kubeconfig=dict(default='/etc/origin/master/admin.kubeconfig', type='str'),
+ ),
+ supports_check_mode=False,
+ )
+
+
+ rval = OCSDNValidator.run_ansible(module.params)
+ if 'failed' in rval:
+ module.fail_json(**rval)
+
+ module.exit_json(**rval)
+
+if __name__ == '__main__':
+ main()