Commit 504995bd by Brian Coca

allow fact objects to be instantiated w/o triggering all fact collection

this opens the ability to do specific facts at much lower cost.
parent 0f2f022b
...@@ -118,8 +118,11 @@ class Facts(object): ...@@ -118,8 +118,11 @@ class Facts(object):
{ 'path' : '/usr/bin/pkg', 'name' : 'pkg' }, { 'path' : '/usr/bin/pkg', 'name' : 'pkg' },
] ]
def __init__(self): def __init__(self, load_on_init=True):
self.facts = {} self.facts = {}
if load_on_init:
self.get_platform_facts() self.get_platform_facts()
self.get_distribution_facts() self.get_distribution_facts()
self.get_cmdline() self.get_cmdline()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment