def resume(args): """Resume all the Glance services. @raises Exception if any services fail to start """ for service in services(): started = service_resume(service) if not started: raise Exception("{} didn't start cleanly.".format(service)) status_set("active", "")
def pause(args): """Pause all the Glance services. @raises Exception if any services fail to stop """ for service in services(): stopped = service_pause(service) if not stopped: raise Exception("{} didn't stop cleanly.".format(service)) status_set("maintenance", "Paused. Use 'resume' action to resume normal service.")
def resume(args): """Resume all the Glance services. @raises Exception if any services fail to start """ for service in services(): started = service_resume(service) if not started: raise Exception("{} didn't start cleanly.".format(service)) with HookData()(): kv().set('unit-paused', False) assess_status(CONFIGS)
def pause(args): """Pause all the Glance services. @raises Exception if any services fail to stop """ for service in services(): stopped = service_pause(service) if not stopped: raise Exception("{} didn't stop cleanly.".format(service)) with HookData()(): kv().set('unit-paused', True) assess_status(CONFIGS)