HewlettPackard/oneview-sdk-ruby

View on GitHub

Showing 109 of 225 total issues

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

module OneviewSDK
  # Module for API v1600
  module API1600
    SUPPORTED_VARIANTS = %w[C7000 Synergy].freeze
    DEFAULT_VARIANT = 'C7000'.freeze
Severity: Major
Found in lib/oneview-sdk/resource/api1600.rb and 13 other locations - About 3 hrs to fix
lib/oneview-sdk/resource/api1000.rb on lines 12..60
lib/oneview-sdk/resource/api1200.rb on lines 12..60
lib/oneview-sdk/resource/api1800.rb on lines 12..60
lib/oneview-sdk/resource/api2000.rb on lines 12..60
lib/oneview-sdk/resource/api2200.rb on lines 12..60
lib/oneview-sdk/resource/api2400.rb on lines 12..60
lib/oneview-sdk/resource/api2600.rb on lines 12..60
lib/oneview-sdk/resource/api2800.rb on lines 12..60
lib/oneview-sdk/resource/api300.rb on lines 12..60
lib/oneview-sdk/resource/api3000.rb on lines 12..60
lib/oneview-sdk/resource/api500.rb on lines 12..60
lib/oneview-sdk/resource/api600.rb on lines 12..60
lib/oneview-sdk/resource/api800.rb on lines 12..60

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

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

module OneviewSDK
  # Module for API v800
  module API800
    SUPPORTED_VARIANTS = %w[C7000 Synergy].freeze
    DEFAULT_VARIANT = 'C7000'.freeze
Severity: Major
Found in lib/oneview-sdk/resource/api800.rb and 13 other locations - About 3 hrs to fix
lib/oneview-sdk/resource/api1000.rb on lines 12..60
lib/oneview-sdk/resource/api1200.rb on lines 12..60
lib/oneview-sdk/resource/api1600.rb on lines 12..60
lib/oneview-sdk/resource/api1800.rb on lines 12..60
lib/oneview-sdk/resource/api2000.rb on lines 12..60
lib/oneview-sdk/resource/api2200.rb on lines 12..60
lib/oneview-sdk/resource/api2400.rb on lines 12..60
lib/oneview-sdk/resource/api2600.rb on lines 12..60
lib/oneview-sdk/resource/api2800.rb on lines 12..60
lib/oneview-sdk/resource/api300.rb on lines 12..60
lib/oneview-sdk/resource/api3000.rb on lines 12..60
lib/oneview-sdk/resource/api500.rb on lines 12..60
lib/oneview-sdk/resource/api600.rb on lines 12..60

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

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

module OneviewSDK
  # Module for API v3000
  module API3000
    SUPPORTED_VARIANTS = %w[C7000 Synergy].freeze
    DEFAULT_VARIANT = 'C7000'.freeze
Severity: Major
Found in lib/oneview-sdk/resource/api3000.rb and 13 other locations - About 3 hrs to fix
lib/oneview-sdk/resource/api1000.rb on lines 12..60
lib/oneview-sdk/resource/api1200.rb on lines 12..60
lib/oneview-sdk/resource/api1600.rb on lines 12..60
lib/oneview-sdk/resource/api1800.rb on lines 12..60
lib/oneview-sdk/resource/api2000.rb on lines 12..60
lib/oneview-sdk/resource/api2200.rb on lines 12..60
lib/oneview-sdk/resource/api2400.rb on lines 12..60
lib/oneview-sdk/resource/api2600.rb on lines 12..60
lib/oneview-sdk/resource/api2800.rb on lines 12..60
lib/oneview-sdk/resource/api300.rb on lines 12..60
lib/oneview-sdk/resource/api500.rb on lines 12..60
lib/oneview-sdk/resource/api600.rb on lines 12..60
lib/oneview-sdk/resource/api800.rb on lines 12..60

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

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

module OneviewSDK
  # Module for API v1000
  module API1000
    SUPPORTED_VARIANTS = %w[C7000 Synergy].freeze
    DEFAULT_VARIANT = 'C7000'.freeze
