summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/src/test/integration/oadm_manage_node.yml
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2017-01-30 12:31:10 -0500
committerGitHub <noreply@github.com>2017-01-30 12:31:10 -0500
commit8c7ccc601cab2f84a1fa3af9f4c1278dab96daf5 (patch)
tree804d22df0bde2009452c23e40896b18afa3eb654 /roles/lib_openshift/src/test/integration/oadm_manage_node.yml
parent33f6619a919b815b682bb813baf2cb4f42ea964e (diff)
parent70849347e5cef1efe61d11eb7185d3bafd6288e9 (diff)
downloadopenshift-8c7ccc601cab2f84a1fa3af9f4c1278dab96daf5.tar.gz
openshift-8c7ccc601cab2f84a1fa3af9f4c1278dab96daf5.tar.bz2
openshift-8c7ccc601cab2f84a1fa3af9f4c1278dab96daf5.tar.xz
openshift-8c7ccc601cab2f84a1fa3af9f4c1278dab96daf5.zip
Merge pull request #3197 from kwoodson/manage_node
Adding oadm_manage_node lib_openshift.
Diffstat (limited to 'roles/lib_openshift/src/test/integration/oadm_manage_node.yml')
-rwxr-xr-xroles/lib_openshift/src/test/integration/oadm_manage_node.yml58
1 files changed, 58 insertions, 0 deletions
diff --git a/roles/lib_openshift/src/test/integration/oadm_manage_node.yml b/roles/lib_openshift/src/test/integration/oadm_manage_node.yml
new file mode 100755
index 000000000..69a701b17
--- /dev/null
+++ b/roles/lib_openshift/src/test/integration/oadm_manage_node.yml
@@ -0,0 +1,58 @@
+#!/usr/bin/ansible-playbook --module-path=../../../library/
+# ./oadm_manage_node.yml -M ../../../library -e "cli_master_test=$OPENSHIFT_MASTER cli_node_test=$OPENSHIFT_NODE
+---
+- hosts: "{{ cli_master_test }}"
+ gather_facts: no
+ user: root
+ tasks:
+ - name: list pods from a node
+ oadm_manage_node:
+ list_pods: True
+ node:
+ - "{{ cli_node_test }}"
+ register: podout
+ - debug: var=podout
+
+ - assert:
+ that: "'{{ cli_node_test }}' in podout.results.nodes"
+ msg: Pod data was not returned
+
+ - name: set node to unschedulable
+ oadm_manage_node:
+ schedulable: False
+ node:
+ - "{{ cli_node_test }}"
+ register: nodeout
+ - debug: var=nodeout
+
+ - name: assert that schedulable=False
+ assert:
+ that: nodeout.results.nodes[0]['schedulable'] == False
+ msg: "{{ cli_node_test }} schedulable set to True"
+
+ - name: get node scheduable
+ oc_obj:
+ kind: node
+ state: list
+ name: "{{ cli_node_test }}"
+ namespace: None
+ register: nodeout
+
+ - debug: var=nodeout
+
+ - name: assert that schedulable=False
+ assert:
+ that: nodeout.results.results[0]['spec']['unschedulable']
+
+ - name: set node to schedulable
+ oadm_manage_node:
+ schedulable: True
+ node:
+ - "{{ cli_node_test }}"
+ register: nodeout
+ - debug: var=nodeout
+
+ - name: assert that schedulable=False
+ assert:
+ that: nodeout.results.nodes[0]['schedulable']
+ msg: "{{ cli_node_test }} schedulable set to False"