Слушайте события на Windows Minion. солончак

Пример из документации:

      # Job on minion
import salt.utils.event

opts = salt.config.minion_config(salt.minion.DEFAULT_MINION_OPTS)
event = salt.utils.event.MinionEvent(opts)

for evdata in event.iter_events(match_type="regex", tag="custom/.*"):
    # do your processing here...
    ...

Я отправляю из основной соли '*' test.ping, и этот код ничего не возвращает. Я пытаюсь изменить MinionEvent на MasterEvent или SaltEvent или другие, тот же результат

      C:\Windows\system32>salt-call state.event pretty=True
c:\salt\bin\lib\site-packages\salt-3000.3-py3.7.egg\salt\ext\tornado\httputil.py:107: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  class HTTPHeaders(collections.MutableMapping):
[WARNING ] c:\salt\bin\lib\site-packages\salt-3000.3-py3.7.egg\salt\utils\dictdiffer.py:16: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Mapping

[WARNING ] [WinError 2] Не удается найти указанный файл (in english it means - file not found)

Эта команда тоже не возвращает результат и выводит предупреждения

      C:\Windows\system32>salt-call saltutil.running
c:\salt\bin\lib\site-packages\salt-3000.3-py3.7.egg\salt\ext\tornado\httputil.py:107: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  class HTTPHeaders(collections.MutableMapping):
[WARNING ] c:\salt\bin\lib\site-packages\salt-3000.3-py3.7.egg\salt\utils\dictdiffer.py:16: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Mapping

[WARNING ] [WinError 2] Не удается найти указанный файл
[WARNING ] c:\salt\bin\lib\site-packages\salt-3000.3-py3.7.egg\salt\utils\decorators\signature.py:31: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly
  *salt.utils.args.get_function_argspec(original_function)

[WARNING ] c:\salt\bin\lib\site-packages\salt-3000.3-py3.7.egg\salt\utils\oset.py:47: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  class OrderedSet(collections.MutableSet):

[WARNING ] c:\salt\bin\lib\site-packages\salt-3000.3-py3.7.egg\salt\utils\decorators\signature.py:31: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly
  *salt.utils.args.get_function_argspec(original_function)

[WARNING ] c:\salt\bin\lib\site-packages\salt-3000.3-py3.7.egg\salt\modules\file.py:32: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Iterable, Mapping, namedtuple

local:

Это результат другойкоманды

0 ответов

Другие вопросы по тегам