Browse Source

Fixed doc. Updated test to change existing key. Updated module spec for required name param.

Kenny Woodson 8 years ago
parent
commit
5e06d9e3b4

+ 3 - 3
roles/lib_openshift/library/oc_configmap.py

@@ -84,14 +84,14 @@ options:
   name:
     description:
     - Name of the object that is being queried.
-    required: false
+    required: True
     default: None
     aliases: []
   namespace:
     description:
     - The namespace where the object lives.
     required: false
-    default: str
+    default: default
     aliases: []
   from_file:
     description:
@@ -1553,7 +1553,7 @@ def main():
                        choices=['present', 'absent', 'list']),
             debug=dict(default=False, type='bool'),
             namespace=dict(default='default', type='str'),
-            name=dict(default=None, type='str'),
+            name=dict(default=None, required=True, type='str'),
             from_file=dict(default=None, type='dict'),
             from_literal=dict(default=None, type='dict'),
         ),

+ 1 - 1
roles/lib_openshift/src/ansible/oc_configmap.py

@@ -14,7 +14,7 @@ def main():
                        choices=['present', 'absent', 'list']),
             debug=dict(default=False, type='bool'),
             namespace=dict(default='default', type='str'),
-            name=dict(default=None, type='str'),
+            name=dict(default=None, required=True, type='str'),
             from_file=dict(default=None, type='dict'),
             from_literal=dict(default=None, type='dict'),
         ),

+ 2 - 2
roles/lib_openshift/src/doc/configmap

@@ -33,14 +33,14 @@ options:
   name:
     description:
     - Name of the object that is being queried.
-    required: false
+    required: True
     default: None
     aliases: []
   namespace:
     description:
     - The namespace where the object lives.
     required: false
-    default: str
+    default: default
     aliases: []
   from_file:
     description:

+ 2 - 1
roles/lib_openshift/src/test/integration/oc_configmap.yml

@@ -54,7 +54,7 @@
       from_file:
         config: "{{ filename }}"
       from_literal:
-        foo: bar
+        foo: notbar
         deployment_type: online
 
   - name: fetch the updated configmap
@@ -71,6 +71,7 @@
       that:
       - cmout.results.results[0].metadata.name == 'configmaptest'
       - cmout.results.results[0].data.deployment_type == 'online'
+      - cmout.results.results[0].data.foo == 'notbar'
   ###### end create test ###########
 
   ###### delete test ###########