Search code examples
webspherejythonwebsphere-7wsadmin

Create URL resource with the scope to node


I'm creating the URL resorce on WebSphere 7 with the following Jython script:

AdminResources.createURL(node, server, urlProvider, 'MyUrl', 'url/MyUrl', '/my/url')

The problem is, the scope of new URL Resource is set to node+server. In Admin Console I can create URLs with scope set to cell, node or node+server. How can I set the scope of the new URL Resource from jython script?


Solution

  • use createURLAtScope , as example
    AdminResources.createURLAtScope("/Cell:AMYLIN4Cell01/ServerCluster:c1/", "myURLProvider", "myURL", "url1/myURL", "myURLSpec", [['category', 'myCategory'], ['description', 'this is my url']])

    check for more information http://pic.dhe.ibm.com/infocenter/wasinfo/v8r0/topic/com.ibm.websphere.express.doc/info/exp/ae/rxml_7libmail.html#rxml_7libmail__scr27