|
|
|
@ -14,7 +14,7 @@
|
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
import sys, os
|
|
|
|
|
|
|
|
|
|
from cl_print import color_print
|
|
|
|
|
from cl_datavars import DataVars
|
|
|
|
@ -44,12 +44,13 @@ class services(color_print):
|
|
|
|
|
def allServicesApi(self):
|
|
|
|
|
self.createClLibVars(clLibVars=self.clLibVars)
|
|
|
|
|
apiDict = self.clLibVars.Get('cl_api')
|
|
|
|
|
if not apiDict or not type(apiDict) in dict:
|
|
|
|
|
if not apiDict or not type(apiDict) is dict:
|
|
|
|
|
return []
|
|
|
|
|
apiFiles = apiDict.keys()
|
|
|
|
|
apiFiles = apiDict.values()
|
|
|
|
|
apiObjects = []
|
|
|
|
|
for apiFile in apiFiles:
|
|
|
|
|
importPath, moduleName = os.path.split(apiFile)
|
|
|
|
|
moduleName = moduleName.rpartition(".py")[0]
|
|
|
|
|
if not importPath in sys.path:
|
|
|
|
|
sys.path.insert(0, importPath)
|
|
|
|
|
try:
|
|
|
|
@ -71,9 +72,9 @@ class services(color_print):
|
|
|
|
|
def runMethodToAllServices(self, methodName, sortedServices="normal"):
|
|
|
|
|
"""Stopped all setup services"""
|
|
|
|
|
allServObjs = self.allServicesApi()
|
|
|
|
|
allSetupServObjs = filter(lambda x: x.isSetup(), allServObjs)
|
|
|
|
|
if allServObjs is False:
|
|
|
|
|
return False
|
|
|
|
|
allSetupServObjs = filter(lambda x: x.isSetup(), allServObjs)
|
|
|
|
|
|
|
|
|
|
def smpPrioritetReverse(objectA, objectB):
|
|
|
|
|
'''Comparison of the run priorities of objects
|
|
|
|
|