fog/fog-proxmox

View on GitHub

Showing 46 of 60 total issues

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

  module Proxmox
    class Compute
      # class Real create_vnc request
      class Real
        def create_vnc(path_params, body_params)
Severity: Major
Found in lib/fog/proxmox/compute/requests/create_vnc.rb and 5 other locations - About 50 mins to fix
lib/fog/proxmox/compute/requests/clone_server.rb on lines 21..40
lib/fog/proxmox/compute/requests/create_spice.rb on lines 21..40
lib/fog/proxmox/compute/requests/create_term.rb on lines 21..40
lib/fog/proxmox/compute/requests/migrate_server.rb on lines 21..40
lib/fog/proxmox/compute/requests/template_server.rb on lines 21..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 43.

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

  module Proxmox
    class Compute
      # class Real create_term request
      class Real
        def create_term(path_params, body_params)
Severity: Major
Found in lib/fog/proxmox/compute/requests/create_term.rb and 5 other locations - About 50 mins to fix
lib/fog/proxmox/compute/requests/clone_server.rb on lines 21..40
lib/fog/proxmox/compute/requests/create_spice.rb on lines 21..40
lib/fog/proxmox/compute/requests/create_vnc.rb on lines 21..40
lib/fog/proxmox/compute/requests/migrate_server.rb on lines 21..40
lib/fog/proxmox/compute/requests/template_server.rb on lines 21..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 43.

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

  module Proxmox
    class Compute
      # class Real clone_server request
      class Real
        def clone_server(path_params, body_params)
Severity: Major
Found in lib/fog/proxmox/compute/requests/clone_server.rb and 5 other locations - About 50 mins to fix
lib/fog/proxmox/compute/requests/create_spice.rb on lines 21..40
lib/fog/proxmox/compute/requests/create_term.rb on lines 21..40
lib/fog/proxmox/compute/requests/create_vnc.rb on lines 21..40
lib/fog/proxmox/compute/requests/migrate_server.rb on lines 21..40
lib/fog/proxmox/compute/requests/template_server.rb on lines 21..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 43.

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

  module Proxmox
    class Compute
      # class Real create_spice request
      class Real
        def create_spice(path_params, body_params)
Severity: Major
Found in lib/fog/proxmox/compute/requests/create_spice.rb and 5 other locations - About 50 mins to fix
lib/fog/proxmox/compute/requests/clone_server.rb on lines 21..40
lib/fog/proxmox/compute/requests/create_term.rb on lines 21..40
lib/fog/proxmox/compute/requests/create_vnc.rb on lines 21..40
lib/fog/proxmox/compute/requests/migrate_server.rb on lines 21..40
lib/fog/proxmox/compute/requests/template_server.rb on lines 21..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 43.

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

  module Proxmox
    class Compute
      # class Real migrate_server request
      class Real
        def migrate_server(path_params, body_params)
Severity: Major
Found in lib/fog/proxmox/compute/requests/migrate_server.rb and 5 other locations - About 50 mins to fix
lib/fog/proxmox/compute/requests/clone_server.rb on lines 21..40
lib/fog/proxmox/compute/requests/create_spice.rb on lines 21..40
lib/fog/proxmox/compute/requests/create_term.rb on lines 21..40
lib/fog/proxmox/compute/requests/create_vnc.rb on lines 21..40
lib/fog/proxmox/compute/requests/template_server.rb on lines 21..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 43.

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

      class Real
        def action_server(path_params, body_params)
          node = path_params[:node]
          type = path_params[:type]
          action = path_params[:action]
Severity: Minor
Found in lib/fog/proxmox/compute/requests/action_server.rb and 1 other location - About 50 mins to fix
lib/fog/proxmox/compute/requests/delete_snapshot.rb on lines 24..35

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

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

  module Proxmox
    class Compute
      # class Real template_server request
      class Real
        def template_server(path_params, body_params)
Severity: Major
Found in lib/fog/proxmox/compute/requests/template_server.rb and 5 other locations - About 50 mins to fix
lib/fog/proxmox/compute/requests/clone_server.rb on lines 21..40
lib/fog/proxmox/compute/requests/create_spice.rb on lines 21..40
lib/fog/proxmox/compute/requests/create_term.rb on lines 21..40
lib/fog/proxmox/compute/requests/create_vnc.rb on lines 21..40
lib/fog/proxmox/compute/requests/migrate_server.rb on lines 21..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 43.

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

      class Real
        def delete_snapshot(path_params, query_params)
          node = path_params[:node]
          type = path_params[:type]
          vmid = path_params[:vmid]
Severity: Minor
Found in lib/fog/proxmox/compute/requests/delete_snapshot.rb and 1 other location - About 50 mins to fix
lib/fog/proxmox/compute/requests/action_server.rb on lines 24..35

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

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

      class Mock
        attr_reader :config

        def initialize(options = {})
          @proxmox_uri = URI.parse(options[:proxmox_url])
