HewlettPackard/oneview-sdk-ruby

View on GitHub

Showing 109 of 225 total issues

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/power_device.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/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

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

if @client.api_version.to_i > 200 && @client.api_version.to_i < 600
  scope_1 = scope_class.new(@client, name: 'Scope 1')
  scope_1.create!
  scope_2 = scope_class.new(@client, name: 'Scope 2')
  scope_2.create!
Severity: Major
Found in examples/shared_samples/ethernet_network.rb and 3 other locations - About 1 hr to fix
examples/shared_samples/fc_network.rb on lines 75..100
examples/shared_samples/fcoe_network.rb on lines 69..94
examples/shared_samples/logical_interconnect_group.rb on lines 187..212

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

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

if @client.api_version.to_i > 200 && @client.api_version.to_i < 600
  scope_1 = scope_class.new(@client, name: 'Scope 1')
  scope_1.create!
  scope_2 = scope_class.new(@client, name: 'Scope 2')
  scope_2.create!
Severity: Major
Found in examples/shared_samples/fc_network.rb and 3 other locations - About 1 hr to fix
examples/shared_samples/ethernet_network.rb on lines 104..129
examples/shared_samples/fcoe_network.rb on lines 69..94
examples/shared_samples/logical_interconnect_group.rb on lines 187..212

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

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

if @client.api_version.to_i > 200 && @client.api_version.to_i < 600
  scope_1 = scope_class.new(@client, name: 'Scope 1')
  scope_1.create!
  scope_2 = scope_class.new(@client, name: 'Scope 2')
  scope_2.create!
Severity: Major
Found in examples/shared_samples/logical_interconnect_group.rb and 3 other locations - About 1 hr to fix
examples/shared_samples/ethernet_network.rb on lines 104..129
examples/shared_samples/fc_network.rb on lines 75..100
examples/shared_samples/fcoe_network.rb on lines 69..94

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

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

if @client.api_version.to_i > 200 && @client.api_version.to_i < 600
  scope_1 = scope_class.new(@client, name: 'Scope 1')
  scope_1.create!
  scope_2 = scope_class.new(@client, name: 'Scope 2')
  scope_2.create!
Severity: Major
Found in examples/shared_samples/fcoe_network.rb and 3 other locations - About 1 hr to fix
examples/shared_samples/ethernet_network.rb on lines 104..129
examples/shared_samples/fc_network.rb on lines 75..100
examples/shared_samples/logical_interconnect_group.rb on lines 187..212

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

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 API1200
    module Synergy
      # Ethernet network resource implementation for API1200 Synergy
      class EthernetNetwork < OneviewSDK::API1000::Synergy::EthernetNetwork
lib/oneview-sdk/resource/api1200/c7000/ethernet_network.rb on lines 14..30

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

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 API1200
    module C7000
      # Ethernet network resource implementation for API1200 C7000
      class EthernetNetwork < OneviewSDK::API1000::C7000::EthernetNetwork
Severity: Major
Found in lib/oneview-sdk/resource/api1200/c7000/ethernet_network.rb and 1 other location - About 1 hr to fix
lib/oneview-sdk/resource/api1200/synergy/ethernet_network.rb on lines 14..30

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

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 API500
    module C7000
      # Enclosure resource implementation for API500 C7000
      class Enclosure < OneviewSDK::API300::C7000::Enclosure
Severity: Major
Found in lib/oneview-sdk/resource/api500/c7000/enclosure.rb and 1 other location - About 1 hr to fix
lib/oneview-sdk/resource/api500/synergy/enclosure.rb on lines 14..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 69.

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 API500
    module Synergy
      # Enclosure resource implementation for API500 Synergy
      class Enclosure < OneviewSDK::API300::Synergy::Enclosure
Severity: Major
Found in lib/oneview-sdk/resource/api500/synergy/enclosure.rb and 1 other location - About 1 hr to fix
lib/oneview-sdk/resource/api500/c7000/enclosure.rb on lines 14..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 69.

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

module OneviewSDK
  # Module Image Streamer
  module ImageStreamer
    # Module API 2010
    module API2010
Severity: Major
Found in lib/oneview-sdk/image-streamer/resource/api2010.rb and 9 other locations - About 1 hr to fix
lib/oneview-sdk/image-streamer/resource/api1000.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api1020.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api1600.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2000.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2020.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api300.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api500.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api600.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api800.rb on lines 14..32

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

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

