fix dummy

This commit is contained in:
Cayo Puigdefabregas 2022-12-12 10:36:33 +01:00
parent 5e8cf78751
commit 4debac4fbe
15 changed files with 19 additions and 4 deletions

View file

@ -1,5 +1,6 @@
import itertools import itertools
import json import json
import uuid
from pathlib import Path from pathlib import Path
import click import click
@ -113,6 +114,8 @@ class Dummy:
for path in bar: for path in bar:
with path.open() as f: with path.open() as f:
snapshot = yaml.load(f) snapshot = yaml.load(f)
if snapshot['device']['type'] in ['Desktop', 'Laptop']:
snapshot['device']['system_uuid'] = uuid.uuid4()
s, _ = user1.post(res=m.Snapshot, data=self.json_encode(snapshot)) s, _ = user1.post(res=m.Snapshot, data=self.json_encode(snapshot))
if s.get('uuid', None) == 'ec23c11b-80b6-42cd-ac5c-73ba7acddbc4': if s.get('uuid', None) == 'ec23c11b-80b6-42cd-ac5c-73ba7acddbc4':
sample_pc = s['device']['id'] sample_pc = s['device']['id']

View file

@ -178,6 +178,7 @@
], ],
"type": "Laptop" "type": "Laptop"
}, },
"debug": {"lshw": {"configuration": {"uuid": "79c5098f-bc44-4834-8a59-9ea61d956c31"}}},
"elapsed": 14725, "elapsed": 14725,
"endTime": "2018-11-24T18:06:37.611704+00:00", "endTime": "2018-11-24T18:06:37.611704+00:00",
"software": "Workbench", "software": "Workbench",

View file

@ -119,6 +119,7 @@
"manufacturer": "ASUSTeK Computer INC." "manufacturer": "ASUSTeK Computer INC."
} }
], ],
"debug": {"lshw": {"configuration": {"uuid": "645f00bf-1ec0-4fdb-9608-b5ac73e285f6"}}},
"version": "11.0a4", "version": "11.0a4",
"elapsed": 6, "elapsed": 6,
"endTime": "2016-11-03T17:17:17.266543+00:00" "endTime": "2016-11-03T17:17:17.266543+00:00"

View file

@ -148,6 +148,7 @@
"model": "0UG982" "model": "0UG982"
} }
], ],
"debug": {"lshw": {"configuration": {"uuid": "5dcdd380-5a54-48bc-99bf-aff6019e8491"}}},
"version": "11.0a3", "version": "11.0a3",
"closed": false, "closed": false,
"elapsed": 1512, "elapsed": 1512,

View file

@ -132,5 +132,6 @@
"model": "HP Compaq 8100 Elite SFF", "model": "HP Compaq 8100 Elite SFF",
"manufacturer": "Hewlett-Packard" "manufacturer": "Hewlett-Packard"
}, },
"debug": {"lshw": {"configuration": {"uuid": "f6cfe48a-93d5-4e94-ab7b-3ee371e4d048"}}},
"version": "11.0a3" "version": "11.0a3"
} }

View file

@ -170,5 +170,6 @@
}, },
"software": "Workbench", "software": "Workbench",
"endTime": "2018-07-11T10:30:22.395958+00:00", "endTime": "2018-07-11T10:30:22.395958+00:00",
"debug": {"lshw": {"configuration": {"uuid": "75dcb454-ae80-4a87-a192-185d3b0250c0"}}},
"elapsed": 2766 "elapsed": 2766
} }

View file

@ -146,6 +146,7 @@
"pcmcia": 0 "pcmcia": 0
} }
], ],
"debug": {"lshw": {"configuration": {"uuid": "fcaf784e-5e57-43a2-b03f-8c56dabd0415"}}},
"uuid": "a01eacdb-db01-43ec-b6fb-a9b8cd21492d", "uuid": "a01eacdb-db01-43ec-b6fb-a9b8cd21492d",
"type": "Snapshot", "type": "Snapshot",
"version": "11.0a4", "version": "11.0a4",

View file

