The backend module¶
The NotCheckingHostnameHTTPAdapter class¶
The BaseHandler class¶
-
class
marcobootstrap.backend.backend.
BaseHandler
(application, request, **kwargs)¶ An extension of
tornado.web.RequestHandler
that decrypts a secure username cookie
The WebHandler class¶
The LoginHandler class¶
The LogoutHandler class¶
The ScheduledHandler class¶
The add_callback function¶
-
marcobootstrap.backend.backend.
add_callback
(future, callback, *args, **kwargs)¶ Adds and event to the
IOLoop
instance and binds it to the callback funcionParameters: - future (Future) – A future object where to extract information from
- callback (function) – The callback function
The Schedule class¶
-
class
marcobootstrap.backend.backend.
Schedule
(application, request, **kwargs)¶ Schedules operations to the nodes in the net
-
add_to_db
(operation_type, schedule_time, hosts, image=None)¶ Adds to the database a new operation entry with all the concerning information
Parameters: - operation_type (str) – An identifier for the kind of operation (reboot, update...)
- schedule_time (float) – A time represented in absolute milliseconds (starting on the epoch) that indicates the time of execution.
- hosts (list) – A list of the hosts where the operation is to be executed on
- image (string) – The OS image (only useful for update and similar operations)
-
deployed
(response, node)¶ Used as a callback for the POST process
-
post
(*args, **kwargs)¶ Processes a POST request with the operation parameters
-
The CancelHandler class¶
The run_async function¶
-
marcobootstrap.backend.backend.
run_async
(func)¶ A simple wrapper that allows a blocking function to work inside the tornado IOLoop :param function func: The blocking function :returns: An async_func callable
The longwait function¶
-
marcobootstrap.backend.backend.
longwait
(*args, **kwargs)¶ Performs a Marco request