20 lines
424 B
Python
Executable File
20 lines
424 B
Python
Executable File
#!/usr/bin/python
|
|
|
|
import sys
|
|
|
|
from charmhelpers.core import hookenv, host
|
|
|
|
from hooks.keystone_utils import services
|
|
|
|
|
|
def pause_service(service):
|
|
result = host.service_pause(service)
|
|
if not result:
|
|
hookenv.action_fail("Failed to pause service {}.".format(service))
|
|
return result
|
|
|
|
if __name__ == "__main__":
|
|
for service in services():
|
|
if not pause_service(service):
|
|
sys.exit(-1)
|