@@ -78,7 +78,8 @@ def do_help(self, subcmd: str):
7878 cmd_help = [
7979 ("add" , r"<module ref> \[name]" , "adds a new node of type <module ref> to the network, if unset, name defaults to <module ref>" ),
8080 ("rm" , "<name>" , "removes a node from the network" ),
81- # ("init", "<name>", "initializes a node"),
81+ ("init" , "<name>" , "initializes a node" ),
82+ ("wipe-config" , "" , "wipes a node's configuration, including private key" ),
8283 ("wipe-cache" , "<name>" , "wipes a node's RID cache" ),
8384 ("wipe-logs" , "<name>" , "wipes a node's logs" ),
8485
@@ -91,12 +92,12 @@ def do_help(self, subcmd: str):
9192 ("start" , "<name>" , "starts a node in the background" ),
9293 ("stop" , "<name>" , "stops a running background node" ),
9394
94- ("list" , "" , "lists all nodes in the network" ),
95- ("modules" , "" , "lists all available node modules and their aliases" ),
95+ ("list" , "" , "lists all nodes in the network" )
9696 ]
9797 case "network" :
9898 cmd_help = [
9999 ("sync" , "" , "synchronizes the local environment with the network configuration" ),
100+ ("wipe-config" , "" , "wipes configuration, including private key, of all network nodes" ),
100101 ("wipe-cache" , "" , "wipes RID cache of all network nodes" ),
101102 ("wipe-logs" , "" , "wipes logs of all network nodes" ),
102103 ("status" , "" , "lists the current state of all network nodes" ),
@@ -135,10 +136,10 @@ def do_node(self, sub_cmd: str, *args):
135136 self .node_add (* args )
136137 case "rm" :
137138 self .node_rm (* args )
139+ case "init" :
140+ self .node_init (* args )
138141 case "list" :
139142 self .node_list (* args )
140- case "modules" :
141- self .module_list (* args )
142143 case "config-get" :
143144 self .node_config_get (* args )
144145 case "config-set" :
@@ -230,6 +231,11 @@ def node_rm(self, node: NodeInterface):
230231 return
231232
232233 self .network .remove_node (node )
234+
235+ @validate_args
236+ @load_node
237+ def node_init (self , node : NodeInterface ):
238+ node .init ()
233239
234240 @validate_args
235241 def node_list (self ):
@@ -309,6 +315,10 @@ def network_wipe_cache(self):
309315 @validate_args
310316 def network_wipe_logs (self ):
311317 self .network .wipe_logs ()
318+
319+ @validate_args
320+ def network_wipe_config (self ):
321+ self .network .wipe_config ()
312322
313323 @validate_args
314324 def network_status (self ):
0 commit comments