我们从Python开源项目中,提取了以下50个代码示例,用于说明如何使用charmhelpers.core.host.service_stop()。
def reconfigure_services(self, *service_names): """ Update all files for one or more registered services, and, if ready, optionally restart them. If no service names are given, reconfigures all registered services. """ for service_name in service_names or self.services.keys(): if self.is_ready(service_name): self.fire_event('data_ready', service_name) self.fire_event('start', service_name, default=[ service_restart, manage_ports]) self.save_ready(service_name) else: if self.was_ready(service_name): self.fire_event('data_lost', service_name) self.fire_event('stop', service_name, default=[ manage_ports, service_stop]) self.save_lost(service_name)