open-nomad/ui/mirage/factories/policy.js
2017-10-16 13:27:51 -07:00

19 lines
370 B
JavaScript

import { Factory, faker } from 'ember-cli-mirage';
export default Factory.extend({
id: () => faker.hacker.verb(),
name() {
return this.id;
},
description: () => (Math.random() > 0.2 ? faker.lorem.sentence() : null),
rules: `
# Allow read only access to the default namespace
namespace "default" {
policy = "read"
}
node {
policy = "read"
}`,
});