Severity: Major
Found in lib/fog/proxmox/compute.rb and 2 other locations - About 50 mins to fix
lib/fog/proxmox/identity.rb on lines 102..114
lib/fog/proxmox/network.rb on lines 48..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 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 3 locations. Consider refactoring.
Open

      class Mock
        attr_reader :config

        def initialize(options = {})
          @proxmox_uri = URI.parse(options[:proxmox_url])
Severity: Major
Found in lib/fog/proxmox/network.rb and 2 other locations - About 50 mins to fix
lib/fog/proxmox/compute.rb on lines 99..111
lib/fog/proxmox/identity.rb on lines 102..114

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

      class Mock
        attr_reader :config

        def initialize(options = {})
          @proxmox_uri = URI.parse(options[:proxmox_url])
Severity: Major
Found in lib/fog/proxmox/identity.rb and 2 other locations - About 50 mins to fix
lib/fog/proxmox/compute.rb on lines 99..111
lib/fog/proxmox/network.rb on lines 48..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 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 2 locations. Consider refactoring.
Open

      class Real
        def rollback_snapshot(path_params)
          node = path_params[:node]
          type = path_params[:type]
          vmid = path_params[:vmid]
Severity: Minor
Found in lib/fog/proxmox/compute/requests/rollback_snapshot.rb and 1 other location - About 45 mins to fix
lib/fog/proxmox/compute/requests/get_snapshot_config.rb on lines 24..34

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

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

      class Real
        def get_snapshot_config(path_params)
          node = path_params[:node]
          type = path_params[:type]
          vmid = path_params[:vmid]
Severity: Minor
Found in lib/fog/proxmox/compute/requests/get_snapshot_config.rb and 1 other location - About 45 mins to fix
lib/fog/proxmox/compute/requests/rollback_snapshot.rb on lines 26..36

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

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

  module Proxmox
    class Compute
      # class Real move_volume request
      class Real
        def move_volume(path_params, body_params)
Severity: Major
Found in lib/fog/proxmox/compute/requests/move_volume.rb and 3 other locations - About 35 mins to fix
lib/fog/proxmox/compute/requests/move_disk.rb on lines 21..39
lib/fog/proxmox/compute/requests/resize_container.rb on lines 21..39
lib/fog/proxmox/compute/requests/resize_server.rb on lines 21..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 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 4 locations. Consider refactoring.
Open

  module Proxmox
    class Compute
      # class Real resize_container request
      class Real
        def resize_container(path_params, body_params)
Severity: Major
Found in lib/fog/proxmox/compute/requests/resize_container.rb and 3 other locations - About 35 mins to fix
lib/fog/proxmox/compute/requests/move_disk.rb on lines 21..39
lib/fog/proxmox/compute/requests/move_volume.rb on lines 21..39
lib/fog/proxmox/compute/requests/resize_server.rb on lines 21..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 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 4 locations. Consider refactoring.
Open

  module Proxmox
    class Compute
      # class Real resize_server request
      class Real
        def resize_server(path_params, body_params)
Severity: Major
Found in lib/fog/proxmox/compute/requests/resize_server.rb and 3 other locations - About 35 mins to fix
lib/fog/proxmox/compute/requests/move_disk.rb on lines 21..39
lib/fog/proxmox/compute/requests/move_volume.rb on lines 21..39
lib/fog/proxmox/compute/requests/resize_container.rb on lines 21..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 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 4 locations. Consider refactoring.
Open

  module Proxmox
    class Compute
      # class Real move_disk request
      class Real
        def move_disk(path_params, body_params)
Severity: Major
Found in lib/fog/proxmox/compute/requests/move_disk.rb and 3 other locations - About 35 mins to fix
lib/fog/proxmox/compute/requests/move_volume.rb on lines 21..39
lib/fog/proxmox/compute/requests/resize_container.rb on lines 21..39
lib/fog/proxmox/compute/requests/resize_server.rb on lines 21..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 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 2 locations. Consider refactoring.
Open

  module Proxmox
    class Compute
      # class Real create_server request
      class Real
        def create_server(path_params, body_params)
Severity: Minor
Found in lib/fog/proxmox/compute/requests/create_server.rb and 1 other location - About 35 mins to fix
lib/fog/proxmox/compute/requests/get_node_statistics.rb on lines 22..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 35.

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 Proxmox
    class Compute
      # class Real get_node_statistics request
      class Real
        def get_node_statistics(path_params, query_params)
Severity: Minor
Found in lib/fog/proxmox/compute/requests/get_node_statistics.rb and 1 other location - About 35 mins to fix
lib/fog/proxmox/compute/requests/create_server.rb on lines 21..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 35.

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

      class Real
        def list_snapshots(path_params)
          node = path_params[:node]
          type = path_params[:type]
          vmid = path_params[:vmid]
Severity: Minor
Found in lib/fog/proxmox/compute/requests/list_snapshots.rb and 2 other locations - About 30 mins to fix
lib/fog/proxmox/compute/requests/get_server_config.rb on lines 24..33
lib/fog/proxmox/compute/requests/get_server_status.rb on lines 24..33

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

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