MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / set_node_ssh_conf

Method set_node_ssh_conf

mod/project/node/dbutil/node_db.py:261–266  ·  view source on GitHub ↗
(self, node_id: int, ssh_conf: dict, ssh_test: int=0)

Source from the content-addressed store, hash-verified

259 return ""
260
261 def set_node_ssh_conf(self, node_id: int, ssh_conf: dict, ssh_test: int=0):
262 pdata = {"ssh_conf": json.dumps(ssh_conf)}
263 if ssh_test:
264 pdata["ssh_test"] = 1
265 self.db.table('node').where('id=?', (node_id,)).update(pdata)
266 return
267
268 def remove_node_ssh_conf(self, node_id: int):
269 self.db.table('node').where('id=?', (node_id,)).update({"ssh_conf": "{}"})

Callers 2

set_ssh_confMethod · 0.80
monitor_node_onceFunction · 0.80

Calls 4

dumpsMethod · 0.45
updateMethod · 0.45
whereMethod · 0.45
tableMethod · 0.45

Tested by

no test coverage detected