diff options
Diffstat (limited to 'roles/lib_openshift')
-rw-r--r-- | roles/lib_openshift/library/oc_configmap.py | 4 | ||||
-rw-r--r-- | roles/lib_openshift/src/class/oc_configmap.py | 4 |
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 ######## |