[WIP] frappy(): show all servers config

This commit is contained in:
2023-10-16 11:39:19 +02:00
parent c2473d9e51
commit ed983d36ae

View File

@ -299,7 +299,7 @@ class FrappyConfig(Device):
raise TypeError('got multiple values for addons')
addons = ','.join(alist)
elif main is None and stick is None and addons is None: # bare frappy() command
self.show_config(self.check_services())
self.show_config(self.check_services(), True)
return
if confirmed and confirmed != main and main not in (None, 'restart') and not force:
session.log.warning('%r is plugged to the cryostat control rack', confirmed)
@ -308,7 +308,7 @@ class FrappyConfig(Device):
raise TypeError('refuse to override plugged device')
self.show_config(self.start_services(main, stick, addons))
def show_config(self, allcfg):
def show_config(self, allcfg, full=False):
proposed, overview = self.to_consider(allcfg)
# remove 'frappy_changed()' commands in script queue
controller = session.daemon_device._controller
@ -322,6 +322,8 @@ class FrappyConfig(Device):
session.log.info(info)
if '?' in info:
session.log.warning("but create cfg files first for items marked with '?'")
if full:
session.log.info('\n' + '\n'.join(overview))
def initial_restart_cfg(self, service):
"""get cfg for (re)start of the service