我有一个可以找到所有节点代理和Deployment Manager服务器的代码。
if scopetype == "nodeagent" or scopetype =="DeploymentManager":
members = AdminTask.listServers('[-serverType '+scopename+']').splitlines()
for member in members:
print(member)
此代码的结果是
nodeagent(cells/somecell01/nodes/somenode01/servers/nodeagent|server.xml)
nodeagent(cells/somecell01/nodes/somenode02/servers/nodeagent|server.xml)
dmgr(cells/somecell01/nodes/somenode01/servers/dmgr|server.xml)
问题是如何获取打印成员的节点名称(somenode01,somenode02)?