-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKeywords
More file actions
43 lines (37 loc) · 1.35 KB
/
Keywords
File metadata and controls
43 lines (37 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
var mc = new GlideRecord('u_infra_use_cases');
mc.addQuery('sys_id', 'ccd77a85871cf5508c8c33350cbb3527');
mc.query();
if (mc.next()) {
var Out = mc.getValue('u_new_value');
gs.log("-----------------" + Out);
var lines = Out.split('\n');
var modifiedLines = [];
for (var i = 0; i < lines.length; i++) {
var line = lines[i];
var removeLine = false;
if (line.indexOf("ether") !== -1) {
// gs.log('Out In EtherIndex ' + line);
removeLine = true;
} else if (line.indexOf("Overall Status") !== -1) {
// gs.log('Out In overallStatusIndex ' + line);
removeLine = true;
} else if (line.indexOf("System Purpose Status") !== -1) {
// gs.log('Out In systemPurposeStatus ' + line);
removeLine = true;
} else if (line.indexOf("Content Access Mode") !== -1) {
// gs.log('Out In Content Access Mode ' + line);
removeLine = true;
}
else if (line.indexOf("[INFO] subscription-manager:") !== -1) {
// gs.log('Out In [INFO] subscription-manager: ' + line);
removeLine = true;
}
if (!removeLine) {
modifiedLines.push(line);
}
}
Out = modifiedLines.join('\n');
gs.log('Modified Out:\n' + Out);
} else {
gs.log('Not found');
}