Severity: Major
Found in lib/oneview-sdk/resource/api1000.rb and 13 other locations - About 3 hrs to fix
lib/oneview-sdk/resource/api1200.rb on lines 12..60
lib/oneview-sdk/resource/api1600.rb on lines 12..60
lib/oneview-sdk/resource/api1800.rb on lines 12..60
lib/oneview-sdk/resource/api2000.rb on lines 12..60
lib/oneview-sdk/resource/api2200.rb on lines 12..60
lib/oneview-sdk/resource/api2400.rb on lines 12..60
lib/oneview-sdk/resource/api2600.rb on lines 12..60
lib/oneview-sdk/resource/api2800.rb on lines 12..60
lib/oneview-sdk/resource/api300.rb on lines 12..60
lib/oneview-sdk/resource/api3000.rb on lines 12..60
lib/oneview-sdk/resource/api500.rb on lines 12..60
lib/oneview-sdk/resource/api600.rb on lines 12..60
lib/oneview-sdk/resource/api800.rb on lines 12..60

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

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

module OneviewSDK
  # Module for API v600
  module API600
    SUPPORTED_VARIANTS = %w[C7000 Synergy].freeze
    DEFAULT_VARIANT = 'C7000'.freeze
Severity: Major
Found in lib/oneview-sdk/resource/api600.rb and 13 other locations - About 3 hrs to fix
lib/oneview-sdk/resource/api1000.rb on lines 12..60
lib/oneview-sdk/resource/api1200.rb on lines 12..60
lib/oneview-sdk/resource/api1600.rb on lines 12..60
lib/oneview-sdk/resource/api1800.rb on lines 12..60
lib/oneview-sdk/resource/api2000.rb on lines 12..60
lib/oneview-sdk/resource/api2200.rb on lines 12..60
lib/oneview-sdk/resource/api2400.rb on lines 12..60
lib/oneview-sdk/resource/api2600.rb on lines 12..60
lib/oneview-sdk/resource/api2800.rb on lines 12..60
lib/oneview-sdk/resource/api300.rb on lines 12..60
lib/oneview-sdk/resource/api3000.rb on lines 12..60
lib/oneview-sdk/resource/api500.rb on lines 12..60
lib/oneview-sdk/resource/api800.rb on lines 12..60

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

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

module OneviewSDK
  # Module for API v2200
  module API2200
    SUPPORTED_VARIANTS = %w[C7000 Synergy].freeze
    DEFAULT_VARIANT = 'C7000'.freeze
Severity: Major
Found in lib/oneview-sdk/resource/api2200.rb and 13 other locations - About 3 hrs to fix
lib/oneview-sdk/resource/api1000.rb on lines 12..60
lib/oneview-sdk/resource/api1200.rb on lines 12..60
lib/oneview-sdk/resource/api1600.rb on lines 12..60
lib/oneview-sdk/resource/api1800.rb on lines 12..60
lib/oneview-sdk/resource/api2000.rb on lines 12..60
lib/oneview-sdk/resource/api2400.rb on lines 12..60
lib/oneview-sdk/resource/api2600.rb on lines 12..60
lib/oneview-sdk/resource/api2800.rb on lines 12..60
lib/oneview-sdk/resource/api300.rb on lines 12..60
lib/oneview-sdk/resource/api3000.rb on lines 12..60
lib/oneview-sdk/resource/api500.rb on lines 12..60
lib/oneview-sdk/resource/api600.rb on lines 12..60
lib/oneview-sdk/resource/api800.rb on lines 12..60

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

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

module OneviewSDK
  # Module for API v1200
  module API1200
    SUPPORTED_VARIANTS = %w[C7000 Synergy].freeze
    DEFAULT_VARIANT = 'C7000'.freeze
