'oVirt/RHV in version 4.1 doesn\'t support search by template+version_number,
so we need to list all templates with specific name and then iterate
through it\'s version until we find the version we look for.'

def __get_template_with_version(self):

    template = None
    if self.param('template'):
        templates_service = self._connection.system_service().templates_service()
        templates = templates_service.list(search=('name=%s' % self.param('template')))
        if self.param('template_version'):
            templates = [t for t in templates if (t.version.version_number == self.param('template_version'))]
        if templates:
            template = templates[0]
    return template
