Move mirage plugin field to a factory. Now plugin inherits from host-catalog

This commit is contained in:
Carlos Alcaide Corvo committed 2022-01-26 12:30:21 -08:00
1 parent 676c3e0ad0
commit cbc732e9dd
2 files changed
+5 -9

No files matched your search

+5
View File
@@ -12,4 +12,9 @@ export default factory.extend({
'remove-hosts',
],
id: (i) => `host-set-id-${i}`,
plugin() {
if (this.type === 'plugin') {
return this.hostCatalog.plugin;
}
},
});
@@ -11,13 +11,4 @@ export default Factory.extend({
updated_time: () => date.recent(),
version: () => datatype.number(),
size: () => datatype.number(),
plugin: function (i) {
if (this.type == 'plugin') {
return {
id: `pl_${datatype.hexaDecimal(5)}`,
name: i % 2 ? 'aws' : 'azure',
description: random.words(),
};
}
},
});