Add param method to oVirt helper module (#18605)
This patch add new param method to fetch parameters from the Ansible module, so modules don't have to use the long name `self._module.params.get()`.
This commit is contained in:
parent
4c1bb31611
commit
b606078d69
1 changed files with 6 additions and 0 deletions
|
@ -327,6 +327,12 @@ class BaseModule(object):
|
|||
"""
|
||||
pass
|
||||
|
||||
def param(self, name, default=None):
|
||||
"""
|
||||
Return a module parameter specified by it's name.
|
||||
"""
|
||||
return self._module.params.get(name, default)
|
||||
|
||||
def update_check(self, entity):
|
||||
"""
|
||||
This method handle checks whether the entity values are same as values
|
||||
|
|
Loading…
Reference in a new issue