Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
Remove debug logging and generate facts.rst
Browse files Browse the repository at this point in the history
Thanks to chambridge for the review.
  • Loading branch information
Noah Lavine committed Dec 13, 2017
1 parent 8cb3b6f commit 28c8944
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
2 changes: 2 additions & 0 deletions doc/facts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@
- ``jboss.eap.running-paths`` - Paths of running installs of JBoss EAP
- ``jboss.eap.summary`` - Summary of JBoss EAP information
- ``jboss.activemq-ver`` - ActiveMQ version
- ``jboss.brms.summary`` - Summary of BRMS information
- ``jboss.camel-ver`` - Camel version
- ``jboss.cxf-ver`` - CXF version
- ``jboss.fuse.fuse-on-eap`` - Fuse on EAP
- ``jboss.fuse.init-files`` - Fuse-related init files
- ``jboss.fuse-on-karaf.find-karaf-jar`` - Use the find utility to locate karaf.jar
- ``jboss.fuse.summary`` - Summary of Fuse information
- ``jboss.fuse-on-karaf.karaf-home`` - Karaf home
- ``redhat-packages.certs`` - the list of Red Hat certificates found
- ``redhat-packages.gpg.is_redhat`` - determines if package is a Red Hat package filtered by GPG keys
Expand Down
4 changes: 2 additions & 2 deletions rho/facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def new_fact(fact_name, description, is_default=None,
is_default=True, categories=[JBOSS_FACTS])
new_fact('jboss.activemq-ver', 'ActiveMQ version', is_default=False)
new_fact('jboss.brms.summary', 'Summary of BRMS information',
is_default=True)
is_default=True, categories=[JBOSS_FACTS])
new_fact('jboss.camel-ver', 'Camel version', is_default=False)
new_fact('jboss.cxf-ver', 'CXF version', is_default=False)
new_fact('jboss.fuse.fuse-on-eap', 'Fuse on EAP',
Expand All @@ -204,7 +204,7 @@ def new_fact(fact_name, description, is_default=None,
new_fact('jboss.fuse-on-karaf.find-karaf-jar',
'Use the find utility to locate karaf.jar',
is_default=False)
new_fact('jboss.fuse.summary', 'Summary of Fuse info',
new_fact('jboss.fuse.summary', 'Summary of Fuse information',
is_default=True, categories=[JBOSS_FACTS])
new_fact('jboss.fuse-on-karaf.karaf-home', 'Karaf home',
is_default=True, categories=[JBOSS_FACTS])
Expand Down
18 changes: 0 additions & 18 deletions rho/postprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,31 +821,22 @@ def process_fuse_on_eap(fact_names, host_vars):
def process_karaf_home(fact_names, host_vars):
"""Process karaf_home indicators to detect Fuse-on-Karaf."""

log.info('In process_karaf_home')

if (JBOSS_FUSE_ON_KARAF_KARAF_HOME not in fact_names and
JBOSS_FUSE_SUMMARY not in fact_names): # noqa
return {}

log.info('Past first return')

if 'karaf_homes' not in host_vars:
return {JBOSS_FUSE_ON_KARAF_KARAF_HOME:
'Error: fact karaf_homes not collected.'}
karaf_homes = host_vars['karaf_homes']

log.info('Past second return')

err, bin_fuse = raw_output_present(fact_names, host_vars,
JBOSS_FUSE_ON_KARAF_KARAF_HOME,
'karaf_home_bin_fuse',
'ls -1 KARAF_HOME/bin/fuse')
log.info('Raw output: %s, %s', err, bin_fuse)
if err is not None:
return err

log.info('Past third return')

err, system_org_jboss = raw_output_present(
fact_names, host_vars,
JBOSS_FUSE_ON_KARAF_KARAF_HOME,
Expand All @@ -854,8 +845,6 @@ def process_karaf_home(fact_names, host_vars):
if err is not None:
return err

log.info('Past fourth return')

system_org_jboss_results, system_org_jboss_mr = process_indicator_files(
['fuse'], system_org_jboss)

Expand All @@ -870,9 +859,6 @@ def process_karaf_home(fact_names, host_vars):
assert list(system_org_jboss_results.keys()) == karaf_homes
assert list(bin_fuse_results.keys()) == karaf_homes

log.info('system_org_jboss: %s', system_org_jboss_results)
log.info('bin_fuse: %s', bin_fuse_results)

return {JBOSS_FUSE_ON_KARAF_KARAF_HOME:
'; '.join(['{0}: {1}; {2}'.format(
karaf_home,
Expand Down Expand Up @@ -1084,10 +1070,6 @@ def generate_fuse_summary(facts_to_collect, facts):
fuse_on_karaf = facts.get(JBOSS_FUSE_ON_KARAF_KARAF_HOME + MR)
fuse_init_files = facts.get(JBOSS_FUSE_INIT_FILES + MR)

log.info('Fuse on eap: %s', fuse_on_eap)
log.info('Fuse on karaf: %s', fuse_on_karaf)
log.info('Fuse init files: %s', fuse_init_files)

if fuse_on_eap or fuse_on_karaf:
return {JBOSS_FUSE_SUMMARY: 'Yes, Fuse installation present'}

Expand Down

0 comments on commit 28c8944

Please sign in to comment.