RackHD/on-tasks

View on GitHub

Showing 1,093 of 1,093 total issues

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

module.exports = {
    friendlyName: 'Wsman Requester',
    injectableName: 'Task.Base.Wsman',
    runJob: 'Job.Wsman',
    requiredOptions: [],
Severity: Major
Found in lib/task-data/base-tasks/wsman.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/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

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: 'Redfish Update Lookups',
    injectableName: 'Task.Base.Redfish.Update.Lookups',
    runJob: 'Job.Redfish.Update.Lookups',
    requiredOptions: [],
Severity: Major
Found in lib/task-data/base-tasks/redfish-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.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 35 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Wsman Update Lookups',
    injectableName: 'Task.Base.Wsman.Update.Lookups',
    runJob: 'Job.Wsman.Update.Lookups',
    requiredOptions: [],
Severity: Major
Found in lib/task-data/base-tasks/dell-wsman-update-lookups-base.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/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: 'Delete Volume Base Task',
    injectableName: 'Task.Base.Delete.Volume',
    runJob: 'Job.Delete.Volume',
    requiredOptions: [
Severity: Major
Found in lib/task-data/base-tasks/delete-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/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/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 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

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

Avoid too many return statements within this function.
Open

                return Promise.resolve({source: userListSource, error: e});
Severity: Major
Found in lib/utils/job-utils/command-parser.js - About 30 mins to fix

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

    module.exports = {
        friendlyName: 'Download http file',
        injectableName: 'Task.Base.Download.Http.File',
        runJob: 'Job.Download.File',
        requiredOptions: [],
    Severity: Major
    Found in lib/task-data/base-tasks/download-http-file-base.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/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: "Dell Wsman Add Hotspare UpdateXml Base Task",
        injectableName: "Task.Base.Dell.Wsman.Add.Hotspare.UpdateXml",
        runJob: 'Job.Dell.Wsman.Add.Hotspare.UpdateXml',
        requiredOptions: [],
    Severity: Major
    Found in lib/task-data/base-tasks/dell-wsman-add-hotspare-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-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: 'Node Discovered Alerts',
        injectableName: 'Task.Base.Alert.Node.Discovered',
        runJob: 'Job.Alert.Node.Discovered',
        requiredOptions: [],
    Severity: Major
    Found in lib/task-data/base-tasks/node-discovered-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/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 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 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 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(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

    Avoid too many return statements within this function.
    Open

                    return Promise.resolve({
                        source: data.source,
                        data: { data: data.stdout },
                        store: true
                    });
    Severity: Major
    Found in lib/utils/job-utils/command-parser.js - About 30 mins to fix

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

      module.exports = {
          friendlyName: 'Base Notification Trigger',
          injectableName: 'Task.Base.Wait.Notification',
          runJob: 'Job.Wait.Notification',
          requiredOptions: [],
      Severity: Major
      Found in lib/task-data/base-tasks/wait-for-notification.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/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/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 GetComponent Base Task',
          injectableName: 'Task.Base.Dell.Wsman.GetXml',
          runJob: 'Job.Dell.Wsman.GetXml',
          requiredOptions: [
      Severity: Major
      Found in lib/task-data/base-tasks/dell-wsman-getXml.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-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

      Severity
      Category
      Status
      Source
      Language