Skip to content

Commit 153cec1

Browse files
authored
Merge pull request #83 from oracle/Issue#39-Partition-alias-JSON-file-update
Issue#39 partition alias json file update
2 parents 7a6494b + 4c98a05 commit 153cec1

File tree

2 files changed

+221
-1
lines changed

2 files changed

+221
-1
lines changed

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

Lines changed: 152 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,158 @@
380380
"wlst_paths": {
381381
"WP001": "/Partition${:s}/%PARTITION%/WebService/%WEBSERVICE%"
382382
}
383+
},
384+
"ResourceManager": {
385+
"wlst_type": "ResourceManager",
386+
"version": "[12.2.1,)",
387+
"child_folders_type": "multiple",
388+
"folders": {
389+
"CpuUtilization": {
390+
"wlst_type": "CpuUtilization",
391+
"version": "[12.2.1,)",
392+
"child_folders_type": "single_unpredictable",
393+
"default_name_value": "${NO_NAME_0:CpuTimeResource}",
394+
"folders": {
395+
"FairShareConstraint": {
396+
"wlst_type": "FairShareConstraint",
397+
"version": "[12.2.1,)",
398+
"child_folders_type": "single_unpredictable",
399+
"default_name_value": "${NO_NAME_0:CpuUtilizationFairShareConstraint}",
400+
"folders": { },
401+
"attributes": {
402+
"Notes": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
403+
"Value": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Value", "wlst_path": "WP001", "value": {"default": 50 }, "wlst_type": "integer"} ]
404+
},
405+
"wlst_attributes_path": "WP001",
406+
"wlst_paths": {
407+
"WP001": "/Partition${:s}/%PARTITION%/ResourceManager/%RESOURCEMANAGER%/CpuUtilization/%CPUUTIL%/FairShareConstraint/%FAIRSHARE%"
408+
}
409+
},
410+
"Trigger": {
411+
"wlst_type": "Trigger${:s}",
412+
"version": "[12.2.1,)",
413+
"child_folders_type": "multiple",
414+
"folders": { },
415+
"attributes": {
416+
"Action": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Action", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string"} ],
417+
"Notes": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string"} ],
418+
"Value": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Value", "wlst_path": "WP001", "value": {"default": 0 }, "wlst_type": "long" } ]
419+
},
420+
"wlst_attributes_path": "WP001",
421+
"wlst_paths": {
422+
"WP001": "/Partition${:s}/%PARTITION%/ResourceManager/%RESOURCEMANAGER%/CpuUtilization/%CPUUTIL%/Trigger${:s}/%TRIGGER%"
423+
}
424+
}
425+
},
426+
"attributes": {
427+
"Notes": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string"} ]
428+
},
429+
"wlst_attributes_path": "WP001",
430+
"wlst_paths": {
431+
"WP001": "/Partition${:s}/%PARTITION%/ResourceManager/%RESOURCEMANAGER%/CpuUtilization/%CPUUTIL%"
432+
}
433+
},
434+
"FileOpen": {
435+
"wlst_type": "FileOpen",
436+
"version": "[12.2.1,)",
437+
"child_folders_type": "single_unpredictable",
438+
"default_name_value": "${NO_NAME_0:FileOpenResource}",
439+
"folders": {
440+
"Trigger": {
441+
"wlst_type": "Trigger${:s}",
442+
"version": "[12.2.1,)",
443+
"child_folders_type": "multiple",
444+
"folders": { },
445+
"attributes": {
446+
"Action": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Action", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string"} ],
447+
"Notes": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string"} ],
448+
"Value": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Value", "wlst_path": "WP001", "value": {"default": 0 }, "wlst_type": "long" } ]
449+
},
450+
"wlst_attributes_path": "WP001",
451+
"wlst_paths": {
452+
"WP001": "/Partition${:s}/%PARTITION%/ResourceManager/%RESOURCEMANAGER%/FileOpen/%FILEOPEN%/Trigger${:s}/%TRIGGER%"
453+
}
454+
}
455+
},
456+
"attributes": {
457+
"Notes": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string"} ]
458+
},
459+
"wlst_attributes_path": "WP001",
460+
"wlst_paths": {
461+
"WP001": "/Partition${:s}/%PARTITION%/ResourceManager/%RESOURCEMANAGER%/FileOpen/%FILEOPEN%"
462+
}
463+
},
464+
"HeapRetained": {
465+
"wlst_type": "HeapRetained",
466+
"version": "[12.2.1,)",
467+
"child_folders_type": "single_unpredictable",
468+
"default_name_value": "${NO_NAME_0:HeapRetainedResource}",
469+
"folders": {
470+
"FairShareConstraint": {
471+
"wlst_type": "FairShareConstraint",
472+
"version": "[12.2.1,)",
473+
"child_folders_type": "single_unpredictable",
474+
"default_name_value": "${NO_NAME_0:HeapRetainedFairShareConstraint}",
475+
"folders": { },
476+
"attributes": {
477+
"Notes": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
478+
"Value": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Value", "wlst_path": "WP001", "value": {"default": 0 }, "wlst_type": "integer"} ]
479+
},
480+
"wlst_attributes_path": "WP001",
481+
"wlst_paths": {
482+
"WP001": "/Partition${:s}/%PARTITION%/ResourceManager/%RESOURCEMANAGER%/HeapRetained/%HEAPRETAIN%/FairShareConstraint/%FAIRSHARE%"
483+
}
484+
},
485+
"Trigger": {
486+
"wlst_type": "Trigger${:s}",
487+
"version": "[12.2.1,)",
488+
"child_folders_type": "multiple",
489+
"folders": { },
490+
"attributes": {
491+
"Action": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Action", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string"} ],
492+
"Notes": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string"} ],
493+
"Value": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Value", "wlst_path": "WP001", "value": {"default": 0 }, "wlst_type": "long" } ]
494+
},
495+
"wlst_attributes_path": "WP001",
496+
"wlst_paths": {
497+
"WP001": "/Partition${:s}/%PARTITION%/ResourceManager/%RESOURCEMANAGER%/HeapRetained/%HEAPRETAIN%/Trigger${:s}/%TRIGGER%"
498+
}
499+
}
500+
},
501+
"attributes": {
502+
"Notes": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string"} ]
503+
},
504+
"wlst_attributes_path": "WP001",
505+
"wlst_paths": {
506+
"WP001": "/Partition${:s}/%PARTITION%/ResourceManager/%RESOURCEMANAGER%/HeapRetained/%HEAPRETAIN%"
507+
}
508+
},
509+
"RestartLoopProtection": {
510+
"wlst_type": "RestartLoopProtection",
511+
"version": "[12.2.1,)",
512+
"child_folders_type": "single_unpredictable",
513+
"default_name_value": "${NO_NAME_0:%RESOURCEMANAGER%}",
514+
"folders": { },
515+
"attributes": {
516+
"MaxRestartAllowed": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "MaxRestartAllowed", "wlst_path": "WP001", "value": {"default": 0 }, "wlst_type": "long" } ],
517+
"MaxRestartAllowedInterval": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "MaxRestartAllowedInterval", "wlst_path": "WP001", "value": {"default": 0 }, "wlst_type": "long" } ],
518+
"Notes": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
519+
"RestartDelay": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "RestartDelay", "wlst_path": "WP001", "value": {"default": 0 }, "wlst_type": "long" } ],
520+
"RestartLoopProtectionEnabled": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "RestartLoopProtectionEnabled", "wlst_path": "WP001", "value": {"default": "false"}, "wlst_type": "boolean" } ]
521+
},
522+
"wlst_attributes_path": "WP001",
523+
"wlst_paths": {
524+
"WP001": "/Partition${:s}/%PARTITION%/ResourceManager/%RESOURCEMANAGER%/RestartLoopProtection/%RESTARTLOOP%"
525+
}
526+
}
527+
},
528+
"attributes": {
529+
"Notes": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string"} ]
530+
},
531+
"wlst_attributes_path": "WP001",
532+
"wlst_paths": {
533+
"WP001": "/Partition${:s}/%PARTITION%/ResourceManager/%RESOURCEMANAGER%"
534+
}
383535
}
384536
},
385537
"attributes": {
@@ -417,7 +569,6 @@
417569
},
418570
"contains": [
419571
"ResourceGroup",
420-
"ResourceManager",
421572
"SelfTuning"
422573
]
423574
}

