Schema update.

This commit is contained in:
wescoeur 2016-03-09 12:23:02 +01:00
parent abd89df365
commit 9c0967170a

View File

@ -52,49 +52,39 @@ export const configurationSchema = {
plans: { plans: {
type: 'array', type: 'array',
description: 'an array of plans', description: 'an array of plans',
title: 'Plans',
items: { items: {
type: 'object', type: 'object',
title: 'plan', title: 'Plan',
properties: { properties: {
name: { name: {
type: 'string' type: 'string',
title: 'Name'
}, },
mode: { mode: {
type: 'object', type: 'boolean',
title: 'Mode',
properties: { description: 'performance mode if enabled, else density mode'
performance: { type: 'boolean' },
density: { type: 'boolean' }
},
oneOf: [
{ required: ['performance'] },
{ required: ['density'] }
]
}, },
pools: { pools: {
type: 'array', type: 'array',
description: 'list of pools id where to apply the policy', $type: 'Pool',
description: 'list of pools where to apply the policy'
items: {
type: 'string',
$objectType: 'pool'
},
minItems: 1,
uniqueItems: true
} }
} },
required: [ 'name', 'mode', 'pools' ]
}, },
minItems: 1 minItems: 1
} }
}, },
additionalProperties: false additionalProperties: false,
required: [ 'plans' ]
} }
// =================================================================== // ===================================================================