Skip to content

Commit

Permalink
Update canonical_facts to load needed components (#3448)
Browse files Browse the repository at this point in the history
* get_canonical_facts needs to work for legacy archives that do not include meta_data

Signed-off-by: Bob Fahr <[email protected]>
  • Loading branch information
bfahr authored Jun 23, 2022
1 parent d50378f commit bbc2186
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions insights/util/canonical_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def canonical_facts(


def get_canonical_facts(path=None):
load_components("insights.specs.default")
load_components("insights.specs.default", "insights.specs.insights_archive")

set_enabled(canonical_facts, True)
set_enabled(SubscriptionManagerID, True)
Expand All @@ -149,7 +149,4 @@ def get_canonical_facts(path=None):
if __name__ == "__main__":
import json

# Load both default and archive to support host and archive collection
load_components("insights.specs.default", "insights.specs.insights_archive")

print(json.dumps(get_canonical_facts()))

0 comments on commit bbc2186

Please sign in to comment.