Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(14)  |  Call(8)  |  Derive(0)  |  Import(6)

src/s/l/slider-HEAD/slider-agent/src/main/python/agent/main.py   slider(Download)
import ProcessHelper
from Controller import Controller
from AgentConfig import AgentConfig
from NetUtil import NetUtil
 
 
  # Check for configuration file.
  agentConfig = AgentConfig(options.root_folder, options.log_folder, options.label)
  update_config_from_file(agentConfig)
 

src/s/l/slider-HEAD/slider-agent/src/main/python/agent/Controller.py   slider(Download)
from random import randint
 
from AgentConfig import AgentConfig
from Heartbeat import Heartbeat
from Register import Register
  logger.info('Starting Server RPC Thread: %s' % ' '.join(sys.argv))
 
  config = AgentConfig()
  collector = Controller(config)
  collector.start()

src/s/l/slider-HEAD/slider-agent/src/main/python/agent/Register.py   slider(Download)
import subprocess
import hostname
from AgentConfig import AgentConfig
 
 

src/s/l/slider-HEAD/slider-agent/src/main/python/agent/CustomServiceOrchestrator.py   slider(Download)
import pprint
import sys
from AgentConfig import AgentConfig
from AgentException import AgentException
from PythonExecutor import PythonExecutor

src/s/l/slider-HEAD/slider-agent/src/main/python/agent/ActionQueue.py   slider(Download)
 
from shell import shellRunner
from AgentConfig import AgentConfig
from CommandStatusDict import CommandStatusDict
from CustomServiceOrchestrator import CustomServiceOrchestrator

src/s/l/slider-HEAD/slider-agent/src/test/python/agent/TestPythonExecutor.py   slider(Download)
 
from PythonExecutor import PythonExecutor
from AgentConfig import AgentConfig
from mock.mock import MagicMock, patch
 
    """
    subproc_mock = self.Subprocess_mockup()
    executor = PythonExecutor("/tmp", AgentConfig("", ""))
    _, tmpoutfile = tempfile.mkstemp()
    _, tmperrfile = tempfile.mkstemp()
    """
    subproc_mock = self.Subprocess_mockup()
    executor = PythonExecutor("/tmp", AgentConfig("", ""))
    _, tmpoutfile = tempfile.mkstemp()
    _, tmperrfile = tempfile.mkstemp()
  def test_set_env_values(self, os_env_copy_mock, subprocess_mock, open_mock):
    actual_vars = {"someOther" : "value1"}
    executor = PythonExecutor("/tmp", AgentConfig("", ""))
    environment_vars = [("PYTHONPATH", "a:b")]
    os_env_copy_mock.return_value = actual_vars
  def test_execution_results(self):
    subproc_mock = self.Subprocess_mockup()
    executor = PythonExecutor("/tmp", AgentConfig("", ""))
    _, tmpoutfile = tempfile.mkstemp()
    _, tmperrfile = tempfile.mkstemp()