RackHD/on-tasks

View on GitHub

Showing 500 of 1,093 total issues

Similar blocks of code found in 35 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Snmp Update Lookups',
    injectableName: 'Task.Base.Snmp.Update.Lookups',
    runJob: 'Job.Snmp.Update.Lookups',
    requiredOptions: [],
Severity: Major
Found in lib/task-data/base-tasks/snmp-update-lookups.js and 34 other locations - About 30 mins to fix
lib/task-data/base-tasks/add-hotspare.js on lines 3..13
lib/task-data/base-tasks/add-volume.js on lines 3..13
lib/task-data/base-tasks/clean-workitems.js on lines 5..12
lib/task-data/base-tasks/copy-key.js on lines 6..13
lib/task-data/base-tasks/delete-volume.js on lines 3..13
lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
lib/task-data/base-tasks/generate-sku.js on lines 5..12
lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi.js on lines 5..12
lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
lib/task-data/base-tasks/password-generation.js on lines 5..12
lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
lib/task-data/base-tasks/redfish.js on lines 5..12
lib/task-data/base-tasks/run-workitems.js on lines 5..12
lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
lib/task-data/base-tasks/snmp.js on lines 5..12
lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
lib/task-data/base-tasks/test-poller.js on lines 5..12
lib/task-data/base-tasks/ucs.js on lines 5..12
lib/task-data/base-tasks/validate-ssh.js on lines 6..13
lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
lib/task-data/base-tasks/wsman.js on lines 5..12

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Add Hotspare Base Task',
    injectableName: 'Task.Base.Add.Hotspare',
    runJob: 'Job.Add.Hotspare',
    requiredOptions: [
Severity: Major
Found in lib/task-data/base-tasks/add-hotspare.js and 34 other locations - About 30 mins to fix
lib/task-data/base-tasks/add-volume.js on lines 3..13
lib/task-data/base-tasks/clean-workitems.js on lines 5..12
lib/task-data/base-tasks/copy-key.js on lines 6..13
lib/task-data/base-tasks/delete-volume.js on lines 3..13
lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
lib/task-data/base-tasks/generate-sku.js on lines 5..12
lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi.js on lines 5..12
lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
lib/task-data/base-tasks/password-generation.js on lines 5..12
lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
lib/task-data/base-tasks/redfish.js on lines 5..12
lib/task-data/base-tasks/run-workitems.js on lines 5..12
lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
lib/task-data/base-tasks/snmp.js on lines 5..12
lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
lib/task-data/base-tasks/test-poller.js on lines 5..12
lib/task-data/base-tasks/ucs.js on lines 5..12
lib/task-data/base-tasks/validate-ssh.js on lines 6..13
lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
lib/task-data/base-tasks/wsman.js on lines 5..12

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Ipmi Sdr Poller Alerts',
    injectableName: 'Task.Base.Poller.Alert.Ipmi.Sdr',
    runJob: 'Job.Poller.Alert.Ipmi.Sdr',
    requiredOptions: [],
Severity: Major
Found in lib/task-data/base-tasks/ipmi-sdr-poller-alert.js and 34 other locations - About 30 mins to fix
lib/task-data/base-tasks/add-hotspare.js on lines 3..13
lib/task-data/base-tasks/add-volume.js on lines 3..13
lib/task-data/base-tasks/clean-workitems.js on lines 5..12
lib/task-data/base-tasks/copy-key.js on lines 6..13
lib/task-data/base-tasks/delete-volume.js on lines 3..13
lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
lib/task-data/base-tasks/generate-sku.js on lines 5..12
lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi.js on lines 5..12
lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
lib/task-data/base-tasks/password-generation.js on lines 5..12
lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
lib/task-data/base-tasks/redfish.js on lines 5..12
lib/task-data/base-tasks/run-workitems.js on lines 5..12
lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
lib/task-data/base-tasks/snmp.js on lines 5..12
lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
lib/task-data/base-tasks/test-poller.js on lines 5..12
lib/task-data/base-tasks/ucs.js on lines 5..12
lib/task-data/base-tasks/validate-ssh.js on lines 6..13
lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
lib/task-data/base-tasks/wsman.js on lines 5..12

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Snmp Requester',
    injectableName: 'Task.Base.Snmp',
    runJob: 'Job.Snmp',
    requiredOptions: [],
Severity: Major
Found in lib/task-data/base-tasks/snmp.js and 34 other locations - About 30 mins to fix
lib/task-data/base-tasks/add-hotspare.js on lines 3..13
lib/task-data/base-tasks/add-volume.js on lines 3..13
lib/task-data/base-tasks/clean-workitems.js on lines 5..12
lib/task-data/base-tasks/copy-key.js on lines 6..13
lib/task-data/base-tasks/delete-volume.js on lines 3..13
lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
lib/task-data/base-tasks/generate-sku.js on lines 5..12
lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi.js on lines 5..12
lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
lib/task-data/base-tasks/password-generation.js on lines 5..12
lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
lib/task-data/base-tasks/redfish.js on lines 5..12
lib/task-data/base-tasks/run-workitems.js on lines 5..12
lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
lib/task-data/base-tasks/test-poller.js on lines 5..12
lib/task-data/base-tasks/ucs.js on lines 5..12
lib/task-data/base-tasks/validate-ssh.js on lines 6..13
lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
lib/task-data/base-tasks/wsman.js on lines 5..12

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Ipmi Requester',
    injectableName: 'Task.Base.Ipmi',
    runJob: 'Job.Ipmi',
    requiredOptions: [],
Severity: Major
Found in lib/task-data/base-tasks/ipmi.js and 34 other locations - About 30 mins to fix
lib/task-data/base-tasks/add-hotspare.js on lines 3..13
lib/task-data/base-tasks/add-volume.js on lines 3..13
lib/task-data/base-tasks/clean-workitems.js on lines 5..12
lib/task-data/base-tasks/copy-key.js on lines 6..13
lib/task-data/base-tasks/delete-volume.js on lines 3..13
lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
lib/task-data/base-tasks/generate-sku.js on lines 5..12
lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
lib/task-data/base-tasks/password-generation.js on lines 5..12
lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
lib/task-data/base-tasks/redfish.js on lines 5..12
lib/task-data/base-tasks/run-workitems.js on lines 5..12
lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
lib/task-data/base-tasks/snmp.js on lines 5..12
lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
lib/task-data/base-tasks/test-poller.js on lines 5..12
lib/task-data/base-tasks/ucs.js on lines 5..12
lib/task-data/base-tasks/validate-ssh.js on lines 6..13
lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
lib/task-data/base-tasks/wsman.js on lines 5..12

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Run Work Items',
    injectableName: 'Task.Base.WorkItems.Run',
    runJob: 'Job.WorkItems.Run',
    requiredOptions: [],
Severity: Major
Found in lib/task-data/base-tasks/run-workitems.js and 34 other locations - About 30 mins to fix
lib/task-data/base-tasks/add-hotspare.js on lines 3..13
lib/task-data/base-tasks/add-volume.js on lines 3..13
lib/task-data/base-tasks/clean-workitems.js on lines 5..12
lib/task-data/base-tasks/copy-key.js on lines 6..13
lib/task-data/base-tasks/delete-volume.js on lines 3..13
lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
lib/task-data/base-tasks/generate-sku.js on lines 5..12
lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi.js on lines 5..12
lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
lib/task-data/base-tasks/password-generation.js on lines 5..12
lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
lib/task-data/base-tasks/redfish.js on lines 5..12
lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
lib/task-data/base-tasks/snmp.js on lines 5..12
lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
lib/task-data/base-tasks/test-poller.js on lines 5..12
lib/task-data/base-tasks/ucs.js on lines 5..12
lib/task-data/base-tasks/validate-ssh.js on lines 6..13
lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
lib/task-data/base-tasks/wsman.js on lines 5..12

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Snmp Poller Alerts',
    injectableName: 'Task.Base.Poller.Alert.Snmp',
    runJob: 'Job.Poller.Alert.Snmp',
    requiredOptions: [],
Severity: Major
Found in lib/task-data/base-tasks/snmp-poller-alert.js and 34 other locations - About 30 mins to fix
lib/task-data/base-tasks/add-hotspare.js on lines 3..13
lib/task-data/base-tasks/add-volume.js on lines 3..13
lib/task-data/base-tasks/clean-workitems.js on lines 5..12
lib/task-data/base-tasks/copy-key.js on lines 6..13
lib/task-data/base-tasks/delete-volume.js on lines 3..13
lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
lib/task-data/base-tasks/generate-sku.js on lines 5..12
lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi.js on lines 5..12
lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
lib/task-data/base-tasks/password-generation.js on lines 5..12
lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
lib/task-data/base-tasks/redfish.js on lines 5..12
lib/task-data/base-tasks/run-workitems.js on lines 5..12
lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
lib/task-data/base-tasks/snmp.js on lines 5..12
lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
lib/task-data/base-tasks/test-poller.js on lines 5..12
lib/task-data/base-tasks/ucs.js on lines 5..12
lib/task-data/base-tasks/validate-ssh.js on lines 6..13
lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
lib/task-data/base-tasks/wsman.js on lines 5..12

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Clean Work Items',
    injectableName: 'Task.Base.WorkItems.Clean',
    runJob: 'Job.WorkItems.Clean',
    requiredOptions: [],
Severity: Major
Found in lib/task-data/base-tasks/clean-workitems.js and 34 other locations - About 30 mins to fix
lib/task-data/base-tasks/add-hotspare.js on lines 3..13
lib/task-data/base-tasks/add-volume.js on lines 3..13
lib/task-data/base-tasks/copy-key.js on lines 6..13
lib/task-data/base-tasks/delete-volume.js on lines 3..13
lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
lib/task-data/base-tasks/generate-sku.js on lines 5..12
lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi.js on lines 5..12
lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
lib/task-data/base-tasks/password-generation.js on lines 5..12
lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
lib/task-data/base-tasks/redfish.js on lines 5..12
lib/task-data/base-tasks/run-workitems.js on lines 5..12
lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
lib/task-data/base-tasks/snmp.js on lines 5..12
lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
lib/task-data/base-tasks/test-poller.js on lines 5..12
lib/task-data/base-tasks/ucs.js on lines 5..12
lib/task-data/base-tasks/validate-ssh.js on lines 6..13
lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
lib/task-data/base-tasks/wsman.js on lines 5..12

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Add Volume Base Task',
    injectableName: 'Task.Base.Add.Volume',
    runJob: 'Job.Add.Volume',
    requiredOptions: [
Severity: Major
Found in lib/task-data/base-tasks/add-volume.js and 34 other locations - About 30 mins to fix
lib/task-data/base-tasks/add-hotspare.js on lines 3..13
lib/task-data/base-tasks/clean-workitems.js on lines 5..12
lib/task-data/base-tasks/copy-key.js on lines 6..13
lib/task-data/base-tasks/delete-volume.js on lines 3..13
lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
lib/task-data/base-tasks/generate-sku.js on lines 5..12
lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi.js on lines 5..12
lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
lib/task-data/base-tasks/password-generation.js on lines 5..12
lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
lib/task-data/base-tasks/redfish.js on lines 5..12
lib/task-data/base-tasks/run-workitems.js on lines 5..12
lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
lib/task-data/base-tasks/snmp.js on lines 5..12
lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
lib/task-data/base-tasks/test-poller.js on lines 5..12
lib/task-data/base-tasks/ucs.js on lines 5..12
lib/task-data/base-tasks/validate-ssh.js on lines 6..13
lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
lib/task-data/base-tasks/wsman.js on lines 5..12

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Generate Enclosure',
    injectableName: 'Task.Base.Catalog.GenerateEnclosure',
    runJob: 'Job.Catalog.GenerateEnclosure',
    requiredOptions: [],
Severity: Major
Found in lib/task-data/base-tasks/generate-enclosure.js and 34 other locations - About 30 mins to fix
lib/task-data/base-tasks/add-hotspare.js on lines 3..13
lib/task-data/base-tasks/add-volume.js on lines 3..13
lib/task-data/base-tasks/clean-workitems.js on lines 5..12
lib/task-data/base-tasks/copy-key.js on lines 6..13
lib/task-data/base-tasks/delete-volume.js on lines 3..13
lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
lib/task-data/base-tasks/generate-sku.js on lines 5..12
lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi.js on lines 5..12
lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
lib/task-data/base-tasks/password-generation.js on lines 5..12
lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
lib/task-data/base-tasks/redfish.js on lines 5..12
lib/task-data/base-tasks/run-workitems.js on lines 5..12
lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
lib/task-data/base-tasks/snmp.js on lines 5..12
lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
lib/task-data/base-tasks/test-poller.js on lines 5..12
lib/task-data/base-tasks/ucs.js on lines 5..12
lib/task-data/base-tasks/validate-ssh.js on lines 6..13
lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
lib/task-data/base-tasks/wsman.js on lines 5..12

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Dell Wsman Add Volume Xml Base Task',
    injectableName: 'Task.Base.Dell.Wsman.Add.Volume.UpdateXml',
    runJob: 'Job.Dell.Wsman.Add.Volume.UpdateXml',
    requiredOptions: [
Severity: Major
Found in lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js and 34 other locations - About 30 mins to fix
lib/task-data/base-tasks/add-hotspare.js on lines 3..13
lib/task-data/base-tasks/add-volume.js on lines 3..13
lib/task-data/base-tasks/clean-workitems.js on lines 5..12
lib/task-data/base-tasks/copy-key.js on lines 6..13
lib/task-data/base-tasks/delete-volume.js on lines 3..13
lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
lib/task-data/base-tasks/generate-sku.js on lines 5..12
lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi.js on lines 5..12
lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
lib/task-data/base-tasks/password-generation.js on lines 5..12
lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
lib/task-data/base-tasks/redfish.js on lines 5..12
lib/task-data/base-tasks/run-workitems.js on lines 5..12
lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
lib/task-data/base-tasks/snmp.js on lines 5..12
lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
lib/task-data/base-tasks/test-poller.js on lines 5..12
lib/task-data/base-tasks/ucs.js on lines 5..12
lib/task-data/base-tasks/validate-ssh.js on lines 6..13
lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
lib/task-data/base-tasks/wsman.js on lines 5..12

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Wsman Simple Update Firmware Base Task',
    injectableName: 'Task.Base.Dell.Wsman.Simple.Update.Firmware',
    runJob: 'Job.Dell.Wsman.Simple.Update.Firmware',
    requiredOptions: [
Severity: Major
Found in lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js and 34 other locations - About 30 mins to fix
lib/task-data/base-tasks/add-hotspare.js on lines 3..13
lib/task-data/base-tasks/add-volume.js on lines 3..13
lib/task-data/base-tasks/clean-workitems.js on lines 5..12
lib/task-data/base-tasks/copy-key.js on lines 6..13
lib/task-data/base-tasks/delete-volume.js on lines 3..13
lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
lib/task-data/base-tasks/generate-sku.js on lines 5..12
lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
lib/task-data/base-tasks/ipmi.js on lines 5..12
lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
lib/task-data/base-tasks/password-generation.js on lines 5..12
lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
lib/task-data/base-tasks/redfish.js on lines 5..12
lib/task-data/base-tasks/run-workitems.js on lines 5..12
lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
lib/task-data/base-tasks/snmp.js on lines 5..12
lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
lib/task-data/base-tasks/test-poller.js on lines 5..12
lib/task-data/base-tasks/ucs.js on lines 5..12
lib/task-data/base-tasks/validate-ssh.js on lines 6..13
lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
lib/task-data/base-tasks/wsman.js on lines 5..12

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                    _.forEach(_.get(relations, 'targets', []), function(relation) {
                        if (relation === obms[i].config.root) {
                            ids.push(t.id);
                        }
                    });
Severity: Minor
Found in lib/jobs/redfish-discovery-list.js and 1 other location - About 30 mins to fix
lib/jobs/redfish-discovery.js on lines 335..339

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    UcsObmService.prototype.initClient = function(settings) {
        var ucs = new UcsTool();
        ucs.settings = settings;
        return ucs;
    };
Severity: Minor
Found in lib/services/ucs-obm-service.js and 1 other location - About 30 mins to fix
lib/services/redfish-obm-service.js on lines 42..46

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    RedfishObmService.prototype.initClient = function(settings) {
        var redfish = new RedfishTool();
        redfish.settings = settings;
        return redfish;
    };
Severity: Minor
Found in lib/services/redfish-obm-service.js and 1 other location - About 30 mins to fix
lib/services/ucs-obm-service.js on lines 42..46

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                    _.forEach(relations.targets, function(relation) {
                        if (relation === obms[i].config.root) {
                            ids.push(t.id);
                        }
                    });
Severity: Minor
Found in lib/jobs/redfish-discovery.js and 1 other location - About 30 mins to fix
lib/jobs/redfish-discovery-list.js on lines 741..745

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            currentData = _.reduce(data.result, function(result, obj) {
                _.forEach(obj.values, function(val, key) {
                    result[key] = val;
                });
                return result;
Severity: Minor
Found in lib/jobs/snmp-job.js and 1 other location - About 30 mins to fix
lib/jobs/snmp-job.js on lines 126..131

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    BaseObmService.prototype.kill = function() {
        if (this.childProcess) {
            this.childProcess.killSafe();
        }
    };
Severity: Minor
Found in lib/services/base-obm-service.js and 1 other location - About 30 mins to fix
lib/utils/job-utils/ansible.js on lines 45..49

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    AnsibleTool.prototype.kill = function() {
        if(this.childProcess) {
            this.childProcess.killSafe();
        }
    };
Severity: Minor
Found in lib/utils/job-utils/ansible.js and 1 other location - About 30 mins to fix
lib/services/base-obm-service.js on lines 138..142

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    _.set(self.resultCache, keyName, _.reduce(result, function(res, obj) {
                        _.forEach(obj.values, function(val, key) {
                            res[key] = val;
                        });
                        return res;
Severity: Minor
Found in lib/jobs/snmp-job.js and 1 other location - About 30 mins to fix
lib/jobs/snmp-job.js on lines 337..342

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language