RackHD/on-tasks

View on GitHub

Showing 500 of 1,093 total issues

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

module.exports = {
    friendlyName: 'Dell Racadm Catalog Base',
    injectableName: 'Task.Base.Dell.Racadm.Catalog',
    runJob: 'Job.Dell.RacadmCatalog',
    requiredOptions: [
Severity: Major
Found in lib/task-data/base-tasks/racadm-catalog-base.js and 14 other locations - About 35 mins to fix
lib/task-data/base-tasks/ansible.js on lines 5..14
lib/task-data/base-tasks/create-default-pollers.js on lines 5..14
lib/task-data/base-tasks/create-default-redfish-pollers.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-create-repo.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-download-base.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-firmware-collect.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-os-create-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-os-deploy-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-powerthermal.js on lines 5..14
lib/task-data/base-tasks/generate-tag.js on lines 5..14
lib/task-data/base-tasks/racadm-control-base.js on lines 5..14
lib/task-data/base-tasks/run-sku-graph.js on lines 5..14
lib/task-data/base-tasks/shell-reboot.js on lines 5..14
lib/task-data/base-tasks/winpe-bootstrapper.js on lines 5..14

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 46.

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 15 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Dell Wsman Download Job',
    injectableName: 'Task.Base.Dell.Wsman.Download',
    runJob: 'Job.Dell.Wsman.Download',
    requiredOptions: [
Severity: Major
Found in lib/task-data/base-tasks/dell-wsman-download-base.js and 14 other locations - About 35 mins to fix
lib/task-data/base-tasks/ansible.js on lines 5..14
lib/task-data/base-tasks/create-default-pollers.js on lines 5..14
lib/task-data/base-tasks/create-default-redfish-pollers.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-create-repo.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-firmware-collect.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-os-create-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-os-deploy-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-powerthermal.js on lines 5..14
lib/task-data/base-tasks/generate-tag.js on lines 5..14
lib/task-data/base-tasks/racadm-catalog-base.js on lines 5..14
lib/task-data/base-tasks/racadm-control-base.js on lines 5..14
lib/task-data/base-tasks/run-sku-graph.js on lines 5..14
lib/task-data/base-tasks/shell-reboot.js on lines 5..14
lib/task-data/base-tasks/winpe-bootstrapper.js on lines 5..14

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 46.

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 15 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Dell Racadm Control',
    injectableName: 'Task.Base.Dell.Racadm.Control',
    runJob: 'Job.Dell.RacadmTool',
    requiredOptions: [
Severity: Major
Found in lib/task-data/base-tasks/racadm-control-base.js and 14 other locations - About 35 mins to fix
lib/task-data/base-tasks/ansible.js on lines 5..14
lib/task-data/base-tasks/create-default-pollers.js on lines 5..14
lib/task-data/base-tasks/create-default-redfish-pollers.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-create-repo.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-download-base.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-firmware-collect.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-os-create-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-os-deploy-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-powerthermal.js on lines 5..14
lib/task-data/base-tasks/generate-tag.js on lines 5..14
lib/task-data/base-tasks/racadm-catalog-base.js on lines 5..14
lib/task-data/base-tasks/run-sku-graph.js on lines 5..14
lib/task-data/base-tasks/shell-reboot.js on lines 5..14
lib/task-data/base-tasks/winpe-bootstrapper.js on lines 5..14

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 46.

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 15 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Dell Wsman PowerThermal Base',
    injectableName: 'Task.Base.Dell.Wsman.PowerThermal',
    runJob: 'Job.Dell.PowerThermalTool',
    requiredOptions: [
Severity: Major
Found in lib/task-data/base-tasks/dell-wsman-powerthermal.js and 14 other locations - About 35 mins to fix
lib/task-data/base-tasks/ansible.js on lines 5..14
lib/task-data/base-tasks/create-default-pollers.js on lines 5..14
lib/task-data/base-tasks/create-default-redfish-pollers.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-create-repo.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-download-base.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-firmware-collect.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-os-create-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-os-deploy-base.js on lines 4..13
lib/task-data/base-tasks/generate-tag.js on lines 5..14
lib/task-data/base-tasks/racadm-catalog-base.js on lines 5..14
lib/task-data/base-tasks/racadm-control-base.js on lines 5..14
lib/task-data/base-tasks/run-sku-graph.js on lines 5..14
lib/task-data/base-tasks/shell-reboot.js on lines 5..14
lib/task-data/base-tasks/winpe-bootstrapper.js on lines 5..14

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 46.

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 15 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Dell Wsman Firmware Collect Job',
    injectableName: 'Task.Base.Dell.Wsman.Firmware.Collect',
    runJob: 'Job.Dell.Wsman.Firmware.Collect',
    requiredOptions: [
Severity: Major
Found in lib/task-data/base-tasks/dell-wsman-firmware-collect.js and 14 other locations - About 35 mins to fix
lib/task-data/base-tasks/ansible.js on lines 5..14
lib/task-data/base-tasks/create-default-pollers.js on lines 5..14
lib/task-data/base-tasks/create-default-redfish-pollers.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-create-repo.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-download-base.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-os-create-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-os-deploy-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-powerthermal.js on lines 5..14
lib/task-data/base-tasks/generate-tag.js on lines 5..14
lib/task-data/base-tasks/racadm-catalog-base.js on lines 5..14
lib/task-data/base-tasks/racadm-control-base.js on lines 5..14
lib/task-data/base-tasks/run-sku-graph.js on lines 5..14
lib/task-data/base-tasks/shell-reboot.js on lines 5..14
lib/task-data/base-tasks/winpe-bootstrapper.js on lines 5..14

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 46.

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

    Ipmitool.prototype.sel = function(host, user, password, count) {
        return this.runCommand(host, user, password, "-c sel list last " + count);
    };
Severity: Minor
Found in lib/utils/job-utils/ipmitool.js and 1 other location - About 35 mins to fix
lib/utils/job-utils/ipmitool.js on lines 194..196

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 46.

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(target, function(t) {
                deferredObms.push(waterline.obms.findByNode(t.id, 'redfish-obm-service'));
            });
Severity: Minor
Found in lib/jobs/redfish-discovery-list.js and 1 other location - About 35 mins to fix
lib/jobs/redfish-discovery.js on lines 328..330

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 46.

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 15 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Dell Wsman OS Deployment Create Job',
    injectableName: 'Task.Base.Dell.Wsman.Os.Create',
    runJob: 'Job.Dell.Wsman.Os.Create',
    requiredOptions: [
Severity: Major
Found in lib/task-data/base-tasks/dell-wsman-os-create-base.js and 14 other locations - About 35 mins to fix
lib/task-data/base-tasks/ansible.js on lines 5..14
lib/task-data/base-tasks/create-default-pollers.js on lines 5..14
lib/task-data/base-tasks/create-default-redfish-pollers.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-create-repo.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-download-base.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-firmware-collect.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-os-deploy-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-powerthermal.js on lines 5..14
lib/task-data/base-tasks/generate-tag.js on lines 5..14
lib/task-data/base-tasks/racadm-catalog-base.js on lines 5..14
lib/task-data/base-tasks/racadm-control-base.js on lines 5..14
lib/task-data/base-tasks/run-sku-graph.js on lines 5..14
lib/task-data/base-tasks/shell-reboot.js on lines 5..14
lib/task-data/base-tasks/winpe-bootstrapper.js on lines 5..14

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 46.

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 15 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Create Default Pollers',
    injectableName: 'Task.Base.Pollers.CreateDefault',
    runJob: 'Job.Pollers.CreateDefault',
    requiredOptions: [
Severity: Major
Found in lib/task-data/base-tasks/create-default-pollers.js and 14 other locations - About 35 mins to fix
lib/task-data/base-tasks/ansible.js on lines 5..14
lib/task-data/base-tasks/create-default-redfish-pollers.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-create-repo.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-download-base.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-firmware-collect.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-os-create-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-os-deploy-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-powerthermal.js on lines 5..14
lib/task-data/base-tasks/generate-tag.js on lines 5..14
lib/task-data/base-tasks/racadm-catalog-base.js on lines 5..14
lib/task-data/base-tasks/racadm-control-base.js on lines 5..14
lib/task-data/base-tasks/run-sku-graph.js on lines 5..14
lib/task-data/base-tasks/shell-reboot.js on lines 5..14
lib/task-data/base-tasks/winpe-bootstrapper.js on lines 5..14

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 46.

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(target, function(t) {
                deferredObms.push(waterline.obms.findByNode(t.id, 'redfish-obm-service'));
            });
Severity: Minor
Found in lib/jobs/redfish-discovery.js and 1 other location - About 35 mins to fix
lib/jobs/redfish-discovery-list.js on lines 734..736

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 46.

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 15 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Dell Wsman Create Repo Job',
    injectableName: 'Task.Base.Dell.Wsman.Create.Repo',
    runJob: 'Job.Dell.Wsman.Create.Repo',
    requiredOptions: [
Severity: Major
Found in lib/task-data/base-tasks/dell-wsman-create-repo.js and 14 other locations - About 35 mins to fix
lib/task-data/base-tasks/ansible.js on lines 5..14
lib/task-data/base-tasks/create-default-pollers.js on lines 5..14
lib/task-data/base-tasks/create-default-redfish-pollers.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-download-base.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-firmware-collect.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-os-create-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-os-deploy-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-powerthermal.js on lines 5..14
lib/task-data/base-tasks/generate-tag.js on lines 5..14
lib/task-data/base-tasks/racadm-catalog-base.js on lines 5..14
lib/task-data/base-tasks/racadm-control-base.js on lines 5..14
lib/task-data/base-tasks/run-sku-graph.js on lines 5..14
lib/task-data/base-tasks/shell-reboot.js on lines 5..14
lib/task-data/base-tasks/winpe-bootstrapper.js on lines 5..14

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 46.

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 15 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Node shell reboot',
    injectableName: 'Task.Base.ShellReboot',
    runJob: 'Job.Linux.ShellReboot',
    requiredOptions: [
Severity: Major
Found in lib/task-data/base-tasks/shell-reboot.js and 14 other locations - About 35 mins to fix
lib/task-data/base-tasks/ansible.js on lines 5..14
lib/task-data/base-tasks/create-default-pollers.js on lines 5..14
lib/task-data/base-tasks/create-default-redfish-pollers.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-create-repo.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-download-base.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-firmware-collect.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-os-create-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-os-deploy-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-powerthermal.js on lines 5..14
lib/task-data/base-tasks/generate-tag.js on lines 5..14
lib/task-data/base-tasks/racadm-catalog-base.js on lines 5..14
lib/task-data/base-tasks/racadm-control-base.js on lines 5..14
lib/task-data/base-tasks/run-sku-graph.js on lines 5..14
lib/task-data/base-tasks/winpe-bootstrapper.js on lines 5..14

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 46.

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 15 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Dell Wsman OS Deployment Deploy Job',
    injectableName: 'Task.Base.Dell.Wsman.Os.Deploy',
    runJob: 'Job.Dell.Wsman.Os.Deploy',
    requiredOptions: [
Severity: Major
Found in lib/task-data/base-tasks/dell-wsman-os-deploy-base.js and 14 other locations - About 35 mins to fix
lib/task-data/base-tasks/ansible.js on lines 5..14
lib/task-data/base-tasks/create-default-pollers.js on lines 5..14
lib/task-data/base-tasks/create-default-redfish-pollers.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-create-repo.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-download-base.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-firmware-collect.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-os-create-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-powerthermal.js on lines 5..14
lib/task-data/base-tasks/generate-tag.js on lines 5..14
lib/task-data/base-tasks/racadm-catalog-base.js on lines 5..14
lib/task-data/base-tasks/racadm-control-base.js on lines 5..14
lib/task-data/base-tasks/run-sku-graph.js on lines 5..14
lib/task-data/base-tasks/shell-reboot.js on lines 5..14
lib/task-data/base-tasks/winpe-bootstrapper.js on lines 5..14

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 46.

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 15 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Create Default Redfish Pollers',
    injectableName: 'Task.Base.Pollers.Redfish.CreateDefault',
    runJob: 'Job.Pollers.CreateDefault',
    requiredOptions: [
Severity: Major
Found in lib/task-data/base-tasks/create-default-redfish-pollers.js and 14 other locations - About 35 mins to fix
lib/task-data/base-tasks/ansible.js on lines 5..14
lib/task-data/base-tasks/create-default-pollers.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-create-repo.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-download-base.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-firmware-collect.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-os-create-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-os-deploy-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-powerthermal.js on lines 5..14
lib/task-data/base-tasks/generate-tag.js on lines 5..14
lib/task-data/base-tasks/racadm-catalog-base.js on lines 5..14
lib/task-data/base-tasks/racadm-control-base.js on lines 5..14
lib/task-data/base-tasks/run-sku-graph.js on lines 5..14
lib/task-data/base-tasks/shell-reboot.js on lines 5..14
lib/task-data/base-tasks/winpe-bootstrapper.js on lines 5..14

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 46.

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 15 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'WinPE.Bootstrapper',
    injectableName: 'Task.Base.WinPE.Bootstrap',
    runJob: 'Job.WinPE.Bootstrap',
    requiredOptions: [
Severity: Major
Found in lib/task-data/base-tasks/winpe-bootstrapper.js and 14 other locations - About 35 mins to fix
lib/task-data/base-tasks/ansible.js on lines 5..14
lib/task-data/base-tasks/create-default-pollers.js on lines 5..14
lib/task-data/base-tasks/create-default-redfish-pollers.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-create-repo.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-download-base.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-firmware-collect.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-os-create-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-os-deploy-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-powerthermal.js on lines 5..14
lib/task-data/base-tasks/generate-tag.js on lines 5..14
lib/task-data/base-tasks/racadm-catalog-base.js on lines 5..14
lib/task-data/base-tasks/racadm-control-base.js on lines 5..14
lib/task-data/base-tasks/run-sku-graph.js on lines 5..14
lib/task-data/base-tasks/shell-reboot.js on lines 5..14

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 46.

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 3 locations. Consider refactoring.
Open

                if (data.stdout.length === 0 )  {
                    return Promise.resolve({ source: bmcsource, data: '', store: false });
                }
Severity: Minor
Found in lib/utils/job-utils/command-parser.js and 2 other locations - About 35 mins to fix
lib/utils/job-utils/command-parser.js on lines 105..107
lib/utils/job-utils/command-parser.js on lines 163..165

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 46.

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

    Ipmitool.prototype.selEntry = function(host, user, password, stringEntries) {
        return this.runCommand(host, user, password, "sel get " + stringEntries);
    };
Severity: Minor
Found in lib/utils/job-utils/ipmitool.js and 1 other location - About 35 mins to fix
lib/utils/job-utils/ipmitool.js on lines 182..184

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 46.

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 Node Update',
    injectableName: 'Task.Base.Node.Update',
    runJob: 'Job.Snmp.Node.Update',
    requiredOptions: [],
Severity: Major
Found in lib/task-data/base-tasks/snmp-node-update.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-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: 'PDU nodes Relations',
    injectableName: 'Task.Base.Catalog.PduRelations',
    runJob: 'Job.Catalog.PduRelations',
    requiredOptions: [],
Severity: Major
Found in lib/task-data/base-tasks/pdu-node-relations.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/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: '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

Severity
Category
Status
Source
Language