Severity: Major
Found in lib/oneview-sdk/resource/api1200.rb and 13 other locations - About 3 hrs to fix
lib/oneview-sdk/resource/api1000.rb on lines 12..60
lib/oneview-sdk/resource/api1600.rb on lines 12..60
lib/oneview-sdk/resource/api1800.rb on lines 12..60
lib/oneview-sdk/resource/api2000.rb on lines 12..60
lib/oneview-sdk/resource/api2200.rb on lines 12..60
lib/oneview-sdk/resource/api2400.rb on lines 12..60
lib/oneview-sdk/resource/api2600.rb on lines 12..60
lib/oneview-sdk/resource/api2800.rb on lines 12..60
lib/oneview-sdk/resource/api300.rb on lines 12..60
lib/oneview-sdk/resource/api3000.rb on lines 12..60
lib/oneview-sdk/resource/api500.rb on lines 12..60
lib/oneview-sdk/resource/api600.rb on lines 12..60
lib/oneview-sdk/resource/api800.rb on lines 12..60

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

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

module OneviewSDK
  # Module for API v1800
  module API1800
    SUPPORTED_VARIANTS = %w[C7000 Synergy].freeze
    DEFAULT_VARIANT = 'C7000'.freeze
Severity: Major
Found in lib/oneview-sdk/resource/api1800.rb and 13 other locations - About 3 hrs to fix
lib/oneview-sdk/resource/api1000.rb on lines 12..60
lib/oneview-sdk/resource/api1200.rb on lines 12..60
lib/oneview-sdk/resource/api1600.rb on lines 12..60
lib/oneview-sdk/resource/api2000.rb on lines 12..60
lib/oneview-sdk/resource/api2200.rb on lines 12..60
lib/oneview-sdk/resource/api2400.rb on lines 12..60
lib/oneview-sdk/resource/api2600.rb on lines 12..60
lib/oneview-sdk/resource/api2800.rb on lines 12..60
lib/oneview-sdk/resource/api300.rb on lines 12..60
lib/oneview-sdk/resource/api3000.rb on lines 12..60
lib/oneview-sdk/resource/api500.rb on lines 12..60
lib/oneview-sdk/resource/api600.rb on lines 12..60
lib/oneview-sdk/resource/api800.rb on lines 12..60

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

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

module OneviewSDK
  # Module for API v2800
  module API2800
    SUPPORTED_VARIANTS = %w[C7000 Synergy].freeze
    DEFAULT_VARIANT = 'C7000'.freeze
Severity: Major
Found in lib/oneview-sdk/resource/api2800.rb and 13 other locations - About 3 hrs to fix
lib/oneview-sdk/resource/api1000.rb on lines 12..60
lib/oneview-sdk/resource/api1200.rb on lines 12..60
lib/oneview-sdk/resource/api1600.rb on lines 12..60
lib/oneview-sdk/resource/api1800.rb on lines 12..60
lib/oneview-sdk/resource/api2000.rb on lines 12..60
lib/oneview-sdk/resource/api2200.rb on lines 12..60
lib/oneview-sdk/resource/api2400.rb on lines 12..60
lib/oneview-sdk/resource/api2600.rb on lines 12..60
lib/oneview-sdk/resource/api300.rb on lines 12..60
lib/oneview-sdk/resource/api3000.rb on lines 12..60
lib/oneview-sdk/resource/api500.rb on lines 12..60
lib/oneview-sdk/resource/api600.rb on lines 12..60
lib/oneview-sdk/resource/api800.rb on lines 12..60

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

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

module OneviewSDK
  # Module for API v2000
  module API2000
    SUPPORTED_VARIANTS = %w[C7000 Synergy].freeze
    DEFAULT_VARIANT = 'C7000'.freeze
Severity: Major
Found in lib/oneview-sdk/resource/api2000.rb and 13 other locations - About 3 hrs to fix
lib/oneview-sdk/resource/api1000.rb on lines 12..60
lib/oneview-sdk/resource/api1200.rb on lines 12..60
lib/oneview-sdk/resource/api1600.rb on lines 12..60
lib/oneview-sdk/resource/api1800.rb on lines 12..60
lib/oneview-sdk/resource/api2200.rb on lines 12..60
lib/oneview-sdk/resource/api2400.rb on lines 12..60
lib/oneview-sdk/resource/api2600.rb on lines 12..60
lib/oneview-sdk/resource/api2800.rb on lines 12..60
lib/oneview-sdk/resource/api300.rb on lines 12..60
lib/oneview-sdk/resource/api3000.rb on lines 12..60
lib/oneview-sdk/resource/api500.rb on lines 12..60
lib/oneview-sdk/resource/api600.rb on lines 12..60
lib/oneview-sdk/resource/api800.rb on lines 12..60

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

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

module OneviewSDK
  # Module for API v2600
  module API2600
    SUPPORTED_VARIANTS = %w[C7000 Synergy].freeze
    DEFAULT_VARIANT = 'C7000'.freeze
Severity: Major
Found in lib/oneview-sdk/resource/api2600.rb and 13 other locations - About 3 hrs to fix
lib/oneview-sdk/resource/api1000.rb on lines 12..60
lib/oneview-sdk/resource/api1200.rb on lines 12..60
lib/oneview-sdk/resource/api1600.rb on lines 12..60
lib/oneview-sdk/resource/api1800.rb on lines 12..60
lib/oneview-sdk/resource/api2000.rb on lines 12..60
lib/oneview-sdk/resource/api2200.rb on lines 12..60
lib/oneview-sdk/resource/api2400.rb on lines 12..60
lib/oneview-sdk/resource/api2800.rb on lines 12..60
lib/oneview-sdk/resource/api300.rb on lines 12..60
lib/oneview-sdk/resource/api3000.rb on lines 12..60
lib/oneview-sdk/resource/api500.rb on lines 12..60
lib/oneview-sdk/resource/api600.rb on lines 12..60
lib/oneview-sdk/resource/api800.rb on lines 12..60

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

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

module OneviewSDK
  # Module for API v2400
  module API2400
    SUPPORTED_VARIANTS = %w[C7000 Synergy].freeze
    DEFAULT_VARIANT = 'C7000'.freeze
Severity: Major
Found in lib/oneview-sdk/resource/api2400.rb and 13 other locations - About 3 hrs to fix
lib/oneview-sdk/resource/api1000.rb on lines 12..60
lib/oneview-sdk/resource/api1200.rb on lines 12..60
lib/oneview-sdk/resource/api1600.rb on lines 12..60
lib/oneview-sdk/resource/api1800.rb on lines 12..60
lib/oneview-sdk/resource/api2000.rb on lines 12..60
lib/oneview-sdk/resource/api2200.rb on lines 12..60
lib/oneview-sdk/resource/api2600.rb on lines 12..60
lib/oneview-sdk/resource/api2800.rb on lines 12..60
lib/oneview-sdk/resource/api300.rb on lines 12..60
lib/oneview-sdk/resource/api3000.rb on lines 12..60
lib/oneview-sdk/resource/api500.rb on lines 12..60
lib/oneview-sdk/resource/api600.rb on lines 12..60
lib/oneview-sdk/resource/api800.rb on lines 12..60

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

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

module OneviewSDK
  # Module for API v500
  module API500
    SUPPORTED_VARIANTS = %w[C7000 Synergy].freeze
    DEFAULT_VARIANT = 'C7000'.freeze
Severity: Major
Found in lib/oneview-sdk/resource/api500.rb and 13 other locations - About 3 hrs to fix
lib/oneview-sdk/resource/api1000.rb on lines 12..60
lib/oneview-sdk/resource/api1200.rb on lines 12..60
lib/oneview-sdk/resource/api1600.rb on lines 12..60
lib/oneview-sdk/resource/api1800.rb on lines 12..60
lib/oneview-sdk/resource/api2000.rb on lines 12..60
lib/oneview-sdk/resource/api2200.rb on lines 12..60
lib/oneview-sdk/resource/api2400.rb on lines 12..60
lib/oneview-sdk/resource/api2600.rb on lines 12..60
lib/oneview-sdk/resource/api2800.rb on lines 12..60
lib/oneview-sdk/resource/api300.rb on lines 12..60
lib/oneview-sdk/resource/api3000.rb on lines 12..60
lib/oneview-sdk/resource/api600.rb on lines 12..60
lib/oneview-sdk/resource/api800.rb on lines 12..60

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

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

