Python script error
Hi,
I am using below script. I am getting error any one check on it.
#!/usr/bin/python
def serverStatus(server):
serverBean = cmo.lookupServerLifeCycleRuntime(server)
serverState = serverBean.getState();
print ""
print "Instance: ", server," is in state: ", serverState
#If it's shutdown start.
if serverState in ('SHUTDOWN', 'UNKNOWN'):
start(instanceName, block='true')
connect('user','password','t3://localhost:7001')
domainRuntime()
cd('ServerRuntimes')
servers=domainRuntimeService.getServerRuntimes()
serverStatus(servers)
Error:TypeError: lookupServerLifeCycleRuntime(): 1st arg can't be coerced to String
//Thanks,
Grandhi.