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:
Ondra Machacek 2016-11-24 17:03:22 +01:00 committed by John R Barker
parent 4c1bb31611
commit b606078d69

View file

@ -327,6 +327,12 @@ class BaseModule(object):
""" """
pass 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): def update_check(self, entity):
""" """
This method handle checks whether the entity values are same as values This method handle checks whether the entity values are same as values