Skip to content

Commit 7af89dd

Browse files
authored
Merge pull request #33 from oracle/Issue#31-Add-filter-to-discover
Issue#31 Add filter feature to discover tool
2 parents 22da070 + 4958b7d commit 7af89dd

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

core/src/main/python/discover.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
from wlsdeploy.tool.discover.multi_tenant_discoverer import MultiTenantDiscoverer
3636
from wlsdeploy.tool.discover.resources_discoverer import ResourcesDiscoverer
3737
from wlsdeploy.tool.discover.topology_discoverer import TopologyDiscoverer
38+
from wlsdeploy.tool.util import filter_helper
3839
from wlsdeploy.util import wlst_helper
3940
from wlsdeploy.util import model_translator
4041
from wlsdeploy.util.cla_utils import CommandLineArgUtil
@@ -353,6 +354,16 @@ def __persist_model(model, model_context):
353354
return
354355

355356

357+
def __check_and_customize_model(model):
358+
_method_name = '__check_and_customize_model'
359+
__logger.entering(class_name=_class_name, method_name=_method_name)
360+
361+
if filter_helper.apply_filters(model.get_model(), "discover"):
362+
__logger.info('WLSDPLY-06014', _class_name=_class_name, method_name=_method_name)
363+
364+
__logger.exiting(class_name=_class_name, method_name=_method_name)
365+
366+
356367
def __log_and_exit(exit_code, _class_name, _method_name):
357368
"""
358369
Helper method to log the exiting message and call sys.exit()
@@ -404,6 +415,8 @@ def main():
404415
error=ex, class_name=_class_name, method_name=_method_name)
405416
__log_and_exit(CommandLineArgUtil.PROG_ERROR_EXIT_CODE, _class_name, _method_name)
406417

418+
__check_and_customize_model(model)
419+
407420
try:
408421
__persist_model(model, model_context)
409422
except TranslateException, ex:

core/src/main/resources/oracle/weblogic/deploy/messages/wlsdeploy_rb.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ WLSDPLY-06010={0} failed to clear the existing archive file at {1} of binaries:
405405
WLSDPLY-06011={0} failed to discover domain {1} at {2} : {3}
406406
WLSDPLY-06012={0} failed to persist the model to the archive file {1}: {2}
407407
WLSDPLY-06013={0} failed to create the archive file at {1}: {2}
408+
WLSDPLY-06014=Filters applied to the model
408409

409410

410411
# discoverer.py

0 commit comments

Comments
 (0)