Skip to content

Commit 7535451

Browse files
authored
Merge pull request CactuseSecurity#3105 from tpurschke/cactus-develop
reformatting app server ip struct
2 parents 0d8da1c + 25f5640 commit 7535451

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/customizing/modelling/getOwnersFromCsvWithoutUsers.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,12 @@ def extractAppDataFromCsvFile(csvFile: str, appData: dict, containsIp: bool):
171171
# add app server ip addresses (but do not add the whole app - it must already exist)
172172
appServerIp = line[appServerIpColumn]
173173
if appServerIp is not None and appServerIp != "" and appServerIp not in appData[appId]['app_servers']:
174-
appData[appId]['app_servers'].append(appServerIp)
174+
appData[appId]['app_servers'].append({
175+
"ip": appServerIp,
176+
"ip_end": appServerIp,
177+
"type": "host",
178+
"name": f"host_{appServerIp}"
179+
})
175180
else:
176181
# logger.debug(f'ignoring line from csv file: {appId} - empty IP')
177182
countSkips += 1

0 commit comments

Comments
 (0)