diff options
author | 2017-07-18 19:45:38 +0300 | |
---|---|---|
committer | 2017-07-18 19:45:38 +0300 | |
commit | b8e2faf476202b6ffe61bc3a9a37df1304881d40 (patch) | |
tree | f78b8c0517d8e16c5ae610bf8b49f68ea8a312a1 /openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductComponentsMonitoringFactories.js | |
parent | 75aacbbe1acf78fa53378f07f0a8c7769449a17e (diff) |
[SDC] Onboarding 1710 rebase.
Change-Id: If3b6b81d221fde13908f1e8160db6f7d9433c535
Signed-off-by: Avi Ziv <avi.ziv@amdocs.com>
Diffstat (limited to 'openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductComponentsMonitoringFactories.js')
-rw-r--r-- | openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductComponentsMonitoringFactories.js | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductComponentsMonitoringFactories.js b/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductComponentsMonitoringFactories.js index 6bfa091fd3..550e1a6d6c 100644 --- a/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductComponentsMonitoringFactories.js +++ b/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductComponentsMonitoringFactories.js @@ -15,18 +15,24 @@ */ import {Factory} from 'rosie'; import randomstring from 'randomstring'; +import {type2Name, fileTypes} from 'sdc-app/onboarding/softwareProduct/components/monitoring/SoftwareProductComponentsMonitoringConstants.js'; + +export const trap = type2Name[fileTypes.SNMP_TRAP]; +export const poll = type2Name[fileTypes.SNMP_POLL]; +export const ves = type2Name[fileTypes.VES_EVENT]; export const VSPComponentsMonitoringRestFactory = new Factory() - .option('snmpTrapFlag', false) - .option('snmpPollFlag', false) - .attr('snmpTrap', ['snmpTrapFlag'], snmpTrapFlag => snmpTrapFlag ? randomstring.generate() : undefined) - .attr('snmpPoll', ['snmpPollFlag'], snmpPollFlag => snmpPollFlag ? randomstring.generate() : undefined); + .option('createTrap', false) + .option('createPoll', false) + .option('createVes', false) + + .attr(trap, ['createTrap'], (createTrap) => {return (createTrap) ? randomstring.generate() : undefined}) + .attr(poll, ['createPoll'], (createPoll) => {return (createPoll) ? randomstring.generate() : undefined}) + .attr(ves, ['createVes'], (createVes) => {return (createVes) ? randomstring.generate() : undefined}); + export const VSPComponentsMonitoringViewFactory = new Factory() - .extend(VSPComponentsMonitoringRestFactory) - .after(monitoring => { - monitoring['trapFilename'] = monitoring['snmpTrap']; - monitoring['pollFilename'] = monitoring['snmpPoll']; - delete monitoring['snmpTrap']; - delete monitoring['snmpPoll']; - }); + .extend(VSPComponentsMonitoringRestFactory); +// .after(monitoring => { + +// }); |