示例#1
0
def get_artifacts(adminurl,
                  user='******',
                  passwd='yIHj6oSGoRpl66muev5S'):
    '''Get the list of artifacs for a WebLogic Domain'''
    global __app_state_runtime__

    artifact_list = []
    library_list = []
    result = (artifact_list, library_list)

    try:
        connect(user, passwd, adminurl, timeout=200000)
    except Exception, _e:
        print 'Connection to', adminurl, 'failed'
        print _e
        return result
def connect(username, password, url):
    """
    Connect WLST to a Weblogic Server instance at the provided url with the provided credentials.
    :param username: Weblogic user name
    :param password: Weblogic password
    :param url: Weblogic Server URL
    :raises: PyWLSTException: if a WLST error occurs
    """
    _method_name = 'connect'
    _logger.entering(username, url, class_name=_class_name, method_name=_method_name)

    try:
        wlst.connect(username=username, password=password, url=url)
    except (wlst.WLSTException, offlineWLSTException), e:
        pwe = exception_helper.create_pywlst_exception('WLSDPLY-00047', username, url, _get_exception_mode(e),
                                                       _format_exception(e), error=e)
        _logger.throwing(class_name=_class_name, method_name=_method_name, error=pwe)
        raise pwe
示例#3
0
def connect(adminUser, password, url):
    wlst.connect(adminUser, password, url)
示例#4
0
import wlstModule as wlst    
from library.offline.wllib import *  # @UnusedWildImport

print 'starting the script ....'

# for local test use below...
username = '******'
password = '******'
url = 't3://localhost:7001'

sliceName = 'aServerSlice'

try:
    
    wlst.connect(username, password, url)

    wlst.edit()
    wlst.startEdit()
       
    print 'Sub Deployments...'
    #deleteJMSSubDeployment('JMSModule' + sliceName + '_SystemModule', sliceName + '_SubDeployment')
    print 'Sub Deployments...end.'

    print 'JMS Modules...' 
    deleteJMSModule('JMSModule' + sliceName + '_SystemModule')
    print 'JMS Modules...end.'

    print 'JMS Servers for every managed server...'
    deleteJMSServer('JMSServer' + sliceName)
    print 'JMS Servers for every managed server...end.'