コード例 #1
0
ファイル: wlstoff.py プロジェクト: coiouhkc/wlstoff
def finish(domainPathName):
    print("Finishing")
    wlst.setOption('OverwriteDomain', 'true')
    print("	Writing Domain")
    wlst.writeDomain(domainPathName)
    print("	Done")
    print("	Closing template")
    wlst.closeTemplate()
    print("	Done")
    print("Done")
コード例 #2
0
def write_domain(domain_home):
    """
    Persist the newly created domain configuration to the provided location. This will automatically
    overwrite an existing domain at this location.
    :param domain_home: path location to write the domain and its configuration
    :raises: PyWLSTException: if a WLST error occurs
    """
    _method_name = 'write_domain'
    _logger.entering(domain_home, class_name=_class_name, method_name=_method_name)

    try:
        wlst.setOption('OverwriteDomain', 'true')
    except offlineWLSTException, e:
        pwe = exception_helper.create_pywlst_exception('WLSDPLY-00043', domain_home, e.getLocalizedMessage(), error=e)
        _logger.throwing(class_name=_class_name, method_name=_method_name, error=pwe)
        raise pwe
コード例 #3
0
def set_option(option, value):
    """
    Set the configuration for the indicated option to the provided value.

    :param option: domain option to set
    :param value: to which to set the option
    :raises: PyWLSTException: if a WLST error occurs
    """
    _method_name = 'set_option'
    _logger.entering(option, value, class_name=_class_name, method_name=_method_name)
    try:
        wlst.setOption(option, value)
    except (wlst.WLSTException, offlineWLSTException), e:
        pwe = exception_helper.create_pywlst_exception('WLSDPLY-00024', option, _get_exception_mode(e),
                                                       _format_exception(e), error=e)
        _logger.throwing(class_name=_class_name, method_name=_method_name, error=pwe)
        raise pwe