2023-04-10 15:36:59 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
*/
|
|
|
|
|
2019-09-26 18:47:07 +00:00
|
|
|
import { Factory } from 'ember-cli-mirage';
|
2019-10-03 14:13:08 +00:00
|
|
|
import faker from 'nomad-ui/mirage/faker';
|
2017-10-14 18:01:28 +00:00
|
|
|
|
|
|
|
export default Factory.extend({
|
|
|
|
id: () => faker.hacker.verb(),
|
|
|
|
name() {
|
|
|
|
return this.id;
|
|
|
|
},
|
2019-10-03 14:13:08 +00:00
|
|
|
description: () => (faker.random.number(10) >= 2 ? faker.lorem.sentence() : null),
|
2022-12-06 17:45:36 +00:00
|
|
|
rules: `# Allow read only access to the default namespace
|
2017-10-14 18:01:28 +00:00
|
|
|
namespace "default" {
|
|
|
|
policy = "read"
|
|
|
|
}
|
|
|
|
|
|
|
|
node {
|
|
|
|
policy = "read"
|
|
|
|
}`,
|
2022-01-05 17:49:15 +00:00
|
|
|
rulesJSON: () => ({
|
|
|
|
Node: {
|
|
|
|
Policy: 'read',
|
|
|
|
},
|
|
|
|
}),
|
2017-10-14 18:01:28 +00:00
|
|
|
});
|