mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
openshift_raw & openshift_scale: fix broken import
This commit is contained in:
parent
5d72f29b1a
commit
afef20827b
3 changed files with 9 additions and 21 deletions
|
@ -101,24 +101,18 @@ class KubernetesAnsibleModule(AnsibleModule):
|
|||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
if not HAS_K8S_MODULE_HELPER:
|
||||
raise Exception(
|
||||
"This module requires the OpenShift Python client. Try `pip install openshift`"
|
||||
)
|
||||
|
||||
if not HAS_YAML:
|
||||
raise Exception(
|
||||
"This module requires PyYAML. Try `pip install PyYAML`"
|
||||
)
|
||||
|
||||
if not HAS_STRING_UTILS:
|
||||
raise Exception(
|
||||
"This module requires Python string utils. Try `pip install python-string-utils`"
|
||||
)
|
||||
|
||||
kwargs['argument_spec'] = self.argspec
|
||||
AnsibleModule.__init__(self, *args, **kwargs)
|
||||
|
||||
if not HAS_K8S_MODULE_HELPER:
|
||||
self.fail_json(msg="This module requires the OpenShift Python client. Try `pip install openshift`")
|
||||
|
||||
if not HAS_YAML:
|
||||
self.fail_json(msg="This module requires PyYAML. Try `pip install PyYAML`")
|
||||
|
||||
if not HAS_STRING_UTILS:
|
||||
self.fail_json(msg="This module requires Python string utils. Try `pip install python-string-utils`")
|
||||
|
||||
@property
|
||||
def argspec(self):
|
||||
raise NotImplementedError()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue