HewlettPackard/oneview-puppet

View on GitHub

Showing 48 of 92 total issues

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

  desc "Oneview's Enclosure Group"

  # :nocov:
  ensurable do
    defaultvalues
Severity: Major
Found in lib/puppet/type/oneview_enclosure_group.rb and 2 other locations - About 55 mins to fix
lib/puppet/type/oneview_logical_interconnect_group.rb on lines 18..46
lib/puppet/type/oneview_storage_pool.rb on lines 18..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 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

  desc "Oneview's Logical Interconnect Group"

  #:nocov:
  ensurable do
    defaultvalues
Severity: Major
Found in lib/puppet/type/oneview_logical_interconnect_group.rb and 2 other locations - About 55 mins to fix
lib/puppet/type/oneview_enclosure_group.rb on lines 18..45
lib/puppet/type/oneview_storage_pool.rb on lines 18..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 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

  desc "Oneview's Storage Pool"

  ensurable do
    defaultvalues

Severity: Major
Found in lib/puppet/type/oneview_storage_pool.rb and 2 other locations - About 55 mins to fix
lib/puppet/type/oneview_enclosure_group.rb on lines 18..45
lib/puppet/type/oneview_logical_interconnect_group.rb on lines 18..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 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

  def get_type
    if @data['name']
      Puppet.notice "\n\n Search for switch type #{@data['name']} started, displaying results bellow:\n"
      results = @resource_type.get_type(@client, @data['name'])
      raise "\n\n No switch types corresponding to the name #{@data['name']} were found.\n" unless results
Severity: Minor
Found in lib/puppet/provider/oneview_switch/c7000.rb and 1 other location - About 50 mins to fix
lib/puppet/provider/oneview_switch/synergy.rb on lines 40..50

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

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

  def get_type
    if @data['name']
      Puppet.notice "\n\n Search for switch type #{@data['name']} started, displaying results bellow:\n"
      results = @resource_type.get_type(@client, @data['name'])
      raise "\n\n No switch types corresponding to the name #{@data['name']} were found.\n" unless results
Severity: Minor
Found in lib/puppet/provider/oneview_switch/synergy.rb and 1 other location - About 50 mins to fix
lib/puppet/provider/oneview_switch/c7000.rb on lines 42..52

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

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

  desc "Oneview's Unmanaged Device"

  # :nocov:
  ensurable do
    defaultvalues
Severity: Major
Found in lib/puppet/type/oneview_unmanaged_device.rb and 3 other locations - About 45 mins to fix
lib/puppet/type/oneview_drive_enclosure.rb on lines 18..43
lib/puppet/type/oneview_logical_downlink.rb on lines 18..42
lib/puppet/type/oneview_network_set.rb on lines 18..42

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

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

  desc "OneView's Drive Enclosure"

  ensurable do
    defaultvalues

Severity: Major
Found in lib/puppet/type/oneview_drive_enclosure.rb and 3 other locations - About 45 mins to fix
lib/puppet/type/oneview_logical_downlink.rb on lines 18..42
lib/puppet/type/oneview_network_set.rb on lines 18..42
lib/puppet/type/oneview_unmanaged_device.rb on lines 18..40

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

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

  desc "Oneview's Network Set"

  # :nocov:
  ensurable do
    defaultvalues
Severity: Major
Found in lib/puppet/type/oneview_network_set.rb and 3 other locations - About 45 mins to fix
lib/puppet/type/oneview_drive_enclosure.rb on lines 18..43
lib/puppet/type/oneview_logical_downlink.rb on lines 18..42
lib/puppet/type/oneview_unmanaged_device.rb on lines 18..40

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

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

  desc "Oneview's Logical Downlink"

  # :nocov:
  ensurable do
    defaultvalues
Severity: Major
Found in lib/puppet/type/oneview_logical_downlink.rb and 3 other locations - About 45 mins to fix
lib/puppet/type/oneview_drive_enclosure.rb on lines 18..43
lib/puppet/type/oneview_network_set.rb on lines 18..42
lib/puppet/type/oneview_unmanaged_device.rb on lines 18..40

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

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

  desc "Oneview's Server Hardware Type"

  ensurable do
    defaultvalues
    # :nocov:
Severity: Minor
Found in lib/puppet/type/oneview_server_hardware_type.rb and 1 other location - About 40 mins to fix
lib/puppet/type/oneview_san_manager.rb on lines 18..37

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

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

  desc "Oneview's SAN Manager"

  ensurable do
    defaultvalues
    # :nocov:
Severity: Minor
Found in lib/puppet/type/oneview_san_manager.rb and 1 other location - About 40 mins to fix
lib/puppet/type/oneview_server_hardware_type.rb on lines 18..39

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

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

  desc "Oneview's OS Deployment plan"

  ensurable do
    defaultvalues

Severity: Major
Found in lib/puppet/type/oneview_os_deployment_plan.rb and 8 other locations - About 35 mins to fix
lib/puppet/type/oneview_fc_network.rb on lines 18..38
lib/puppet/type/oneview_fcoe_network.rb on lines 18..37
lib/puppet/type/oneview_firmware_driver.rb on lines 18..38
lib/puppet/type/oneview_hypervisor_cluster_profile.rb on lines 18..35
lib/puppet/type/oneview_hypervisor_manager.rb on lines 18..34
lib/puppet/type/oneview_logical_switch_group.rb on lines 18..37
lib/puppet/type/oneview_sas_logical_interconnect_group.rb on lines 18..37
lib/puppet/type/oneview_uplink_set.rb on lines 18..38

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

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

  desc "Oneview's SAS Logical Interconnect Group"

  #:nocov:
  ensurable do
    defaultvalues
Severity: Major
Found in lib/puppet/type/oneview_sas_logical_interconnect_group.rb and 8 other locations - About 35 mins to fix
lib/puppet/type/oneview_fc_network.rb on lines 18..38
lib/puppet/type/oneview_fcoe_network.rb on lines 18..37
lib/puppet/type/oneview_firmware_driver.rb on lines 18..38
lib/puppet/type/oneview_hypervisor_cluster_profile.rb on lines 18..35
lib/puppet/type/oneview_hypervisor_manager.rb on lines 18..34
lib/puppet/type/oneview_logical_switch_group.rb on lines 18..37
lib/puppet/type/oneview_os_deployment_plan.rb on lines 18..38
lib/puppet/type/oneview_uplink_set.rb on lines 18..38

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

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

  desc "Oneview's Uplink Set"

  ensurable do
    defaultvalues

Severity: Major
Found in lib/puppet/type/oneview_uplink_set.rb and 8 other locations - About 35 mins to fix
lib/puppet/type/oneview_fc_network.rb on lines 18..38
lib/puppet/type/oneview_fcoe_network.rb on lines 18..37
lib/puppet/type/oneview_firmware_driver.rb on lines 18..38
lib/puppet/type/oneview_hypervisor_cluster_profile.rb on lines 18..35
lib/puppet/type/oneview_hypervisor_manager.rb on lines 18..34
lib/puppet/type/oneview_logical_switch_group.rb on lines 18..37
lib/puppet/type/oneview_os_deployment_plan.rb on lines 18..38
lib/puppet/type/oneview_sas_logical_interconnect_group.rb on lines 18..37

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

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

  desc "Oneview's FCoE network"

  # :nocov:
  ensurable do
    defaultvalues
Severity: Major
Found in lib/puppet/type/oneview_fcoe_network.rb and 8 other locations - About 35 mins to fix
lib/puppet/type/oneview_fc_network.rb on lines 18..38
lib/puppet/type/oneview_firmware_driver.rb on lines 18..38
lib/puppet/type/oneview_hypervisor_cluster_profile.rb on lines 18..35
lib/puppet/type/oneview_hypervisor_manager.rb on lines 18..34
lib/puppet/type/oneview_logical_switch_group.rb on lines 18..37
lib/puppet/type/oneview_os_deployment_plan.rb on lines 18..38
lib/puppet/type/oneview_sas_logical_interconnect_group.rb on lines 18..37
lib/puppet/type/oneview_uplink_set.rb on lines 18..38

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

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

  desc "Oneview's Hypervisor Cluster Profile"
  ensurable do
    defaultvalues
    # :nocov:
    # Get Methods
Severity: Major
Found in lib/puppet/type/oneview_hypervisor_cluster_profile.rb and 8 other locations - About 35 mins to fix
lib/puppet/type/oneview_fc_network.rb on lines 18..38
lib/puppet/type/oneview_fcoe_network.rb on lines 18..37
lib/puppet/type/oneview_firmware_driver.rb on lines 18..38
lib/puppet/type/oneview_hypervisor_manager.rb on lines 18..34
lib/puppet/type/oneview_logical_switch_group.rb on lines 18..37
lib/puppet/type/oneview_os_deployment_plan.rb on lines 18..38
lib/puppet/type/oneview_sas_logical_interconnect_group.rb on lines 18..37
lib/puppet/type/oneview_uplink_set.rb on lines 18..38

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

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

  desc "Oneview's FC network"

  # :nocov:
  # Get methods
  ensurable do
Severity: Major
Found in lib/puppet/type/oneview_fc_network.rb and 8 other locations - About 35 mins to fix
lib/puppet/type/oneview_fcoe_network.rb on lines 18..37
lib/puppet/type/oneview_firmware_driver.rb on lines 18..38
lib/puppet/type/oneview_hypervisor_cluster_profile.rb on lines 18..35
lib/puppet/type/oneview_hypervisor_manager.rb on lines 18..34
lib/puppet/type/oneview_logical_switch_group.rb on lines 18..37
lib/puppet/type/oneview_os_deployment_plan.rb on lines 18..38
lib/puppet/type/oneview_sas_logical_interconnect_group.rb on lines 18..37
lib/puppet/type/oneview_uplink_set.rb on lines 18..38

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

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

  desc "Oneview's Hypervisor Manager"
  # :nocov:
  # Get methods
  ensurable do
    defaultvalues
Severity: Major
Found in lib/puppet/type/oneview_hypervisor_manager.rb and 8 other locations - About 35 mins to fix
lib/puppet/type/oneview_fc_network.rb on lines 18..38
lib/puppet/type/oneview_fcoe_network.rb on lines 18..37
lib/puppet/type/oneview_firmware_driver.rb on lines 18..38
lib/puppet/type/oneview_hypervisor_cluster_profile.rb on lines 18..35
lib/puppet/type/oneview_logical_switch_group.rb on lines 18..37
lib/puppet/type/oneview_os_deployment_plan.rb on lines 18..38
lib/puppet/type/oneview_sas_logical_interconnect_group.rb on lines 18..37
lib/puppet/type/oneview_uplink_set.rb on lines 18..38

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

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

  desc "Oneview's Logical Switch Group"

  # :nocov:
  ensurable do
    defaultvalues
Severity: Major
Found in lib/puppet/type/oneview_logical_switch_group.rb and 8 other locations - About 35 mins to fix
lib/puppet/type/oneview_fc_network.rb on lines 18..38
lib/puppet/type/oneview_fcoe_network.rb on lines 18..37
lib/puppet/type/oneview_firmware_driver.rb on lines 18..38
lib/puppet/type/oneview_hypervisor_cluster_profile.rb on lines 18..35
lib/puppet/type/oneview_hypervisor_manager.rb on lines 18..34
lib/puppet/type/oneview_os_deployment_plan.rb on lines 18..38
lib/puppet/type/oneview_sas_logical_interconnect_group.rb on lines 18..37
lib/puppet/type/oneview_uplink_set.rb on lines 18..38

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

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

  desc "Oneview's Firmware Driver"

  ensurable do
    defaultvalues
    # :nocov:
Severity: Major
Found in lib/puppet/type/oneview_firmware_driver.rb and 8 other locations - About 35 mins to fix
lib/puppet/type/oneview_fc_network.rb on lines 18..38
lib/puppet/type/oneview_fcoe_network.rb on lines 18..37
lib/puppet/type/oneview_hypervisor_cluster_profile.rb on lines 18..35
lib/puppet/type/oneview_hypervisor_manager.rb on lines 18..34
lib/puppet/type/oneview_logical_switch_group.rb on lines 18..37
lib/puppet/type/oneview_os_deployment_plan.rb on lines 18..38
lib/puppet/type/oneview_sas_logical_interconnect_group.rb on lines 18..37
lib/puppet/type/oneview_uplink_set.rb on lines 18..38

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

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