def restart_pg():
'''
Stops and Starts PLUMgrid service after flushing iptables.
'''
stop_pg()
service_start('plumgrid')
time.sleep(3)
if not service_running('plumgrid'):
if service_running('libvirt-bin'):
raise ValueError("plumgrid service couldn't be started")
else:
if service_start('libvirt-bin'):
time.sleep(8)
if not service_running('plumgrid') \
and not service_start('plumgrid'):
raise ValueError("plumgrid service couldn't be started")
else:
raise ValueError("libvirt-bin service couldn't be started")
status_set('active', 'Unit is ready')
评论列表
文章目录