diff options
author | Koren Lev <korenlev@gmail.com> | 2017-09-29 01:38:18 +0300 |
---|---|---|
committer | Koren Lev <korenlev@gmail.com> | 2017-09-29 01:38:18 +0300 |
commit | d32f75145676bacefde0d08a14680a5984623451 (patch) | |
tree | 4b5eaf1107e6973b1eac636309a99c83074acbfc /ui/imports/api/environments | |
parent | 0c5426cd309d720db1e30641e43d311ee0b751b0 (diff) |
release 1.0 calipso for opnfv apex
Change-Id: I3e63cd27c5f4d3756e67a07c749863a68e84dde2
Signed-off-by: Koren Lev <korenlev@gmail.com>
Diffstat (limited to 'ui/imports/api/environments')
-rw-r--r-- | ui/imports/api/environments/configuration-groups/monitoring-configuration.js | 7 | ||||
-rw-r--r-- | ui/imports/api/environments/environments.js | 25 | ||||
-rw-r--r-- | ui/imports/api/environments/methods.js | 3 |
3 files changed, 28 insertions, 7 deletions
diff --git a/ui/imports/api/environments/configuration-groups/monitoring-configuration.js b/ui/imports/api/environments/configuration-groups/monitoring-configuration.js index 2b27f8a..edeaaad 100644 --- a/ui/imports/api/environments/configuration-groups/monitoring-configuration.js +++ b/ui/imports/api/environments/configuration-groups/monitoring-configuration.js @@ -51,7 +51,10 @@ export const MonitoringSchema = new SimpleSchema({ defaultValue: 'sensu' }, - rabbitmq_pass: { type: String }, + rabbitmq_pass: { + type: String, + defaultValue: 'osdna' + }, server_ip: { type: String, @@ -108,7 +111,7 @@ export const MonitoringSchema = new SimpleSchema({ ssh_password: { type: String, - defaultValue: 'calipso', + defaultValue: 'osdna', optional: true }, diff --git a/ui/imports/api/environments/environments.js b/ui/imports/api/environments/environments.js index 22e49cf..e196a69 100644 --- a/ui/imports/api/environments/environments.js +++ b/ui/imports/api/environments/environments.js @@ -180,7 +180,7 @@ let simpleSchema = new SimpleSchema({ }, distribution: { type: String, - defaultValue: 'Mirantis-8.0', + defaultValue: 'Mirantis', custom: function () { let that = this; let constsDist = Constants.findOne({ name: 'distributions' }); @@ -193,6 +193,20 @@ let simpleSchema = new SimpleSchema({ } }, }, + distribution_version: { + type: String, + custom: function () { + let that = this; + let constsDist = Constants.findOne({ name: 'distribution_versions' }); + + if (R.isNil(constsDist.data)) { return 'notAllowed'; } + let dist_versions = constsDist.data; + + if (R.isNil(R.find(R.propEq('value', that.value), dist_versions))) { + return 'notAllowed'; + } + }, + }, last_scanned: { type: String, defaultValue: '' }, @@ -219,7 +233,7 @@ let simpleSchema = new SimpleSchema({ mechanism_drivers: { type: [String], - defaultValue: ['ovs'], + defaultValue: ['OVS'], minCount: 1, custom: function () { let that = this; @@ -325,7 +339,7 @@ SimpleSchema.messages({ Environments.schema = simpleSchema; Environments.attachSchema(Environments.schema); -function getSchemaForGroupName(groupName) { +export function getSchemaForGroupName(groupName) { switch (groupName) { case 'mysql': return MysqlSchema; @@ -440,13 +454,14 @@ function extractCalcEnvSupportedRelatedValues(schemaHelper) { let dbNode = getDbNode(schemaHelper); let dist = extractValue('distribution', schemaHelper, dbNode); + let dist_version = extractValue('distribution_version', schemaHelper, dbNode); let typeDrivers = extractValue('type_drivers', schemaHelper, dbNode); let mechDrivers = extractValue('mechanism_drivers', schemaHelper, dbNode); let enable_monitoring = extractValue('enable_monitoring', schemaHelper, dbNode); let listen = extractValue('listen', schemaHelper, dbNode); - let isMonitoringSupportedRes = isMonitoringSupported(dist, typeDrivers, mechDrivers); - let isListeningSupportedRes = isListeningSupported(dist, typeDrivers, mechDrivers); + let isMonitoringSupportedRes = isMonitoringSupported(dist, dist_version, typeDrivers, mechDrivers); + let isListeningSupportedRes = isListeningSupported(dist, dist_version, typeDrivers, mechDrivers); return { enable_monitoring, diff --git a/ui/imports/api/environments/methods.js b/ui/imports/api/environments/methods.js index 6d5e73e..66d1557 100644 --- a/ui/imports/api/environments/methods.js +++ b/ui/imports/api/environments/methods.js @@ -28,6 +28,7 @@ export const insert = new ValidatedMethod({ 'configuration', 'configuration.$', 'distribution', + 'distribution_version', 'name', 'type_drivers', 'mechanism_drivers', @@ -40,6 +41,7 @@ export const insert = new ValidatedMethod({ run({ configuration, distribution, + distribution_version, name, type_drivers, mechanism_drivers, @@ -64,6 +66,7 @@ export const insert = new ValidatedMethod({ environment = R.merge(environment, { configuration, distribution, + distribution_version, name, type_drivers, mechanism_drivers, |