mirror of
https://github.com/ansible/awx.git
synced 2026-02-27 15:58:45 -03:30
disable reports option for foreman
This commit is contained in:
@@ -176,8 +176,6 @@ class ForemanInventory(object):
|
|||||||
except (ConfigParser.NoOptionError, ConfigParser.NoSectionError):
|
except (ConfigParser.NoOptionError, ConfigParser.NoSectionError):
|
||||||
self.want_facts = True
|
self.want_facts = True
|
||||||
|
|
||||||
self.want_facts = self.want_facts and self.report_want_facts
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.want_hostcollections = config.getboolean('ansible', 'want_hostcollections')
|
self.want_hostcollections = config.getboolean('ansible', 'want_hostcollections')
|
||||||
except (ConfigParser.NoOptionError, ConfigParser.NoSectionError):
|
except (ConfigParser.NoOptionError, ConfigParser.NoSectionError):
|
||||||
@@ -272,12 +270,11 @@ class ForemanInventory(object):
|
|||||||
return results
|
return results
|
||||||
|
|
||||||
def _use_inventory_report(self):
|
def _use_inventory_report(self):
|
||||||
if not self.foreman_use_reports_api:
|
# The options required to enable the reports feature have never been fully
|
||||||
return False
|
# surfaced by awx. Disabling reports in the foreman script altogether.
|
||||||
status_url = "%s/api/v2/status" % self.foreman_url
|
# Given that this script is being deprecated in favor of the foreman _plugin_,
|
||||||
result = self._get_json(status_url)
|
# reports should be enabled for the foreman plugin in future version of awx.
|
||||||
foreman_version = (LooseVersion(result.get('version')) >= LooseVersion('1.24.0'))
|
return False
|
||||||
return foreman_version
|
|
||||||
|
|
||||||
def _fetch_params(self):
|
def _fetch_params(self):
|
||||||
options, params = ("no", "yes"), dict()
|
options, params = ("no", "yes"), dict()
|
||||||
|
|||||||
Reference in New Issue
Block a user