Configure a new URL using wsadmin

 

Using Jacl:


### Identify the parent ID and assign it to the URLParent variable.

set URLParent [$AdminConfig  getid  /Cell:cell/Node:node/URLProvider:URLProvider/]


### Identify the required attributes...
$AdminConfig required URL

### Set up the required attributes...
set name [list name URL1]
set spec [list spec "Put the spec here"]
set urlAttrs [list $name $spec]

###  Create a URL...
$AdminConfig create URL $URLParent $urlAttrs

$AdminConfig save

 

Using Jython:

### Identify the parent ID and assign it to the URLParent variable.

URLParent = AdminConfig.getid('/Cell:cell/Node:node/URLProvider:URLProvider/')
print URLParent


### Identify the required attributes...
print AdminConfig.required('URL')


### Set up the required attributes...
name = ['name', 'URL1']
spec = ['spec', "Put the spec here"]
urlAttrs = [name, spec]


###  Create a URL...
print AdminConfig.create('URL', URLParent, urlAttrs)


AdminConfig.save()