@ -4,6 +4,7 @@
"closed": false, "closed": false,
"endTime": "2018-07-11T13:26:29.365504+00:00", "endTime": "2018-07-11T13:26:29.365504+00:00",
"type": "Snapshot", "type": "Snapshot",
"debug": {"lshw": {"configuration": {"uuid": "4f256440-e43f-429a-a2c6-1e8f3365de56"}}},
"device": { "device": {
"serialNumber": "PB357N0", "serialNumber": "PB357N0",
"actions": [ "actions": [

View file

@ -148,6 +148,7 @@
"slots": 4 "slots": 4
} }
], ],
"debug": {"lshw": {"configuration": {"uuid": "077cad5d-ae1b-4156-a9a1-98bca6fa5c35"}}},
"version": "11.0a3", "version": "11.0a3",
"endTime": "2018-07-11T10:28:55.879745+00:00", "endTime": "2018-07-11T10:28:55.879745+00:00",
"type": "Snapshot", "type": "Snapshot",

View file

@ -136,8 +136,8 @@
], ],
"elapsed": 203, "elapsed": 203,
"device": { "device": {
"manufacturer": null, "manufacturer": "Asus",
"model": null, "model": "P7P55D",
"chassis": "Tower", "chassis": "Tower",
"type": "Desktop", "type": "Desktop",
"serialNumber": null, "serialNumber": null,
@ -158,7 +158,7 @@
] ]
}, },
"version": "11.0a6", "version": "11.0a6",
"debug": {"lshw": {"configuration": {"uuid": "59ca9a2a-65bd-4802-89bb-315156a9352b"}}},
"type": "Snapshot", "type": "Snapshot",
"closed": true, "closed": true,
"software": "Workbench" "software": "Workbench"

View file

@ -142,7 +142,7 @@
}, },
"elapsed": 238, "elapsed": 238,
"endTime": "2018-10-15T13:59:37.431309+00:00", "endTime": "2018-10-15T13:59:37.431309+00:00",
"debug": {"lshw": {"configuration": {"uuid": "43686b8e-e1ae-4e4e-bc51-f98f51e97c2d"}}},
"software": "Workbench", "software": "Workbench",
"type": "Snapshot", "type": "Snapshot",
"uuid": "ec23c11b-80b6-42cd-ac5c-73ba7acddbc4", "uuid": "ec23c11b-80b6-42cd-ac5c-73ba7acddbc4",

View file

@ -158,5 +158,6 @@
} }
] ]
}, },
"debug": {"lshw": {"configuration": {"uuid": "a0cef731-9a78-4087-889c-dfb6ba5c2e9b"}}},
"closed": false "closed": false
} }

View file

@ -114,6 +114,7 @@
} }
], ],
"version": "11.0a3", "version": "11.0a3",
"debug": {"lshw": {"configuration": {"uuid": "f2c50acd-501a-4f0b-b07c-58254b2ab8c9"}}},
"device": { "device": {
"type": "Desktop", "type": "Desktop",
"model": "HP Compaq 8000 Elite SFF", "model": "HP Compaq 8000 Elite SFF",

View file

@ -1,6 +1,7 @@
{ {
"closed": false, "closed": false,
"uuid": "f9e5e587-baee-44e1-9a94-255d216bbda9", "uuid": "f9e5e587-baee-44e1-9a94-255d216bbda9",
"debug": {"lshw": {"configuration": {"uuid": "4d21dd26-aa45-4902-a5f2-8a06e364cf25"}}},
"components": [ "components": [
{ {
"actions": [], "actions": [],

View file

@ -131,6 +131,7 @@
"model": "NB200" "model": "NB200"
}, },
"uuid": "918726ae-c6bc-40aa-97cf-ad80d69268f9", "uuid": "918726ae-c6bc-40aa-97cf-ad80d69268f9",
"debug": {"lshw": {"configuration": {"uuid": "33627ef0-89a9-4659-bb29-faa936727e0b"}}},
"closed": false, "closed": false,
"type": "Snapshot" "type": "Snapshot"
} }