core/src/test/python/aliases_test.py

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,75 @@ def testIssue38Fix(self):
11141114

11151115
return
11161116

1117+
def testIssue39Fix(self):
1118+
location = LocationContext().append_location(FOLDERS.PARTITION)
1119+
token = self.aliases.get_name_token(location)
1120+
location.add_name_token(token, 'Partition-0')
1121+
1122+
# Check offline value of wlst_mbean_type of FOLDERS.PARTITION
1123+
wlst_mbean_type = self.aliases.get_wlst_mbean_type(location)
1124+
expected = FOLDERS.PARTITION
1125+
self.assertEqual(wlst_mbean_type, expected)
1126+
1127+
# Check online value of wlst_mbean_type of FOLDERS.PARTITION.
1128+
# There should be an 's' on the end of FOLDERS.PARTITION
1129+
wlst_mbean_type = self.online_aliases.get_wlst_mbean_type(location)
1130+
expected = '%ss' % FOLDERS.PARTITION
1131+
self.assertEqual(wlst_mbean_type, expected)
1132+
1133+
# Add FOLDERS.RESOURCE_MANAGER to the location
1134+
location.append_location(FOLDERS.RESOURCE_MANAGER)
1135+
token = self.aliases.get_name_token(location)
1136+
location.add_name_token(token, 'ResourceManager-0')
1137+
1138+
# Check offline value of wlst_mbean_type after adding
1139+
# FOLDERS.RESOURCE_MANAGER to the location. There
1140+
# should not be an 's' on the end of FOLDERS.RESOURCE_MANAGER
1141+
wlst_mbean_type = self.aliases.get_wlst_mbean_type(location)
1142+
expected = FOLDERS.RESOURCE_MANAGER
1143+
self.assertEqual(wlst_mbean_type, expected)
1144+
1145+
# Check online value of wlst_mbean_type after adding
1146+
# FOLDERS.RESOURCE_MANAGER to the location. It
1147+
# should be the same value as offline; no 's' on the
1148+
# end of FOLDERS.RESOURCE_MANAGER
1149+
wlst_mbean_type = self.online_aliases.get_wlst_mbean_type(location)
1150+
self.assertEqual(wlst_mbean_type, expected)
1151+
1152+
# Check offline value of wlst_list_path after adding
1153+
# FOLDERS.RESOURCE_MANAGER to the location. There
1154+
# should not be an 's' on the end of FOLDERS.PARTITION or
1155+
# FOLDERS.RESOURCE_MANAGER
1156+
expected = [FOLDERS.PARTITION, 'Partition-0', FOLDERS.RESOURCE_MANAGER]
1157+
wlst_list_path = self.aliases.get_wlst_list_path(location)
1158+
self.assertEqual(wlst_list_path, '/%s' % '/'.join(expected))
1159+
1160+
# Check online value of wlst_list_path after adding
1161+
# FOLDERS.RESOURCE_MANAGER to the location. There
1162+
# should be an 's' on the end of FOLDERS.PARTITION, but
1163+
# not on the end of FOLDERS.RESOURCE_MANAGER
1164+
expected = ['%ss' % FOLDERS.PARTITION, 'Partition-0', FOLDERS.RESOURCE_MANAGER]
1165+
wlst_list_path = self.online_aliases.get_wlst_list_path(location)
1166+
self.assertEqual(wlst_list_path, '/%s' % '/'.join(expected))
1167+
1168+
# Check offline value of wlst_subfolders_path after adding
1169+
# FOLDERS.RESOURCE_MANAGER to the location. There
1170+
# should be an 's' on the end of FOLDERS.PARTITION, but
1171+
# not on the end of FOLDERS.RESOURCE_MANAGER
1172+
expected = [FOLDERS.PARTITION, 'Partition-0', FOLDERS.RESOURCE_MANAGER, 'ResourceManager-0']
1173+
wlst_subfolders_path = self.aliases.get_wlst_subfolders_path(location)
1174+
self.assertEqual(wlst_subfolders_path, '/%s' % '/'.join(expected))
1175+
1176+
# Check online value of wlst_subfolders_path after adding
1177+
# FOLDERS.RESOURCE_MANAGER to the location. There
1178+
# should be an 's' on the end of FOLDERS.PARTITION, but
1179+
# not on the end of FOLDERS.RESOURCE_MANAGER
1180+
expected = ['%ss' % FOLDERS.PARTITION, 'Partition-0', FOLDERS.RESOURCE_MANAGER, 'ResourceManager-0']
1181+
wlst_subfolders_path = self.online_aliases.get_wlst_subfolders_path(location)
1182+
self.assertEqual(wlst_subfolders_path, '/%s' % '/'.join(expected))
1183+
1184+
return
1185+
11171186
def testIssue50Fix(self):
11181187
location = LocationContext().append_location(FOLDERS.SERVER_TEMPLATE)
11191188
token = self.aliases.get_name_token(location)

0 commit comments

Comments
 (0)