test.py 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. from core import ConfigurationManager
  2. from core.NeuroneLauncher import NeuroneLauncher
  3. from core.OrderAnalyser import OrderAnalyser
  4. from core.OrderListener import OrderListener
  5. from neurons import Say
  6. from neurons.ansible_tasks.ansible_tasks import Ansible_tasks
  7. import logging
  8. logger = logging.getLogger()
  9. logger.setLevel(logging.DEBUG)
  10. # run command
  11. # order = "playbook"
  12. # order_analyser = OrderAnalyser(order)
  13. # order_analyser.start()
  14. # test ansible
  15. # tasks_file = "tasks.yml"
  16. # ansible_tasks = Ansible_tasks(tasks_file)
  17. # def test_multi_args(*args , **kwargs):
  18. # if kwargs is not None:
  19. # for key, value in kwargs.iteritems():
  20. # print "%s == %s" % (key, value)
  21. #
  22. #
  23. # conf = ConfigurationManager(brain_file_name="test.yml")
  24. #
  25. # brain = conf.brainLoader.get_config()
  26. # print brain
  27. #
  28. #
  29. # for el in brain:
  30. # print el["neurons"]
  31. #
  32. # neurons = el["neurons"]
  33. # for neuron in neurons:
  34. # NeuroneLauncher().start_neurone(neuron)
  35. #
  36. #
  37. # # test_multi_args(**el["neurons"][0]["say"])
  38. Say(message="bonjour monsieur")