在wsadmin中,我想找到附加到特定JMSProvider
的{{1}}。但是,节点下有许多服务器,它们也有同名的提供程序。当我要求提供者列表时,我从当前节点获得一个,但也从所有子节点获得。
Node
无需解析ID,是否有一种方法可用于查找哪些wsadmin>print AdminConfig.list('Node')
MELW46K962S_node(cells/gmm_cell/nodes/MELW46K962S_node|node.xml#Node_1)
dmgr_node(cells/gmm_cell/nodes/dmgr_node|node.xml#Node_1)
wsadmin>print AdminConfig.list('JMSProvider', 'MELW46K962S_node(cells/gmm_cell/nodes/MELW46K962S_node|node.xml#Node_1)')
... excluding those providers with a different name ...
"WebSphere MQ JMS Provider(cells/gmm_cell/nodes/MELW46K962S_node/servers/app_01|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/gmm_cell/nodes/MELW46K962S_node/servers/profiled_app01|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/gmm_cell/nodes/MELW46K962S_node/servers/rep_01|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/gmm_cell/nodes/MELW46K962S_node/servers/rep_02|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/gmm_cell/nodes/MELW46K962S_node/servers/rep_03|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/gmm_cell/nodes/MELW46K962S_node/servers/server1|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/gmm_cell/nodes/MELW46K962S_node/servers/web_01|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/gmm_cell/nodes/MELW46K962S_node|resources.xml#builtin_mqprovider)"
属于该节点? (即最后一个,在这种情况下)。
答案 0 :(得分:2)
尝试使用AdminConfig.getId
代替AdminConfig.list
:
AdminConfig.getid("/Node:%s/JMSProvider:/" % nodename).splitlines()
请注意,在这种情况下,nodename
应该只是节点的名称(即MELW46K962S_node
),而不是AdminConfig.list('Node')
获取的节点的完整配置ID。 / p>