module OneviewSDK
  # Module Image Streamer
  module ImageStreamer
    # Module API 1020
    module API1020
Severity: Major
Found in lib/oneview-sdk/image-streamer/resource/api1020.rb and 9 other locations - About 1 hr to fix
lib/oneview-sdk/image-streamer/resource/api1000.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api1600.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2000.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2010.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2020.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api300.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api500.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api600.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api800.rb on lines 14..32

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

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

module OneviewSDK
  # Module Image Streamer
  module ImageStreamer
    # Module API 1000
    module API1000
Severity: Major
Found in lib/oneview-sdk/image-streamer/resource/api1000.rb and 9 other locations - About 1 hr to fix
lib/oneview-sdk/image-streamer/resource/api1020.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api1600.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2000.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2010.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2020.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api300.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api500.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api600.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api800.rb on lines 14..32

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

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 convert_time(t)
        case t
        when nil then nil
        when Date then t.to_time.utc.iso8601(3)
        when Time then t.utc.iso8601(3)
Severity: Major
Found in lib/oneview-sdk/resource/api200/server_hardware.rb and 1 other location - About 1 hr to fix
lib/oneview-sdk/resource/api200/enclosure.rb on lines 179..189

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

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

module OneviewSDK
  # Module Image Streamer
  module ImageStreamer
    # Module API 2000
    module API2000
Severity: Major
Found in lib/oneview-sdk/image-streamer/resource/api2000.rb and 9 other locations - About 1 hr to fix
lib/oneview-sdk/image-streamer/resource/api1000.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api1020.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api1600.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2010.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2020.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api300.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api500.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api600.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api800.rb on lines 14..32

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

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

module OneviewSDK
  # Module Image Streamer
  module ImageStreamer
    # Module API 800
    module API800
Severity: Major
Found in lib/oneview-sdk/image-streamer/resource/api800.rb and 9 other locations - About 1 hr to fix
lib/oneview-sdk/image-streamer/resource/api1000.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api1020.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api1600.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2000.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2010.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2020.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api300.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api500.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api600.rb on lines 14..32

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

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

module OneviewSDK
  # Module Image Streamer
  module ImageStreamer
    # Module API 1600
    module API1600
Severity: Major
Found in lib/oneview-sdk/image-streamer/resource/api1600.rb and 9 other locations - About 1 hr to fix
lib/oneview-sdk/image-streamer/resource/api1000.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api1020.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2000.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2010.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2020.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api300.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api500.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api600.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api800.rb on lines 14..32

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

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

module OneviewSDK
  # Module Image Streamer
  module ImageStreamer
    # Module API 500
    module API500
Severity: Major
Found in lib/oneview-sdk/image-streamer/resource/api500.rb and 9 other locations - About 1 hr to fix
lib/oneview-sdk/image-streamer/resource/api1000.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api1020.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api1600.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2000.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2010.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2020.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api300.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api600.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api800.rb on lines 14..32

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

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

module OneviewSDK
  # Module Image Streamer
  module ImageStreamer
    # Module API 600
    module API600
Severity: Major
Found in lib/oneview-sdk/image-streamer/resource/api600.rb and 9 other locations - About 1 hr to fix
lib/oneview-sdk/image-streamer/resource/api1000.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api1020.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api1600.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2000.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2010.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2020.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api300.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api500.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api800.rb on lines 14..32

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

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

module OneviewSDK
  # Module Image Streamer
  module ImageStreamer
    # Module API 300
    module API300
Severity: Major
Found in lib/oneview-sdk/image-streamer/resource/api300.rb and 9 other locations - About 1 hr to fix
lib/oneview-sdk/image-streamer/resource/api1000.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api1020.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api1600.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2000.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2010.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2020.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api500.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api600.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api800.rb on lines 14..32

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

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

module OneviewSDK
  # Module Image Streamer
  module ImageStreamer
    # Module API 2020
    module API2020
Severity: Major
Found in lib/oneview-sdk/image-streamer/resource/api2020.rb and 9 other locations - About 1 hr to fix
lib/oneview-sdk/image-streamer/resource/api1000.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api1020.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api1600.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2000.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api2010.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api300.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api500.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api600.rb on lines 14..32
lib/oneview-sdk/image-streamer/resource/api800.rb on lines 14..32

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

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