@@ -42,47 +42,62 @@ def GenerateDevicePicsXmlFiles(clusterName, clusterPicsCode, featurePicsList, at
42
42
43
43
# Map clusters to common XML template if needed
44
44
if "ICDManagement" == clusterName :
45
- clusterName = "ICD Management"
45
+ picsFileName = "ICD Management"
46
46
47
- elif "OTA Software Update Provider" in clusterName or "OTA Software Update Requestor" in clusterName :
48
- clusterName = "OTA Software Update"
47
+ elif "OTA Software Update Provider" in clusterName or \
48
+ "OTA Software Update Requestor" in clusterName :
49
+ picsFileName = "OTA Software Update"
49
50
50
51
elif "On/Off" == clusterName :
51
- clusterName = clusterName .replace ("/" , "-" )
52
+ picsFileName = clusterName .replace ("/" , "-" )
52
53
53
54
elif "GroupKeyManagement" == clusterName :
54
- clusterName = "Group Communication"
55
-
56
- elif "Wake On LAN" == clusterName or "Low Power" == clusterName :
57
- clusterName = "Media Cluster"
55
+ picsFileName = "Group Communication"
56
+
57
+ elif "Wake on LAN" == clusterName or \
58
+ "Low Power" == clusterName or \
59
+ "Keypad Input" == clusterName or \
60
+ "Audio Output" == clusterName or \
61
+ "Media Input" == clusterName or \
62
+ "Target Navigator" == clusterName or \
63
+ "Content Control" == clusterName or \
64
+ "Channel" == clusterName or \
65
+ "Media Playback" == clusterName or \
66
+ "Account Login" == clusterName or \
67
+ "Application Basic" == clusterName or \
68
+ "Content Launcher" == clusterName or \
69
+ "Content App Observer" == clusterName or \
70
+ "Application Launcher" == clusterName :
71
+
72
+ picsFileName = "Media Cluster"
58
73
59
74
elif "Operational Credentials" == clusterName :
60
- clusterName = "Node Operational Credentials"
61
-
62
- elif "Laundry Washer Controls" == clusterName :
63
- clusterName = "Washer Controls"
75
+ picsFileName = "Node Operational Credentials"
64
76
65
77
# Workaround for naming colisions with current logic
66
78
elif "Thermostat" == clusterName :
67
- clusterName = "Thermostat Cluster"
79
+ picsFileName = "Thermostat Cluster"
68
80
69
81
elif "Boolean State" == clusterName :
70
- clusterName = "Boolean State Cluster"
82
+ picsFileName = "Boolean State Cluster"
83
+
84
+ elif "AccessControl" in clusterName :
85
+ picsFileName = "Access Control Cluster"
71
86
72
- if "AccessControl" in clusterName :
73
- clusterName = "Access Control cluster"
87
+ else :
88
+ picsFileName = clusterName
74
89
75
90
# Determine if file has already been handled and use this file
76
91
for outputFolderFileName in os .listdir (outputPathStr ):
77
- if clusterName in outputFolderFileName :
92
+ if picsFileName in outputFolderFileName :
78
93
xmlPath = outputPathStr
79
94
fileName = outputFolderFileName
80
95
break
81
96
82
97
# If no file is found in output folder, determine if there is a match for the cluster name in input folder
83
98
if fileName == "" :
84
99
for file in xmlFileList :
85
- if file .lower ().startswith (clusterName .lower ()):
100
+ if file .lower ().startswith (picsFileName .lower ()):
86
101
fileName = file
87
102
break
88
103
else :
@@ -421,9 +436,11 @@ def cleanDirectory(pathToClean):
421
436
# Load PICS XML templates
422
437
print ("Capture list of PICS XML templates" )
423
438
xmlFileList = os .listdir (xmlTemplatePathStr )
439
+ for PICSXmlFile in xmlFileList :
440
+ print (f"{ xmlTemplatePathStr } /{ PICSXmlFile } " )
424
441
425
442
# Setup output path
426
- print (outputPathStr )
443
+ print (f"Output path: { outputPathStr } " )
427
444
428
445
outputPath = pathlib .Path (outputPathStr )
429
446
if not outputPath .exists ():
0 commit comments