biemond/biemond-orawls

View on GitHub
files/providers/wls_jms_subdeployment/create_modify.py.erb

Summary

Maintainability
Test Coverage
# check the domain else we need to skip this (done in wls_access.rb)
real_domain='<%= domain %>'

wlst_action = '<%= wlst_action %>'

name               = '<%= subdeployment_name %>'
jmsmodule          = '<%= jmsmodule %>'
target             = '<%= target %>'
targettype         = '<%= targettype %>'

edit()
startEdit()

try:


    cd('/')
    cd('/SystemResources/'+jmsmodule)

    if wlst_action == 'create':
        cmo.createSubDeployment(name)

    cd('/SystemResources/'+jmsmodule+'/SubDeployments/'+name)

    targetList = target_list(String(target).split(","), String(targettype).split(","))
    set('Targets', targetList)

    save()
    activate()
    report_back_success()

except:
    report_back_error()