mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #28253 from rallytime/bp-28063
Back-port #28063 to 2015.8
This commit is contained in:
commit
acd2214c9d
13 changed files with 25 additions and 31 deletions
|
@ -59,8 +59,8 @@ else:
|
|||
_DFLT_MULTIPROCESSING_MODE = True
|
||||
|
||||
FLO_DIR = os.path.join(
|
||||
os.path.dirname(__file__),
|
||||
'daemons', 'flo')
|
||||
os.path.dirname(os.path.dirname(__file__)),
|
||||
'daemons', 'flo')
|
||||
|
||||
VALID_OPTS = {
|
||||
# The address of the salt master. May be specified as IP address or hostname
|
||||
|
|
|
@ -30,7 +30,7 @@ from salt.utils import kinds, is_windows
|
|||
from salt.utils.event import tagify
|
||||
|
||||
# Import ioflo libs
|
||||
from ioflo.base.odicting import odict
|
||||
from ioflo.aid.odicting import odict
|
||||
import ioflo.base.deeding
|
||||
|
||||
from ioflo.base.consoling import getConsole
|
||||
|
|
|
@ -11,7 +11,7 @@ from __future__ import absolute_import
|
|||
import os
|
||||
|
||||
# Import ioflo libs
|
||||
from ioflo.base.odicting import odict
|
||||
from ioflo.aid.odicting import odict
|
||||
|
||||
from ioflo.base.consoling import getConsole
|
||||
console = getConsole()
|
||||
|
|
|
@ -12,7 +12,7 @@ from collections import deque
|
|||
|
||||
# Import ioflo libs
|
||||
import ioflo.base.deeding
|
||||
from ioflo.base.odicting import odict
|
||||
from ioflo.aid.odicting import odict
|
||||
|
||||
from ioflo.base.consoling import getConsole
|
||||
console = getConsole()
|
||||
|
|
|
@ -12,7 +12,7 @@ from __future__ import absolute_import
|
|||
import os
|
||||
import stat
|
||||
|
||||
from ioflo.base.odicting import odict
|
||||
from ioflo.aid.odicting import odict
|
||||
from ioflo.base.consoling import getConsole
|
||||
console = getConsole()
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ from __future__ import print_function
|
|||
import os
|
||||
import stat
|
||||
|
||||
from ioflo.base.odicting import odict
|
||||
from ioflo.aid.odicting import odict
|
||||
from ioflo.base.consoling import getConsole
|
||||
console = getConsole()
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ import time
|
|||
import tempfile
|
||||
import shutil
|
||||
|
||||
from ioflo.base.odicting import odict
|
||||
from ioflo.base.aiding import Timer, StoreTimer
|
||||
from ioflo.aid.odicting import odict
|
||||
from ioflo.aid.timing import Timer, StoreTimer
|
||||
from ioflo.base import storing
|
||||
from ioflo.base.consoling import getConsole
|
||||
console = getConsole()
|
||||
|
|
|
@ -13,7 +13,7 @@ else:
|
|||
|
||||
from ioflo.base.consoling import getConsole
|
||||
console = getConsole()
|
||||
from ioflo.base.odicting import odict
|
||||
from ioflo.aid.odicting import odict
|
||||
from ioflo.test import testing
|
||||
|
||||
from raet.lane.stacking import LaneStack
|
||||
|
|
|
@ -19,8 +19,8 @@ import time
|
|||
import tempfile
|
||||
import shutil
|
||||
|
||||
from ioflo.base.odicting import odict
|
||||
from ioflo.base.aiding import Timer, StoreTimer
|
||||
from ioflo.aid.odicting import odict
|
||||
from ioflo.aid.timing import Timer, StoreTimer
|
||||
from ioflo.base import storing
|
||||
from ioflo.base.consoling import getConsole
|
||||
console = getConsole()
|
||||
|
|
|
@ -21,8 +21,8 @@ import time
|
|||
import tempfile
|
||||
import shutil
|
||||
|
||||
from ioflo.base.odicting import odict
|
||||
from ioflo.base.aiding import Timer, StoreTimer
|
||||
from ioflo.aid.odicting import odict
|
||||
from ioflo.aid.timing import Timer, StoreTimer
|
||||
from ioflo.base import storing
|
||||
from ioflo.base.consoling import getConsole
|
||||
console = getConsole()
|
||||
|
|
|
@ -10,10 +10,11 @@ if sys.version_info < (2, 7):
|
|||
import unittest2 as unittest
|
||||
else:
|
||||
import unittest
|
||||
import time
|
||||
|
||||
from ioflo.base.consoling import getConsole
|
||||
console = getConsole()
|
||||
from ioflo.base.odicting import odict
|
||||
from ioflo.aid.odicting import odict
|
||||
from ioflo.test import testing
|
||||
|
||||
from raet.abiding import ns2u
|
||||
|
@ -101,7 +102,7 @@ class StatsEventerTestCase(testing.FrameIofloTestCase):
|
|||
testStack = self.store.fetch('.salt.test.lane.stack')
|
||||
if testStack:
|
||||
testStack.value.server.close()
|
||||
|
||||
act.actor.road_stack.value.server.close()
|
||||
|
||||
def testMasterRoadStats(self):
|
||||
"""
|
||||
|
@ -156,7 +157,7 @@ class StatsEventerTestCase(testing.FrameIofloTestCase):
|
|||
testStack = self.store.fetch('.salt.test.lane.stack')
|
||||
if testStack:
|
||||
testStack.value.server.close()
|
||||
|
||||
time.sleep(0.1)
|
||||
|
||||
def testMasterLaneStats(self):
|
||||
"""
|
||||
|
@ -212,7 +213,6 @@ class StatsEventerTestCase(testing.FrameIofloTestCase):
|
|||
if testStack:
|
||||
testStack.value.server.close()
|
||||
|
||||
|
||||
def testMasterStatsWrongMissingTag(self):
|
||||
"""
|
||||
Test Master Stats requests with unknown and missing tag (A3, A4)
|
||||
|
@ -267,7 +267,6 @@ class StatsEventerTestCase(testing.FrameIofloTestCase):
|
|||
if testStack:
|
||||
testStack.value.server.close()
|
||||
|
||||
|
||||
def testMasterStatsUnknownRemote(self):
|
||||
"""
|
||||
Test Master Stats request with unknown remote (B1)
|
||||
|
@ -318,7 +317,6 @@ class StatsEventerTestCase(testing.FrameIofloTestCase):
|
|||
if testStack:
|
||||
testStack.value.server.close()
|
||||
|
||||
|
||||
def testMasterStatsNoRequest(self):
|
||||
"""
|
||||
Test Master Stats no requests (nothing to do) (B2)
|
||||
|
@ -365,7 +363,6 @@ class StatsEventerTestCase(testing.FrameIofloTestCase):
|
|||
if testStack:
|
||||
testStack.value.server.close()
|
||||
|
||||
|
||||
def testMinionContextSetup(self):
|
||||
"""
|
||||
Test the context setup procedure used in all the consequence tests works as expected
|
||||
|
@ -412,7 +409,7 @@ class StatsEventerTestCase(testing.FrameIofloTestCase):
|
|||
testStack = self.store.fetch('.salt.test.road.stack')
|
||||
if testStack:
|
||||
testStack.value.server.close()
|
||||
|
||||
act.actor.road_stack.value.server.close()
|
||||
|
||||
def testMinionRoadStats(self):
|
||||
"""
|
||||
|
@ -471,7 +468,6 @@ class StatsEventerTestCase(testing.FrameIofloTestCase):
|
|||
if testStack:
|
||||
testStack.value.server.close()
|
||||
|
||||
|
||||
def testMinionLaneStats(self):
|
||||
"""
|
||||
Test Minion Road Stats request (A2)
|
||||
|
@ -529,7 +525,6 @@ class StatsEventerTestCase(testing.FrameIofloTestCase):
|
|||
if testStack:
|
||||
testStack.value.server.close()
|
||||
|
||||
|
||||
def testMinionStatsWrongMissingTag(self):
|
||||
"""
|
||||
Test Minion Stats requests with unknown and missing tag (A3, A4)
|
||||
|
@ -586,7 +581,6 @@ class StatsEventerTestCase(testing.FrameIofloTestCase):
|
|||
if testStack:
|
||||
testStack.value.server.close()
|
||||
|
||||
|
||||
def testMinionStatsUnknownRemote(self):
|
||||
"""
|
||||
Test Minion Stats request with unknown remote (B1)
|
||||
|
@ -638,7 +632,6 @@ class StatsEventerTestCase(testing.FrameIofloTestCase):
|
|||
if testStack:
|
||||
testStack.value.server.close()
|
||||
|
||||
|
||||
def testMinionStatsNoRequest(self):
|
||||
"""
|
||||
Test Minion Stats no requests (nothing to do) (B2)
|
||||
|
@ -728,8 +721,8 @@ if __name__ == '__main__' and __package__ is None:
|
|||
|
||||
# console.reinit(verbosity=console.Wordage.concise)
|
||||
|
||||
runAll() # run all unittests
|
||||
#runAll() # run all unittests
|
||||
|
||||
# runSome() #only run some
|
||||
runSome() #only run some
|
||||
|
||||
# runOne('testMasterContextSetup')
|
||||
#runOne('testMasterLaneStats')
|
||||
|
|
|
@ -1020,7 +1020,8 @@ class LazyLoader(salt.utils.lazy.LazyDict):
|
|||
# if we do, we want it if we have a higher precidence ext
|
||||
else:
|
||||
curr_ext = self.file_mapping[f_noext][1]
|
||||
if suffix_order.index(ext) < suffix_order.index(curr_ext):
|
||||
#log.debug("****** curr_ext={0} ext={1} suffix_order={2}".format(curr_ext, ext, suffix_order))
|
||||
if curr_ext and suffix_order.index(ext) < suffix_order.index(curr_ext):
|
||||
self.file_mapping[f_noext] = (fpath, ext)
|
||||
except OSError:
|
||||
continue
|
||||
|
|
|
@ -18,7 +18,7 @@ except ImportError:
|
|||
from salt.utils.odict import OrderedDict
|
||||
|
||||
try:
|
||||
from ioflo.base.odicting import odict
|
||||
from ioflo.aid.odicting import odict
|
||||
HAS_IOFLO = True
|
||||
except ImportError:
|
||||
odict = None
|
||||
|
|
Loading…
Add table
Reference in a new issue