Commit Graph

5 Commits

Author SHA1 Message Date
Erik Johnson
3e96225210
Use one salt.utils.gitfs.GitFS instance per thread
This reduces some of the overhead caused by many concurrent fileclient
requests from minions.

Additionally, initializing remotes has been folded into the GitBase
class' dunder init. Instantiating an instance and initializing its
remotes were initially split so that an object could simply be created
with the master opts so that the configuration was loaded and nothing
else, allowing for certain cases (like clearing the cache files) where
we didn't need to actually initialize the remotes. But this both A)
presents a problem when the instance being used is a singleton, as you
don't want to be re-initializing the remotes all the time, and B)
suppressing initialization can be (and is now being) done via a new
argument to the dunder init.
2017-10-16 15:25:29 -05:00
Erik Johnson
53bd3a3e23 Improve inheritance in salt.utils.gitfs
This makes the following changes:

1. Renames the valid_providers param in GitBase to git_providers,
   allowing for a dictionary mapping provider names to their associated
   classes. This allows for alternate providers to be used with a
   GitBase subclass.
2. Renames the get_provider function to verify_provider to reduce
   confusion with git_providers.
3. Uses super() to run a parent class' dunder init instead of invoking
   the parent class directly.
2017-08-28 21:49:42 -05:00
Pedro Algarvio
40a64191a1
Absolute imports and A LOT of code cleanup. 2017-03-01 01:33:07 +00:00
Pedro Algarvio
3beb3fb801
Move whatever we need from salttesting to salt.
Let's drop the salttesting dependency cycle.
2017-02-28 22:52:49 +00:00
Pedro Algarvio
15af4c9728
Test filenames conformity. Adjust for pytest. 2017-02-23 23:19:42 +00:00