def __init__(self,
                 model_context,
                 base_location,
                 wlst_mode,
                 aliases=None,
                 variable_injector=None):
        """

        :param model_context: context about the model for this instance of discover domain
        :param base_location: to look for common weblogic resources. By default this is the global path or '/'
        """
        self._model_context = model_context
        self._base_location = base_location
        self._wlst_mode = wlst_mode
        if aliases:
            self._aliases = aliases
        else:
            self._aliases = Aliases(self._model_context,
                                    wlst_mode=self._wlst_mode)
        self._alias_helper = AliasHelper(self._aliases, _logger,
                                         ExceptionType.DISCOVER)
        self._variable_injector = variable_injector
        self._att_handler_map = OrderedDict()
        self._custom_folder = CustomFolderHelper(self._aliases, _logger,
                                                 self._model_context,
                                                 ExceptionType.DISCOVER,
                                                 self._variable_injector)
        self._weblogic_helper = WebLogicHelper(_logger)
        self._wlst_helper = WlstHelper(ExceptionType.DISCOVER)
        self._mbean_utils = MBeanUtils(self._model_context, self._alias_helper,
                                       ExceptionType.DISCOVER)
        self._wls_version = self._weblogic_helper.get_actual_weblogic_version()
Exemple #2
0
 def __init__(self,
              model_context,
              base_location,
              wlst_mode,
              aliases=None,
              credential_injector=None):
     """
     :param model_context: context about the model for this instance of discover domain
     :param base_location: to look for common weblogic resources. By default this is the global path or '/'
     :param wlst_mode: offline or online
     :param aliases: optional, aliases object to use
     :param credential_injector: optional, injector to collect credentials
     """
     self._model_context = model_context
     self._base_location = base_location
     self._wlst_mode = wlst_mode
     if aliases:
         self._aliases = aliases
     else:
         self._aliases = Aliases(self._model_context,
                                 wlst_mode=self._wlst_mode,
                                 exception_type=ExceptionType.DISCOVER)
     self._credential_injector = credential_injector
     self._att_handler_map = OrderedDict()
     self._custom_folder = CustomFolderHelper(self._aliases, _logger,
                                              self._model_context,
                                              ExceptionType.DISCOVER,
                                              self._credential_injector)
     self._weblogic_helper = WebLogicHelper(_logger)
     self._wlst_helper = WlstHelper(ExceptionType.DISCOVER)
     self._mbean_utils = MBeanUtils(self._model_context, self._aliases,
                                    ExceptionType.DISCOVER)
     self._wls_version = self._weblogic_helper.get_actual_weblogic_version()
    def setUp(self):
        arg_map = dict()
        arg_map[CLA.ORACLE_HOME_SWITCH] = '/my/path/to/oracle'
        arg_map[CLA.TARGET_MODE_SWITCH] = 'offline'

        self._model_context = ModelContext("test", arg_map)
        self._aliases = Aliases(model_context=self._model_context,
                                wlst_mode=WlstModes.OFFLINE,
                                wls_version=self._wls_version)
        self._custom_helper = CustomFolderHelper(self._aliases, self._logger,
                                                 self._model_context,
                                                 ExceptionType.DISCOVER)
        return