Thomas Jackson
fb43ca4983
If you have the module loaded, lets not require another hit to disk
2015-02-05 09:20:30 -08:00
Thomas Jackson
307e5c1473
Check that __context__ is always present, since it now is (properly)
2015-02-05 09:20:30 -08:00
Thomas Jackson
259be3aa03
remove old deprecated mechanism
2015-02-05 09:20:29 -08:00
Thomas Jackson
9404575bb8
Fix process_virtual error_reasons
...
Never used, so I fixed it up to not be a list-- since you can only have one. We will also log this as an error, for now since the module is asking for an error
2015-02-05 09:20:29 -08:00
Thomas Jackson
1c13697172
Misc cleanup
2015-02-05 09:20:29 -08:00
Thomas Jackson
dcf4550f4e
Cleanup FunctionWrapper
2015-02-05 09:20:29 -08:00
Thomas Jackson
0f77253e27
Remove unecessary format, a string is always a string
2015-02-05 09:20:29 -08:00
Thomas Jackson
33597d2f77
Move "pack" over to a dict
...
Since it doesn't make sense to allow for duplicate "name" pack items, we should just use a dict. This also makes sharing __context__ between all the plugins *significantly* cleaner
2015-02-05 09:20:29 -08:00
Thomas Jackson
ac6046c2cf
Inject globals after verifying the function-- because it might not exist!
2015-02-05 09:20:29 -08:00
Thomas Jackson
5b6f31a31e
Attempt dict access
...
Apparently SSH FunctionWraper breaks when you do just the "in" comparator
2015-02-05 09:20:29 -08:00
Thomas Jackson
95dd62f24d
Conditionally inject context (if no one else has)
2015-02-05 09:20:29 -08:00
Thomas Jackson
686ec05b84
Remove test as well
...
Conflicts:
tests/unit/output/grains.py
2015-02-05 09:20:29 -08:00
Thomas Jackson
b23a076e11
Remove grains outputter
...
Its been broken for ~8 months (or more), and its been falling back to nested. Since nested does (IMO) a better job displaying the data and is generic, there is no reason to get this working-- esp since we've already "deprecated" it, by it not working
Conflicts:
salt/output/grains.py
2015-02-05 09:20:29 -08:00
Thomas Jackson
9339b14d33
Some more cleanup to grains outputter, closer to working
2015-02-05 09:20:29 -08:00
Thomas Jackson
7b03fad8cd
Rename NewLazyLoader to LazyLoader (since the old one was deleted)
2015-02-05 09:20:29 -08:00
Thomas Jackson
69f73df099
__salt__ is not a lazydict object, not a dict.
...
In addition, since _yaml_result_unicode_to_utf8 is recursive, there is no need for the depth under the OrderedDict section
2015-02-05 09:20:28 -08:00
Thomas Jackson
3840dbc7ff
Rename func, since it overlaps (works because of ordering, but still...)
2015-02-05 09:20:28 -08:00
Thomas Jackson
a3bee1b963
Pylint
2015-02-05 09:20:28 -08:00
Thomas Jackson
3001d88459
Proper precedence of file extensions
2015-02-05 09:20:28 -08:00
Thomas Jackson
d5bcdce30d
Make the pyobjects loader ignore virtual (it did before)
2015-02-05 09:20:28 -08:00
Thomas Jackson
adef299d9b
Migrate to new loader
2015-02-05 09:20:28 -08:00
Thomas Jackson
01fa6afc1b
Change default to false, since everyone seems to pass them in
2015-02-05 09:20:28 -08:00
Thomas Jackson
c12d7c888a
Make LazyLoader's singleton-ness optional
2015-02-05 09:20:28 -08:00
Thomas Jackson
f47663a59e
Fix pyobjects renderer to use new loader
2015-02-05 09:20:28 -08:00
Thomas Jackson
6cd7cee87b
Fix namespacing of modules in dependency dict
2015-02-05 09:20:28 -08:00
Thomas Jackson
132008ef5c
pylint some more
2015-02-05 09:20:28 -08:00
Thomas Jackson
6423228b9a
Pylint fix
2015-02-05 09:20:28 -08:00
Thomas Jackson
fa84d722e9
Stop caching grains globally in memory.
...
We can add this later, but we have to determine what conditions go into unique-ing the grains (just mimic disk cache)
2015-02-05 09:20:27 -08:00
Thomas Jackson
39d899115c
Misc other loader globals fixes
2015-02-05 09:20:27 -08:00
Thomas Jackson
509b4352f2
Pack modules to runners
2015-02-05 09:20:27 -08:00
Thomas Jackson
b16d828896
Fix import namespacing
2015-02-05 09:20:27 -08:00
Thomas Jackson
4260d211dd
Fix call() in loader
2015-02-05 09:20:27 -08:00
Thomas Jackson
234b9c210e
More pylint fixes
2015-02-05 09:20:27 -08:00
Thomas Jackson
258c978b11
whitespace pylint cleanup
2015-02-05 09:20:27 -08:00
Thomas Jackson
a08ab220e7
Reload submodules after initial load
2015-02-05 09:20:27 -08:00
Thomas Jackson
191682302d
Pass in "kind" to cleanup in depends decorator instead of guessing
2015-02-05 09:20:27 -08:00
Thomas Jackson
cb43d8649f
Support proxy modules, and misc pylint fixup
2015-02-05 09:20:27 -08:00
Thomas Jackson
589eb58d95
Add support for non-virtual loader dicts and remove old loader class
2015-02-05 09:20:27 -08:00
Thomas Jackson
583fa3d6cc
Remove majority of *old* loader code
2015-02-05 09:20:27 -08:00
Thomas Jackson
db3d1a7426
Move to clear() for new loader
2015-02-05 09:20:27 -08:00
Thomas Jackson
ebf6782397
Use clear() to reload
2015-02-05 09:20:26 -08:00
Thomas Jackson
480ee98427
Fix type error
2015-02-05 09:20:26 -08:00
Thomas Jackson
bf89ca1bc8
Add depends support to new lazyloader
2015-02-05 09:20:26 -08:00
Thomas Jackson
586b713b5f
Add support for multiple types of functions by namespacing out the dep dict
2015-02-05 09:20:26 -08:00
Thomas Jackson
ab2cbd9280
Catch case where 'return' not in opts, or other ways to get an empty returner (as it will just fail anyways)
2015-02-05 09:20:26 -08:00
Thomas Jackson
f79a04ca6a
pylint
2015-02-05 09:20:26 -08:00
Thomas Jackson
1402496e86
Re-add pyx support
2015-02-05 09:20:26 -08:00
Thomas Jackson
c346737914
Handle disk better
...
Since we are now loading the "squashfs" into memory, we need to handle the inevitable case where the disk content changes. This will re-load from disk up to once per get when a file is missing or we loaded everything else.
2015-02-05 09:20:26 -08:00
Thomas Jackson
329c015ff6
Fix grains caching
2015-02-05 09:20:26 -08:00
Thomas Jackson
5f271dd522
Migrate everything over to NewLazyLoader
2015-02-05 09:20:26 -08:00