Skip to content

Commit e349793

Browse files
Jira wdt 292 source path in model (#609)
* Fix java.lang.Boolean issues for ActiveDirectoryAuthenticator * Add ROD to access type
1 parent f7e63e4 commit e349793

File tree

10 files changed

+56
-18
lines changed

10 files changed

+56
-18
lines changed

core/src/main/python/wlsdeploy/aliases/alias_constants.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@
6464
# set_method values
6565
MBEAN = 'MBEAN'
6666

67+
# ACCESS values
68+
RO = 'RO' # Read only
69+
ROD = 'ROD' # Read only but discover
70+
RW = 'RW' # Default Read WRITE
71+
6772
# attribute wlst_type values
6873
BOOLEAN = 'boolean'
6974
COMMA_DELIMITED_STRING = 'delimited_string[comma]'

core/src/main/python/wlsdeploy/aliases/aliases.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
from wlsdeploy.aliases.alias_constants import PREFERRED_MODEL_TYPE
4242
from wlsdeploy.aliases.alias_constants import PROPERTIES
4343
from wlsdeploy.aliases.alias_constants import RESTART_REQUIRED
44+
from wlsdeploy.aliases.alias_constants import RO
45+
from wlsdeploy.aliases.alias_constants import ROD
4446
from wlsdeploy.aliases.alias_constants import SET_MBEAN_TYPE
4547
from wlsdeploy.aliases.alias_constants import SET_METHOD
4648
from wlsdeploy.aliases.alias_constants import STRING
@@ -412,7 +414,7 @@ def get_wlst_attribute_name_and_value(self, location, model_attribute_name, mode
412414

413415
attribute_info = module_folder[ATTRIBUTES][model_attribute_name]
414416

415-
if attribute_info and not self.__is_model_attribute_read_only(location, attribute_info):
417+
if attribute_info and not self.__is_wlst_attribute_read_only(location, attribute_info):
416418
wlst_attribute_name = attribute_info[WLST_NAME]
417419

418420
if self._model_context and USES_PATH_TOKENS in attribute_info and \
@@ -493,7 +495,7 @@ def get_wlst_attribute_name(self, location, model_attribute_name, check_read_onl
493495
wlst_attribute_name = None
494496
alias_attr_dict = self._alias_entries.get_alias_attribute_entry_by_model_name(location, model_attribute_name)
495497
if alias_attr_dict is not None and (not check_read_only or not
496-
self.__is_model_attribute_read_only(location, alias_attr_dict)):
498+
self.__is_wlst_attribute_read_only(location, alias_attr_dict)):
497499
if WLST_NAME in alias_attr_dict:
498500
wlst_attribute_name = alias_attr_dict[WLST_NAME]
499501
else:
@@ -1252,14 +1254,30 @@ def __is_model_attribute_read_only(self, location, attribute_info):
12521254
"""
12531255
_method_name = '__is_model_attribute_read_only'
12541256
rtnval = False
1255-
if ACCESS in attribute_info and attribute_info[ACCESS] in ('RO', 'VO'):
1257+
if ACCESS in attribute_info and attribute_info[ACCESS] == RO:
12561258
self._logger.finer('WLSDPLY-08409', attribute_info[MODEL_NAME], location.get_folder_path(),
12571259
WlstModes.from_value(self._wlst_mode),
12581260
class_name=self._class_name, method_name=_method_name)
12591261
rtnval = True
12601262

12611263
return rtnval
12621264

1265+
def __is_wlst_attribute_read_only(self, location, attribute_info):
1266+
"""
1267+
Is the wlst attribute read-only?
1268+
:param location: the location
1269+
:param attribute_info: the attribute tuple
1270+
:return: True if the attribute is read-only, False otherwise
1271+
"""
1272+
_method_name = '__is_wlst_attribute_read_only'
1273+
rtnval = False
1274+
if ACCESS in attribute_info and attribute_info[ACCESS] in (RO, ROD):
1275+
self._logger.finer('WLSDPLY-08411', attribute_info[MODEL_NAME], location.get_folder_path(),
1276+
WlstModes.from_value(self._wlst_mode),
1277+
class_name=self._class_name, method_name=_method_name)
1278+
rtnval = True
1279+
1280+
return rtnval
12631281

12641282
def _convert_to_string(value):
12651283
if type(value) in [str, unicode]:

core/src/main/python/wlsdeploy/aliases/model_constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
DOMAIN_INFO_ALIAS = 'DomainInfo'
101101
DOMAIN_LIBRARIES = 'domainLibraries'
102102
DOMAIN_SCRIPTS = 'domainBin'
103+
DOMAIN_VERSION = 'DomainVersion'
103104
DYNAMIC_SERVERS = 'DynamicServers'
104105
EMBEDDED_LDAP = 'EmbeddedLDAP'
105106
ERROR_DESTINATION = 'ErrorDestination'

core/src/main/resources/oracle/weblogic/deploy/aliases/category_modules/AppDeployment.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"AbsolutePlanDir": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "AbsolutePlanDir", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "access": "RO", "uses_path_tokens": "true" } ],
1313
"AbsolutePlanPath": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "AbsolutePlanPath", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "access": "RO", "uses_path_tokens": "true" } ],
1414
"AbsoluteSourcePath": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "AbsoluteSourcePath", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "access": "RO", "uses_path_tokens": "true" } ],
15-
"AltDescriptorDir": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "AltDescriptorDir", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "access": "RO", "uses_path_tokens": "true" } ],
15+
"AltDescriptorDir": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "AltDescriptorDir", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "access": "ROD", "uses_path_tokens": "true" } ],
1616
"AltDescriptorPath": [ {"version": "[10,)", "wlst_mode": "offline", "wlst_name": "AltDescriptorPath", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "uses_path_tokens": "true" } ],
1717
"AltWLSDescriptorPath": [ {"version": "[10,10.3.6)", "wlst_mode": "offline", "wlst_name": "AltWlsDescriptorPath", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "uses_path_tokens": "true" },
1818
{"version": "[10.3.6,)", "wlst_mode": "offline", "wlst_name": "AltWLSDescriptorPath", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "uses_path_tokens": "true" } ],
@@ -42,13 +42,13 @@
4242
"ParallelDeployModules": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "ParallelDeployModules", "wlst_path": "WP001", "value": {"default": "false"}, "wlst_type": "boolean" } ],
4343
"PartitionName": [ {"version": "[12.2.1,)", "wlst_mode": "online", "wlst_name": "PartitionName", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" , "get_method": "GET", "access": "RO" } ],
4444
"PlanDir": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "PlanDir", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "access": "${:RO}", "uses_path_tokens": "true" } ],
45-
"PlanPath": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "PlanPath", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "access": "${:RO}", "uses_path_tokens": "true" } ],
46-
"PlanStagingMode": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "PlanStagingMode", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "access": "${:RO}"} ],
45+
"PlanPath": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "PlanPath", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "access": "${:ROD}", "uses_path_tokens": "true" } ],
46+
"PlanStagingMode": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "PlanStagingMode", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "access": "${:ROD}"} ],
4747
"RootStagingDir": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "RootStagingDir", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "GET", "uses_path_tokens": "true", "access": "RO" } ],
48-
"SecurityDDModel": [ {"version": "[10,12.1.2)", "wlst_mode": "both", "wlst_name": "Security${Dd:DD}Model", "wlst_path": "WP001", "value": {"default": "DDOnly"}, "wlst_type": "string", "access": "${:RO}" },
49-
{"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "SecurityDDModel", "wlst_path": "WP001", "value": {"default": "DDOnly"}, "wlst_type": "string", "access": "${:RO}" }],
50-
"SourcePath": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "SourcePath", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "uses_path_tokens": "true" } ],
51-
"StagingMode": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "StagingMode", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "access": "${:RO}" }],
48+
"SecurityDDModel": [ {"version": "[10,12.1.2)", "wlst_mode": "both", "wlst_name": "Security${Dd:DD}Model", "wlst_path": "WP001", "value": {"default": "DDOnly"}, "wlst_type": "string", "access": "${:ROD}" },
49+
{"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "SecurityDDModel", "wlst_path": "WP001", "value": {"default": "DDOnly"}, "wlst_type": "string", "access": "${:ROD}" }],
50+
"SourcePath": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "SourcePath", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "access": "${:ROD}", "uses_path_tokens": "true" } ],
51+
"StagingMode": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "StagingMode", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "access": "${:ROD}" }],
5252
"Target": [ {"version": "[10,)", "wlst_mode": "offline", "wlst_name": "Target", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "delimited_string" },
5353
{"version": "[10,)", "wlst_mode": "online", "wlst_name": "Targets", "wlst_path": "WP002", "value": {"default": "None" }, "wlst_type": "jarray", "get_method": "GET", "preferred_model_type": "delimited_string", "set_method": "MBEAN.set_target_mbeans", "set_mbean_type": "weblogic.management.configuration.TargetMBean"} ],
5454
"Untargeted": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Untargeted", "wlst_path": "WP001", "value": {"default": "false"}, "wlst_type": "boolean" }],

core/src/main/resources/oracle/weblogic/deploy/aliases/category_modules/Domain.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"DbPassiveMode": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "${Db:DB}PassiveMode", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
2626
"DbPassiveModeGracePeriodSeconds": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "${Db:DB}PassiveModeGracePeriodSeconds", "wlst_path": "WP001", "value": {"default": 30 }, "wlst_type": "integer" } ],
2727
"DiagnosticContextCompatibilityModeEnabled": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "DiagnosticContextCompatibilityModeEnabled", "wlst_path": "WP001", "value": {"default": "true" }, "wlst_type": "boolean" } ],
28-
"DomainVersion": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DomainVersion", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "access": "RO"} ],
28+
"DomainVersion": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DomainVersion", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "access": "ROD"} ],
2929
"EnableEeCompliantClassloadingForEmbeddedAdapters": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Enable${Ee:EE}CompliantClassloadingForEmbeddedAdapters", "wlst_path": "WP001", "value": {"default": "${false:true}" }, "wlst_type": "boolean", "get_method": "LSA" } ],
3030
"ExalogicOptimizationsEnabled": [ {"version": "[10.3.4,)", "wlst_mode": "both", "wlst_name": "ExalogicOptimizationsEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean", "restart_required": "true" } ],
3131
"GuardianEnabled": [ {"version": "[10,12.2.1.3)", "wlst_mode": "both", "wlst_name": "GuardianEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ,

0 commit comments

Comments
 (0)