Skip to content

Commit 6900072

Browse files
Merge pull request #1042 from oracle/WDT-598-filter-confusing-message
Eliminate use of MBeanInfo for discovery
2 parents 66ac879 + e491684 commit 6900072

File tree

5 files changed

+18
-40
lines changed

5 files changed

+18
-40
lines changed

alias-test/pom.xml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
4-
The Universal Permissive License (UPL), Version 1.0
3+
Copyright (c) 2020, 2022, Oracle and/or its affiliates.
4+
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
55
-->
66
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
77
<modelVersion>4.0.0</modelVersion>
@@ -21,19 +21,8 @@
2121

2222
<dependencies>
2323
<dependency>
24-
<groupId>junit</groupId>
25-
<artifactId>junit</artifactId>
26-
<version>4.13.1</version>
27-
<scope>test</scope>
28-
</dependency>
29-
<dependency>
30-
<groupId>com.google.guava</groupId>
31-
<artifactId>guava</artifactId>
32-
<scope>test</scope>
33-
</dependency>
34-
<dependency>
35-
<groupId>commons-io</groupId>
36-
<artifactId>commons-io</artifactId>
24+
<groupId>org.junit.jupiter</groupId>
25+
<artifactId>junit-jupiter-engine</artifactId>
3726
<scope>test</scope>
3827
</dependency>
3928
</dependencies>

core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
Copyright (c) 2017, 2022, Oracle Corporation and/or its affiliates.
4-
The Universal Permissive License (UPL), Version 1.0
4+
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
55
-->
66
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
77
<modelVersion>4.0.0</modelVersion>

core/src/main/python/wlsdeploy/tool/discover/discoverer.py

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Copyright (c) 2017, 2021, Oracle Corporation and/or its affiliates.
2+
Copyright (c) 2017, 2022, Oracle Corporation and/or its affiliates.
33
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44
"""
55
import os
@@ -98,6 +98,7 @@ def _populate_model_parameters(self, dictionary, location):
9898
return
9999

100100
wlst_lsa_params = self._get_attributes_for_current_location(location)
101+
wlst_did_get = list()
101102
_logger.finest('WLSDPLY-06102', self._wlst_helper.get_pwd(), wlst_lsa_params, class_name=_class_name,
102103
method_name=_method_name)
103104
wlst_get_params = self._get_required_attributes(location)
@@ -107,6 +108,7 @@ def _populate_model_parameters(self, dictionary, location):
107108
for wlst_lsa_param in wlst_lsa_params:
108109
if wlst_lsa_param in wlst_get_params:
109110
success, wlst_value = self._get_attribute_value_with_get(wlst_lsa_param, wlst_path)
111+
wlst_did_get.append(wlst_lsa_param)
110112
if not success:
111113
continue
112114
else:
@@ -121,25 +123,13 @@ def _populate_model_parameters(self, dictionary, location):
121123

122124
self._add_to_dictionary(dictionary, location, wlst_lsa_param, wlst_value, wlst_path)
123125

124-
# These will come after the lsa / get params in the ordered dictionary
125-
wlst_extra_params = self._get_additional_parameters(location)
126-
_logger.finest('WLSDPLY-06149', str(location), wlst_extra_params,
127-
class_name=_class_name, method_name=_method_name)
128-
if wlst_extra_params is not None:
129-
for wlst_extra_param in wlst_extra_params:
130-
if wlst_extra_param in wlst_get_params:
131-
success, wlst_value = self._get_attribute_value_with_get(wlst_extra_param, wlst_path)
132-
if success:
133-
self._add_to_dictionary(dictionary, location, wlst_extra_param, wlst_value, wlst_path)
134-
else:
135-
_logger.info('WLSDPLY-06152', wlst_extra_param, location.get_folder_path(),
136-
class_name=_class_name, method_name=_method_name)
137-
elif self._is_defined_attribute(location, wlst_extra_param):
138-
_logger.info('WLSDPLY-06154', wlst_extra_param, location.get_folder_path(),
139-
class_name=_class_name, method_name=_method_name)
140-
else:
141-
_logger.info('WLSDPLY-06153', wlst_extra_param, location.get_folder_path(),
142-
class_name=_class_name, method_name=_method_name)
126+
# These will come after the lsa params in the ordered dictionary
127+
# Find the attributes that are not in the LSA wlst map but are in the alias definitions with GET access
128+
get_attributes = [get_param for get_param in wlst_get_params if not get_param in wlst_did_get]
129+
for get_attribute in get_attributes:
130+
success, wlst_value = self._get_attribute_value_with_get(wlst_extra_param, wlst_path)
131+
if success:
132+
self._add_to_dictionary(dictionary, location, wlst_extra_param, wlst_value, wlst_path)
143133

144134
def _get_attribute_value_with_get(self, wlst_get_param, wlst_path):
145135
_method_name = '_get_attribute_value_with_get'

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,8 +603,7 @@ WLSDPLY-06149=Additional attributes that are not in the LSA attributes for locat
603603
WLSDPLY-06150=Unable to determine if additional attributes are available for {0} at location {1} : {2}
604604
WLSDPLY-06151=Additional attribute {0} for model folder at location {1} requires getter on MBean instance
605605
WLSDPLY-06152=Attribute {0} for model folder at location {1} requires the CMO getter to retrieve the attribute value
606-
WLSDPLY-06153=Attribute {0} for model folder at location {1} is not in the lsa map and is not defined in the \
607-
alias definitions
606+
WLSDPLY-06153=Skipped discovery of attribute {0} for model folder at location {1} because {0} is not defined in the alias definitions
608607
WLSDPLY-06154=Attribute {0} for model folder at location {1} is not in the lsa map and is not defined with get \
609608
to retrieve the attribute value
610609
WLSDPLY-06155=Attribute {0} value at location {1} replaced by token {2}

installer/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
Copyright (c) 2017, 2022, Oracle Corporation and/or its affiliates. All rights reserved.
4-
The Universal Permissive License (UPL), Version 1.0
3+
Copyright (c) 2017, 2022, Oracle Corporation and/or its affiliates.
4+
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
55
-->
66
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
77
<modelVersion>4.0.0</modelVersion>

0 commit comments

Comments
 (0)