MCPcopy Index your code
hub / github.com/SpaceNetLab/StarryNet / sn_Node_Init_Thread

Class sn_Node_Init_Thread

starrynet/sn_utils.py:212–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210
211# A thread designed for initializing constellation nodes.
212class sn_Node_Init_Thread(threading.Thread):
213
214 def __init__(self, remote_ssh, docker_service_name, node_size,
215 container_id_list, container_global_idx):
216 threading.Thread.__init__(self)
217 self.remote_ssh = remote_ssh
218 self.docker_service_name = docker_service_name
219 self.node_size = node_size
220 self.container_global_idx = container_global_idx
221 self.container_id_list = copy.deepcopy(container_id_list)
222
223 def run(self):
224
225 # Reset docker environment.
226 sn_reset_docker_env(self.remote_ssh, self.docker_service_name,
227 self.node_size)
228 # Get container list in each machine.
229 self.container_id_list = sn_get_container_info(self.remote_ssh)
230 # Rename all containers with the global idx
231 sn_rename_all_container(self.remote_ssh, self.container_id_list,
232 self.container_global_idx)
233
234
235def sn_get_container_info(remote_machine_ssh):

Callers 1

create_nodesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected