22
22
import errno
23
23
import logging
24
24
25
- import hubblestack .extmods . fileserver
25
+ import hubblestack .fileserver
26
26
import hubblestack .utils .files
27
27
import hubblestack .utils .gzip_util
28
28
import hubblestack .utils .hashutils
@@ -86,14 +86,14 @@ def _add_file_stat(fnd):
86
86
# An invalid index option was passed
87
87
return fnd
88
88
full = os .path .join (root , path )
89
- if os .path .isfile (full ) and not hubblestack .extmods . fileserver .is_file_ignored (__opts__ , full ):
89
+ if os .path .isfile (full ) and not hubblestack .fileserver .is_file_ignored (__opts__ , full ):
90
90
fnd ['path' ] = full
91
91
fnd ['rel' ] = path
92
92
return _add_file_stat (fnd )
93
93
return fnd
94
94
for root in __opts__ ['file_roots' ][saltenv ]:
95
95
full = os .path .join (root , path )
96
- if os .path .isfile (full ) and not hubblestack .extmods . fileserver .is_file_ignored (__opts__ , full ):
96
+ if os .path .isfile (full ) and not hubblestack .fileserver .is_file_ignored (__opts__ , full ):
97
97
fnd ['path' ] = full
98
98
fnd ['rel' ] = path
99
99
return _add_file_stat (fnd )
@@ -139,7 +139,7 @@ def update():
139
139
When we are asked to update (regular interval) lets reap the cache
140
140
"""
141
141
try :
142
- hubblestack .extmods . fileserver .reap_fileserver_cache_dir (
142
+ hubblestack .fileserver .reap_fileserver_cache_dir (
143
143
os .path .join (__opts__ ['cachedir' ], 'roots' , 'hash' ),
144
144
find_file
145
145
)
@@ -154,7 +154,7 @@ def update():
154
154
'backend' : 'roots' }
155
155
156
156
# generate the new map
157
- new_mtime_map = hubblestack .extmods . fileserver .generate_mtime_map (__opts__ , __opts__ ['file_roots' ])
157
+ new_mtime_map = hubblestack .fileserver .generate_mtime_map (__opts__ , __opts__ ['file_roots' ])
158
158
159
159
old_mtime_map = {}
160
160
# if you have an old map, load that
@@ -175,7 +175,7 @@ def update():
175
175
)
176
176
177
177
# compare the maps, set changed to the return value
178
- data ['changed' ] = hubblestack .extmods . fileserver .diff_mtime_map (old_mtime_map , new_mtime_map )
178
+ data ['changed' ] = hubblestack .fileserver .diff_mtime_map (old_mtime_map , new_mtime_map )
179
179
180
180
# compute files that were removed and added
181
181
old_files = set (old_mtime_map .keys ())
@@ -293,7 +293,7 @@ def _file_lists(load, form):
293
293
list_cache = os .path .join (list_cachedir , '{0}.p' .format (load ['saltenv' ]))
294
294
w_lock = os .path .join (list_cachedir , '.{0}.w' .format (load ['saltenv' ]))
295
295
cache_match , refresh_cache , save_cache = \
296
- hubblestack .extmods . fileserver .check_file_list_cache (
296
+ hubblestack .fileserver .check_file_list_cache (
297
297
__opts__ , form , list_cache , w_lock
298
298
)
299
299
if cache_match is not None :
@@ -328,7 +328,7 @@ def _translate_sep(path):
328
328
continue
329
329
rel_path = _translate_sep (os .path .relpath (abs_path , fs_root ))
330
330
log .trace ('roots: %s relative path is %s' , abs_path , rel_path )
331
- if hubblestack .extmods . fileserver .is_file_ignored (__opts__ , rel_path ):
331
+ if hubblestack .fileserver .is_file_ignored (__opts__ , rel_path ):
332
332
continue
333
333
tgt .add (rel_path )
334
334
try :
@@ -390,7 +390,7 @@ def _translate_sep(path):
390
390
391
391
if save_cache :
392
392
try :
393
- hubblestack .extmods . fileserver .write_file_list_cache (
393
+ hubblestack .fileserver .write_file_list_cache (
394
394
__opts__ , ret , list_cache , w_lock
395
395
)
396
396
except NameError :
0 commit comments