mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
removing use of salt.utils
This commit is contained in:
parent
23fb0fa44e
commit
5e4f36a6ed
@ -7,9 +7,8 @@ import logging
|
||||
import os
|
||||
import time
|
||||
import yaml
|
||||
import collections
|
||||
try:
|
||||
import salt.utils
|
||||
# import salt.utils
|
||||
import salt.client
|
||||
import salt.exceptions
|
||||
except ImportError:
|
||||
@ -124,8 +123,7 @@ def run_highstate_tests():
|
||||
salt '*' salt_check.run_highstate_tests
|
||||
'''
|
||||
states = _get_top_states()
|
||||
#all_states = {}
|
||||
all_states = collections.OrderedDict()
|
||||
all_states = {}
|
||||
for sta in states:
|
||||
log.info("State Name = {}".format(sta))
|
||||
all_states.update(run_state_tests(sta))
|
||||
@ -208,8 +206,8 @@ class SaltCheck(object):
|
||||
# log.info("modules are: {}".format(self.modules))
|
||||
# self.salt_lc = salt.client.Caller(mopts=__opts__)
|
||||
self.salt_lc = salt.client.Caller()
|
||||
if self.auto_update_master_cache:
|
||||
update_master_cache()
|
||||
# if self.auto_update_master_cache:
|
||||
# update_master_cache()
|
||||
|
||||
def __is_valid_test(self, test_dict):
|
||||
'''Determine if a test contains:
|
||||
@ -481,7 +479,8 @@ class StateTestLoader(object):
|
||||
loads in one test file
|
||||
'''
|
||||
try:
|
||||
with salt.utils.files.fopen(filepath, 'r') as myfile:
|
||||
# with salt.utils.files.fopen(filepath, 'r') as myfile:
|
||||
with open(filepath, 'r') as myfile:
|
||||
contents_yaml = yaml.load(myfile)
|
||||
for key, value in contents_yaml.items():
|
||||
self.test_dict[key] = value
|
||||
|
Loading…
Reference in New Issue
Block a user