UNPKG

berlioz

Version:

Berlioz - cloud deployment and migration services

29 lines (27 loc) 1.11 kB
module.exports.checkSkip = function({entity, scope, consumer, targetEntity}) { if (consumer.kind != 'database') { return false; } if (consumer.className != 'sql') { return false; } if (consumer.subClassName != 'sql') { return false; } if (!consumer.hasInitScript) { return false; } return true; } module.exports.customCreate = function({processor, entity, scope, consumer, consumerItem, providerItem, targetEntity}) { processor.logger.info('[STORAGE-CONSUMED] customCreate, entity: %s...', entity.id); processor.logger.info('[STORAGE-CONSUMED] customCreate, consumerItem: %s...', consumerItem.dn); processor.logger.info('[STORAGE-CONSUMED] customCreate, providerItem: %s...', providerItem.dn); return processor.getTargetPolicy(providerItem) .then(policy => { processor.logger.info('[STORAGE-CONSUMED] customCreate, policy: %s...', policy.id); return policy.relation(consumerItem) .then(relation => relation.markIgnoreDelta()) .then(() => policy); }); }