compass.actions package

Submodules

compass.actions.poll_switch module

Poll switch to update the information fo the machines ‘ connected to the switch.

compass.actions.poll_switch.poll_switch(ip_addr, req_obj='mac', oper='SCAN')

Query switch and return expected result :param str ip_addr: switch ip address :param str req_obj: the object requested to query from switch :param str oper : the operation to query the switch(SCAN, GET, SET)

compass.actions.progress_update module

module to update progress bar of the given cluster.

compass.actions.progress_update.updateProgress(clusterid)

update progress bar for the given cluster.

Args:
clusterid: int, the id of the cluster.
Returns:
None.

The function should be called out of the database session scope. In the function, it will update the database cluster_state and host_state table. The frontend will get the updated instaling state and progress from the two tables. The function will also query log_progressing_history table to get the lastest installing progress and the position of log it has processed in the last run. The function uses these information to avoid recalculate the progress from the beginning of the log file. After the progress got updated, it stores the information to the log_progressing_history for next time run.

compass.actions.trigger_install module

module to trigger the install progress for a given cluster.

compass.actions.trigger_install.trigger_install(clusterid)

trigger installer to start install for a given cluster.

Args:
clusterid: int, the id of the cluster.
Returns:
None

Module contents