summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift
diff options
context:
space:
mode:
authorOpenShift Bot <eparis+openshiftbot@redhat.com>2017-04-04 17:21:05 -0500
committerGitHub <noreply@github.com>2017-04-04 17:21:05 -0500
commit6cf9fa3c97cdfa1e19b5a2d5cee650eb4efb58e6 (patch)
treeb3656bb676e1522f6bcc100561edc78642aa4e15 /roles/lib_openshift
parent76be31cf7eeb633cbca6e77b8d5b976826ac0b4e (diff)
parent2a97044c83987f4e7fd938b50ed451aa91d22a68 (diff)
downloadopenshift-6cf9fa3c97cdfa1e19b5a2d5cee650eb4efb58e6.tar.gz
openshift-6cf9fa3c97cdfa1e19b5a2d5cee650eb4efb58e6.tar.bz2
openshift-6cf9fa3c97cdfa1e19b5a2d5cee650eb4efb58e6.tar.xz
openshift-6cf9fa3c97cdfa1e19b5a2d5cee650eb4efb58e6.zip
Merge pull request #3837 from jarrpa/oc_configmap-check
Merged by openshift-bot
Diffstat (limited to 'roles/lib_openshift')
-rw-r--r--roles/lib_openshift/library/oc_configmap.py4
-rw-r--r--roles/lib_openshift/src/class/oc_configmap.py4
2 files changed, 8 insertions, 0 deletions
diff --git a/roles/lib_openshift/library/oc_configmap.py b/roles/lib_openshift/library/oc_configmap.py
index 96345ffe0..c60f4661c 100644
--- a/roles/lib_openshift/library/oc_configmap.py
+++ b/roles/lib_openshift/library/oc_configmap.py
@@ -1524,6 +1524,10 @@ class OCConfigMap(OpenShiftCLI):
if state == 'list':
return {'changed': False, 'results': api_rval, 'state': state}
+ if not params['name']:
+ return {'failed': True,
+ 'msg': 'Please specify a name when state is absent|present.'}
+
########
# Delete
########
diff --git a/roles/lib_openshift/src/class/oc_configmap.py b/roles/lib_openshift/src/class/oc_configmap.py
index 87de3e1df..de77d1102 100644
--- a/roles/lib_openshift/src/class/oc_configmap.py
+++ b/roles/lib_openshift/src/class/oc_configmap.py
@@ -127,6 +127,10 @@ class OCConfigMap(OpenShiftCLI):
if state == 'list':
return {'changed': False, 'results': api_rval, 'state': state}
+ if not params['name']:
+ return {'failed': True,
+ 'msg': 'Please specify a name when state is absent|present.'}
+
########
# Delete
########