module OneviewSDK
  # Module for API v300
  module API300
    SUPPORTED_VARIANTS = %w[C7000 Synergy].freeze
    DEFAULT_VARIANT = 'C7000'.freeze
Severity: Major
Found in lib/oneview-sdk/resource/api300.rb and 13 other locations - About 3 hrs to fix
lib/oneview-sdk/resource/api1000.rb on lines 12..60
lib/oneview-sdk/resource/api1200.rb on lines 12..60
lib/oneview-sdk/resource/api1600.rb on lines 12..60
lib/oneview-sdk/resource/api1800.rb on lines 12..60
lib/oneview-sdk/resource/api2000.rb on lines 12..60
lib/oneview-sdk/resource/api2200.rb on lines 12..60
lib/oneview-sdk/resource/api2400.rb on lines 12..60
lib/oneview-sdk/resource/api2600.rb on lines 12..60
lib/oneview-sdk/resource/api2800.rb on lines 12..60
lib/oneview-sdk/resource/api3000.rb on lines 12..60
lib/oneview-sdk/resource/api500.rb on lines 12..60
lib/oneview-sdk/resource/api600.rb on lines 12..60
lib/oneview-sdk/resource/api800.rb on lines 12..60

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

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

module OneviewSDK
  module API600
    module C7000
      # Enclosure resource implementation for API600 C7000
      class Enclosure < OneviewSDK::API500::C7000::Enclosure
Severity: Major
Found in lib/oneview-sdk/resource/api600/c7000/enclosure.rb and 1 other location - About 3 hrs to fix
lib/oneview-sdk/resource/api600/synergy/enclosure.rb on lines 14..66

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

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

module OneviewSDK
  module API600
    module Synergy
      # Enclosure resource implementation for API600 Synergy
      class Enclosure < OneviewSDK::API500::Synergy::Enclosure
Severity: Major
Found in lib/oneview-sdk/resource/api600/synergy/enclosure.rb and 1 other location - About 3 hrs to fix
lib/oneview-sdk/resource/api600/c7000/enclosure.rb on lines 14..66

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

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

module OneviewSDK
  module API600
    module Synergy
      # Ethernet network resource implementation for API600 Synergy
      class EthernetNetwork < OneviewSDK::API500::Synergy::EthernetNetwork
Severity: Major
Found in lib/oneview-sdk/resource/api600/synergy/ethernet_network.rb and 1 other location - About 2 hrs to fix
lib/oneview-sdk/resource/api600/c7000/ethernet_network.rb on lines 14..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 92.

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

module OneviewSDK
  module API600
    module C7000
      # Ethernet network resource implementation for API600 C7000
      class EthernetNetwork < OneviewSDK::API500::C7000::EthernetNetwork
Severity: Major
Found in lib/oneview-sdk/resource/api600/c7000/ethernet_network.rb and 1 other location - About 2 hrs to fix
lib/oneview-sdk/resource/api600/synergy/ethernet_network.rb on lines 14..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 92.

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

      def utilization(queryParameters = {})
        ensure_client && ensure_uri
        uri = "#{@data['uri']}/utilization?"

        queryParameters[:endDate]   = convert_time(queryParameters[:endDate])
Severity: Major
Found in lib/oneview-sdk/resource/api200/enclosure.rb and 2 other locations - About 2 hrs to fix
lib/oneview-sdk/resource/api200/power_device.rb on lines 138..159
lib/oneview-sdk/resource/api200/server_hardware.rb on lines 183..204

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

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

      def utilization(queryParameters = {})
        ensure_client && ensure_uri
        uri = "#{@data['uri']}/utilization?"

        queryParameters[:endDate]   = convert_time(queryParameters[:endDate])
Severity: Major
Found in lib/oneview-sdk/resource/api200/server_hardware.rb and 2 other locations - About 2 hrs to fix
lib/oneview-sdk/resource/api200/enclosure.rb on lines 134..155
lib/oneview-sdk/resource/api200/power_device.rb on lines 138..159

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

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