The receiver module

DeployHandler

class marcodeployer.receiver.DeployHandler(application, request, **kwargs)[source]
post(*args, **kwargs)[source]

POST handler received from deployer.py. It handles the deployment of the file and the execution of the desired command.

LoggerHandler

class marcodeployer.receiver.LoggerHandler(application, request, **kwargs)[source]

Processes the logging messages

check_origin(origin)[source]

Overrides the parent method to return True for any request, since we are working without names

Returns:bool True
on_close()[source]

Removes the connection from the opensockets dictionary

on_line(user, command, message, ip, identifier, stop=False, stream_name='stdout', *args, **kwargs)[source]

The io_loop calls the function when a new message appears. :param str user: The name of the user :param str command: The command in execution :param str message: The message to deliver :param str ip: The ip of the server, so the client knows where the message comes from :param boolean stop: Determines if the connection must be closed or not deprecated :param str stream_name: The name of the stream

on_message(message)[source]

A message is sent by the client after creating the connection. The method verifies the user secret cookie and appends the connection to the opensockets dictionary.

Parameters:message (str) – The received message
open()[source]

Notifies the opening of a new Logger connection

ProbeWSHandler

class marcodeployer.receiver.ProbeWSHandler(application, request, **kwargs)[source]
check_origin(origin)[source]

Overrides the parent method to return True for any request, since we are working without names

Returns:bool True
open()[source]

Returns a confirmation message

ProbeHandler

class marcodeployer.receiver.ProbeHandler(application, request, **kwargs)[source]

SocketHandler

class marcodeployer.receiver.SocketHandler(application, request, **kwargs)[source]
check_origin(origin)[source]

Overrides the parent method to return True for any request, since we are working without names

Returns:bool True

Module methods

class marcodeployer.receiver.DeployHandler(application, request, **kwargs)[source]
execute(*args, **kwargs)[source]
post(*args, **kwargs)[source]

POST handler received from deployer.py. It handles the deployment of the file and the execution of the desired command.

class marcodeployer.receiver.LoggerHandler(application, request, **kwargs)[source]

Processes the logging messages

check_origin(origin)[source]

Overrides the parent method to return True for any request, since we are working without names

Returns:bool True
on_close()[source]

Removes the connection from the opensockets dictionary

on_line(user, command, message, ip, identifier, stop=False, stream_name='stdout', *args, **kwargs)[source]

The io_loop calls the function when a new message appears. :param str user: The name of the user :param str command: The command in execution :param str message: The message to deliver :param str ip: The ip of the server, so the client knows where the message comes from :param boolean stop: Determines if the connection must be closed or not deprecated :param str stream_name: The name of the stream

on_message(message)[source]

A message is sent by the client after creating the connection. The method verifies the user secret cookie and appends the connection to the opensockets dictionary.

Parameters:message (str) – The received message
open()[source]

Notifies the opening of a new Logger connection

class marcodeployer.receiver.ProbeHandler(application, request, **kwargs)[source]
get()[source]
class marcodeployer.receiver.ProbeWSHandler(application, request, **kwargs)[source]
check_origin(origin)[source]

Overrides the parent method to return True for any request, since we are working without names

Returns:bool True
open()[source]

Returns a confirmation message

class marcodeployer.receiver.ShellHandler(application, request, **kwargs)[source]
on_message(message)[source]
class marcodeployer.receiver.SocketHandler(application, request, **kwargs)[source]
check_origin(origin)[source]

Overrides the parent method to return True for any request, since we are working without names

Returns:bool True
on_close()[source]
open()[source]
send_data()[source]
send_update()[source]
marcodeployer.receiver.main(args=None)[source]

Creates the servers, initializes the logging facility, publishes the MarcoPolo services and starts the io_loop.

marcodeployer.receiver.process_data()[source]

Processes the statusmonitor data

marcodeployer.receiver.shutdown(signal, frame)[source]

Stops the application gracefully, closing all socket connections and unpublishing the MarcoPolo services.

marcodeployer.receiver.sigint_handler(signal, frame)[source]
marcodeployer.receiver.start_callback()[source]

Starts the collection callback

marcodeployer.receiver.stop_callback()[source]

If the number of open connections is zero, stops the collection callback of data.