Peach::Agent::ppprocess::Process Class Reference

portScanner More...

Inherits Peach::agent::Monitor.

List of all members.

Public Member Functions

def __init__
 Constructor of the monitor.
def PublisherCall
 Publisher call method.
def OnTestStarting
 On test starting.
def OnTestFinished
 On test finished.
def GetMonitorData
 Get monitor data.
def DetectedFault
 Detect fault.
def OnFault
 On fault.
def OnShutdown
 On shutdown.

Public Attributes

 actCommand
 Run activation command.
 StartOnCall
 Application should not be started at the beginning, but after publisher call.
 StartOnCallMethod
 We have already runned activation command, do not continue.
 ActivateOnRequest
 Set command that is used to activate the application.
 ActivatingCommand
 RunningOnPort
 This port is used to identify when application is already running.
 strangeExit
 CommandLine argument is mandatory.
 command
 Set command that starts the application.
 args
 pid
 Initialize parameters storing information about process.
 hProcess
 Check if there is any activation command still running.
 hThread
 dwProcessId
 dwThreadId
 myJob
 We will use Windows Jobs to handle complicated processes.

Private Member Functions

def _StopProcess
 Stop running process.
def _StartProcess
 Start process.
def _IsProcessRunning
 Is process running.


Detailed Description

portScanner

HotFuzz process monitor It handles basic process manipulation. Capable of handling also more complicated processes, like those which spawn child processes. General purpose is to control client application.


Member Function Documentation

def Peach::Agent::ppprocess::Process::__init__ (   self,
  args 
)

Constructor of the monitor.

Initializes monitor based on provided arguments. Arguments are provided as associative array. Items of this array can have following keys:

  • StartOnCall: application should not be started at the beginning, but after publisher call
  • ActivatingCommand: command that is used to activate the application
  • RunningOnPort: if application opens specific port during startup, this can be used to identify when application is already running
  • CommandLine: command that starts the application

def Peach::Agent::ppprocess::Process::_IsProcessRunning (   self  )  [private]

Is process running.

Tests if monitored process is running

def Peach::Agent::ppprocess::Process::_StartProcess (   self  )  [private]

Start process.

Starts process

def Peach::Agent::ppprocess::Process::_StopProcess (   self  )  [private]

Stop running process.

Stops monitored application

def Peach::Agent::ppprocess::Process::DetectedFault (   self  ) 

Detect fault.

Check if a fault was detected.

def Peach::Agent::ppprocess::Process::GetMonitorData (   self  ) 

Get monitor data.

Get information about occured fault

def Peach::Agent::ppprocess::Process::OnFault (   self  ) 

On fault.

Called when a fault was detected.

def Peach::Agent::ppprocess::Process::OnShutdown (   self  ) 

On shutdown.

Called when Agent is shutting down.

def Peach::Agent::ppprocess::Process::OnTestFinished (   self  ) 

On test finished.

Called right after a test.

def Peach::Agent::ppprocess::Process::OnTestStarting (   self  ) 

On test starting.

Called right before start of test.

def Peach::Agent::ppprocess::Process::PublisherCall (   self,
  method 
)

Publisher call method.

Called when proxy is already listening on client port and is ready to handle client requests. Method can call activation command or start application based on specified configuration.

Parameters:
method Method called by publisher


Member Data Documentation

Run activation command.

Set command that is used to activate the application.

Set command that starts the application.

Check if there is any activation command still running.

Check if we even have some possibly running process.

Create our process as suspended to prevent raise conditions.

Check if the process is running.

Terminate activation command. The are better ways how to terminate subprocess in higher versions of python Check if we even have some process to stop

Terminate Job of the process, so we can be sure that we also terminate any spawned child process We do not have any process running, so reinitialize appropriate variables

Add our process to our job Resume process from suspended state Set information about newly created process

We will use Windows Jobs to handle complicated processes.

Check if we have already a running process.

Create new Windows Job

Initialize parameters storing information about process.

This port is used to identify when application is already running.

Application should not be started at the beginning, but after publisher call.

We have already runned activation command, do not continue.

Just check if method used for starting application corresponds with the one specified in configuration

CommandLine argument is mandatory.

Change working directory to HotFuzz root directory for sake of relative paths Obsolete parameter


The documentation for this class was generated from the following file:

Generated on Sat Sep 4 18:13:54 2010 for HotFuzz by  doxygen 1.5.8