Reputation: 21
For automation purpose i need to list all available scope present in the dropdown at the page of creating a new JMS providers.
My question is
Upvotes: 1
Views: 1028
Reputation: 5320
This snippet should help (depending on your next couple lines of code you might do a variant of this, but hoepfully it still helps):
CELL_NAME = AdminConfig.showAttribute(AdminConfig.list("Cell"), "name")
scopes = ["Cell", "Node", "Server", "ServerCluster"]
scopeList =[]
for scope in scopes:
scopeList = scopeList + AdminConfig.list(scope, AdminConfig.getid('/Cell:' +CELL_NAME)).split('\r\n')
Another shortcut of use might be to take something like the built in MQ provider which is available on all scopes and query that:
CELL_NAME = AdminConfig.showAttribute(AdminConfig.list("Cell"), "name")
print AdminConfig.list("JMSProvider", AdminConfig.getid('/Cell:' +CELL_NAME))
Upvotes: 1