Skip to content

Commit 241add1

Browse files
authored
Merge pull request #1798 from afumagalli98/improve-clusters-validation
Improved clusters validation
2 parents 5e27a0e + a645703 commit 241add1

File tree

2 files changed

+86
-18
lines changed

2 files changed

+86
-18
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"hostname": "test-virt",
3+
"environment": "PROD",
4+
"location": "Italy",
5+
"info": {
6+
"hostname": "test-virt",
7+
"cpuModel": "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
8+
"cpuCores": 1,
9+
"cpuThreads": 2,
10+
"kernel": "3.10.0-862.9.1.el7.x86_64",
11+
"os": "Red Hat Enterprise Linux",
12+
"memoryTotal": 3,
13+
"swapTotal": 4,
14+
"cpuFrequency": "2.50GHz",
15+
"cpuSockets": 2,
16+
"coresPerSocket": 1,
17+
"threadsPerCore": 2,
18+
"kernelVersion": "3.10.0-862.9.1.el7.x86_64",
19+
"osVersion": "7.5",
20+
"hardwareAbstraction": "VIRT",
21+
"hardwareAbstractionTechnology": "VMWARE"
22+
},
23+
"agentVersion": "1.6.1",
24+
"tags": [],
25+
"schemaVersion": 1,
26+
"clusterMembershipStatus": {
27+
"oracleClusterware": false,
28+
"sunCluster": false,
29+
"hacmp": false,
30+
"veritasClusterServer": true,
31+
"veritasClusterHostnames": [
32+
"test-virt1",
33+
"test-virt2"
34+
]
35+
},
36+
"filesystems": [
37+
{
38+
"filesystem": "/dev/mapper/vg_os-lv_root",
39+
"size": 8589934592,
40+
"mountedOn": "/",
41+
"availableSpace": 4939212390,
42+
"usedSpace": 3758096384,
43+
"type": "xfs"
44+
}
45+
],
46+
"features": {},
47+
"clusters": [
48+
{
49+
"fetchEndpoint": "",
50+
"type": "",
51+
"name": "fittizio",
52+
"cpu": 0,
53+
"sockets": 0,
54+
"vms": [
55+
{
56+
"name": "",
57+
"hostname": "test-virt1",
58+
"cappedCPU": false,
59+
"virtualizationNode": "",
60+
"physicalServerModelName": ""
61+
},
62+
{
63+
"name": "",
64+
"hostname": "test-virt2",
65+
"cappedCPU": false,
66+
"virtualizationNode": "",
67+
"physicalServerModelName": ""
68+
}
69+
]
70+
}
71+
],
72+
"grantDba": null
73+
}

schema/hostdata.json

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -291,30 +291,31 @@
291291
"items": {
292292
"type": "object",
293293
"required": [
294-
"fetchEndpoint",
295-
"type",
296294
"name",
297-
"cpu",
298-
"sockets",
299295
"vms"
300296
],
301297
"properties": {
302298
"fetchEndpoint": {
303299
"type": "string",
304-
"minLength": 1,
305300
"maxLength": 64
306301
},
307302
"type": {
308-
"type": "string",
309-
"enum": [
310-
"Oracle/VM",
311-
"VMWare/VMWare",
312-
"Oracle/LVM"
303+
"anyOf": [
304+
{
305+
"type": "string",
306+
"enum": [
307+
"Oracle/VM",
308+
"VMWare/VMWare",
309+
"Oracle/LVM"
310+
]
311+
},
312+
{
313+
"type": "string"
314+
}
313315
]
314316
},
315317
"name": {
316318
"type": "string",
317-
"minLength": 1,
318319
"maxLength": 128
319320
},
320321
"cpu": {
@@ -330,20 +331,15 @@
330331
"items": {
331332
"type": "object",
332333
"required": [
333-
"name",
334-
"hostname",
335-
"cappedCPU",
336-
"virtualizationNode"
334+
"hostname"
337335
],
338336
"properties": {
339337
"name": {
340338
"type": "string",
341-
"minLength": 1,
342339
"maxLength": 128
343340
},
344341
"hostname": {
345342
"type": "string",
346-
"minLength": 1,
347343
"maxLength": 253,
348344
"format": "idn-hostname"
349345
},
@@ -352,7 +348,6 @@
352348
},
353349
"virtualizationNode": {
354350
"type": "string",
355-
"minLength": 1,
356351
"maxLength": 253,
357352
"format": "idn-hostname"
358353
}

0 commit comments

Comments
 (0)