2020-06-04 16:53:37 -04:00
|
|
|
import factory from '../generated/factories/host-catalog';
|
2020-08-19 16:12:53 -04:00
|
|
|
import { trait } from 'ember-cli-mirage';
|
2020-06-04 16:53:37 -04:00
|
|
|
|
2020-08-19 16:12:53 -04:00
|
|
|
export default factory.extend({
|
|
|
|
|
|
|
|
|
|
withChildren: trait({
|
|
|
|
|
afterCreate(hostCatalog, server) {
|
2020-09-10 16:57:11 -04:00
|
|
|
const { scope } = hostCatalog;
|
2020-09-10 17:59:31 -04:00
|
|
|
const hosts = server.createList('host', 10, { scope, hostCatalog });
|
2020-09-10 16:57:11 -04:00
|
|
|
server.createList('host-set', 3, { scope, hostCatalog, hosts });
|
2020-08-19 16:12:53 -04:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
});
|