~bjornt/maas:fix-broken-import-sampledata

Last commit made on 2022-03-07
Get this branch:
git clone -b fix-broken-import-sampledata https://git.launchpad.net/~bjornt/maas
Only Björn Tillenius can upload to this branch. If you are Björn Tillenius please log in for upload directions.

Branch merges

Branch information

Name:
fix-broken-import-sampledata
Repository:
lp:~bjornt/maas

Recent commits

018a9ab... by Björn Tillenius

Don't use TYPE_CHECKING.

It was used incorrect, breaking real execution for the code. Given that
importing Machine is cheap, since the sampledata code already makes use
of it, it doesn't make much sense to optimize things using TYPE_CHECKING
checks here.

67e0f9e... by Adam Collard

Use random.choices for weighted items

023bf1d... by Anton Troyanov

Use single style for batch operations

fc68e99... by Björn Tillenius

Disable notifications triggers when generating events in sampledata.

The notification triggers don't provide any value for sampledata
generation, but at least for events they slow down things a lot.

f0a1136... by Alexsander de Souza

add count and stratify methods

- count returns the number of rows in a table (using filters)
- stratify count the number of rows grouped by a given field

52de14a... by Alexsander de Souza

disable timeouts to avoid flakiness

20c270a... by Alberto Donato

create sampledata tags in bulk

2efda97... by Alberto Donato

create less sampledata events for machines

57122b1... by Alberto Donato

document command to manually import sampledata db

d009cb5... by Alberto Donato

replace old sampledata with the new one