The deployer module¶
NotCheckingHostnameHTTPAdapter¶
-
class
marcodeployer.deployer.
NotCheckingHostnameHTTPAdapter
(pool_connections=10, pool_maxsize=10, max_retries=0, pool_block=False)[source]¶ A middleware that avoids the verification of the SSL Hostname field. Since the name of the client cannot be verified, it is simply not checked
Generously provided by Juan Luis Boya
BaseHandler¶
IndexHandler¶
LoginHandler¶
LogoutHandler¶
UploadAndDeployHandler¶
-
class
marcodeployer.deployer.
UploadAndDeployHandler
(application, request, **kwargs)[source]¶ Listens for POST requests and performs the deployment asynchronously.
-
deploy
(node, request, filename, command, user, folder='', idpolo='', tomcat='', overwrite='false')[source]¶ Performs the deployment asynchronously.
Parameters: node (str) – The IP address of the node :param
BaseHandler
request: The related POST request which invoked this method DeprecatedParameters: - filename (str) – The name of the file to upload
- command (str) – The command to execute after deployment
- user (str) – The name of the user who performs the request
- folder (str) – The deployment folder
- idpolo (str) – The id of the polo service to publish
- tomcat (str) – Specifies whether the file should be deployed as a tomcat service
- overwrite (str) – Specifies if the file can overwrite existing files
Returns: concurrent.future
A future that encapsulates the asynchronous execution
-
post
(*args, **kwargs)[source]¶ Receives a set of parameters through an asynchronous POST request:
- file : A binary stream of data which corresponds to a file uploaded by the user.
- folder : The folder where the file has to be stored
- tomcat : Specifies that the service is a Tomcat container and that it must be added to the offered services
- overwrite : If true, the file will overwrite a previous file with the same name
- command : A command to execute when after the deployment
- nodes : The nodes where the file and command are to be deployed
Writes a status code to the client in return
-
NodesHandler¶
-
class
marcodeployer.deployer.
NodesHandler
(application, request, **kwargs)[source]¶ Handler for the Polo websocket connection
-
check_origin
(origin)[source]¶ Overrides the parent method to return True for any request, since we are working without names.
See: check_origin
Returns: bool True
-