mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
23 lines
773 B
Plaintext
Executable File
23 lines
773 B
Plaintext
Executable File
from cloudutils.syscfg import sysConfigFactory
|
|
from cloudutils.utilities import initLoging
|
|
from cloudutils.cloudException import CloudRuntimeException, CloudInternalException
|
|
from cloudutils.globalEnv import globalEnv
|
|
if __name__ == '__main__':
|
|
initLoging("/var/log/cloud/setupManagement.log")
|
|
glbEnv = globalEnv()
|
|
|
|
glbEnv.mode = "Server"
|
|
|
|
print "Starting to configure CloudStack Management Server:"
|
|
syscfg = sysConfigFactory.getSysConfigFactory(glbEnv)
|
|
try:
|
|
syscfg.config()
|
|
print "CloudStack Management Server setup is Done!"
|
|
except (CloudRuntimeException, CloudInternalException), e:
|
|
print e
|
|
print "Try to restore your system:"
|
|
try:
|
|
syscfg.restore()
|
|
except:
|
|
pass
|