fog/fog-openstack

View on GitHub

Showing 460 of 616 total issues

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

  module OpenStack
    class Identity
      class V3
        class Real
          def list_roles(options = {})
Severity: Minor
Found in lib/fog/openstack/identity/v3/requests/list_roles.rb and 6 other locations - About 15 mins to fix
lib/fog/openstack/identity/v3/requests/list_domains.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_endpoints.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_os_credentials.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_policies.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_services.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_users.rb on lines 2..18

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

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

        recognizes :openstack_auth_token, :openstack_management_url,
                   :persistent, :openstack_service_type, :openstack_service_name,
                   :openstack_tenant, :openstack_tenant_id,
                   :openstack_api_key, :openstack_username, :openstack_identity_endpoint,
                   :current_user, :current_tenant, :openstack_region,
Severity: Major
Found in lib/fog/openstack/image/v1.rb and 9 other locations - About 15 mins to fix
lib/fog/openstack/baremetal.rb on lines 7..18
lib/fog/openstack/container_infra.rb on lines 8..19
lib/fog/openstack/event.rb on lines 7..18
lib/fog/openstack/image/v2.rb on lines 10..21
lib/fog/openstack/introspection.rb on lines 9..20
lib/fog/openstack/metering.rb on lines 9..20
lib/fog/openstack/metric.rb on lines 7..18
lib/fog/openstack/orchestration.rb on lines 5..16
lib/fog/openstack/planning.rb on lines 7..18

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  module OpenStack
    class Identity
      class V3
        class Real
          def update_domain(id, domain)
Severity: Major
Found in lib/fog/openstack/identity/v3/requests/update_domain.rb and 8 other locations - About 15 mins to fix
lib/fog/openstack/identity/v3/requests/update_endpoint.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_group.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_os_credential.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_policy.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_project.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_role.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_service.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_user.rb on lines 2..16

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  module OpenStack
    class Identity
      class V3
        class Real
          def update_role(id, role)
Severity: Major
Found in lib/fog/openstack/identity/v3/requests/update_role.rb and 8 other locations - About 15 mins to fix
lib/fog/openstack/identity/v3/requests/update_domain.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_endpoint.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_group.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_os_credential.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_policy.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_project.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_service.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_user.rb on lines 2..16

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

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

  module OpenStack
    class Identity
      class V3
        class Real
          def list_users(options = {})
Severity: Minor
Found in lib/fog/openstack/identity/v3/requests/list_users.rb and 6 other locations - About 15 mins to fix
lib/fog/openstack/identity/v3/requests/list_domains.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_endpoints.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_os_credentials.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_policies.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_roles.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_services.rb on lines 2..18

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

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

  module OpenStack
    class Compute
      class Real
        def resize_server(server_id, flavor_ref)
          body = {'resize' => {'flavorRef' => flavor_ref}}
Severity: Minor
Found in lib/fog/openstack/compute/requests/resize_server.rb and 4 other locations - About 15 mins to fix
lib/fog/openstack/compute/requests/add_security_group.rb on lines 2..15
lib/fog/openstack/compute/requests/change_server_password.rb on lines 2..15
lib/fog/openstack/compute/requests/get_console_output.rb on lines 2..19
lib/fog/openstack/compute/requests/remove_security_group.rb on lines 2..15

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

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

      recognizes :openstack_auth_token, :openstack_management_url,
                 :persistent, :openstack_service_type, :openstack_service_name,
                 :openstack_tenant, :openstack_tenant_id,
                 :openstack_api_key, :openstack_username, :openstack_identity_endpoint,
                 :current_user, :current_tenant, :openstack_region,
Severity: Major
Found in lib/fog/openstack/container_infra.rb and 9 other locations - About 15 mins to fix
lib/fog/openstack/baremetal.rb on lines 7..18
lib/fog/openstack/event.rb on lines 7..18
lib/fog/openstack/image/v1.rb on lines 10..21
lib/fog/openstack/image/v2.rb on lines 10..21
lib/fog/openstack/introspection.rb on lines 9..20
lib/fog/openstack/metering.rb on lines 9..20
lib/fog/openstack/metric.rb on lines 7..18
lib/fog/openstack/orchestration.rb on lines 5..16
lib/fog/openstack/planning.rb on lines 7..18

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

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

  module OpenStack
    class Identity
      class V3
        class Real
          def list_services(options = {})
Severity: Minor
Found in lib/fog/openstack/identity/v3/requests/list_services.rb and 6 other locations - About 15 mins to fix
lib/fog/openstack/identity/v3/requests/list_domains.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_endpoints.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_os_credentials.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_policies.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_roles.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_users.rb on lines 2..18

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

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

      recognizes :openstack_auth_token, :openstack_management_url,
                 :persistent, :openstack_service_type, :openstack_service_name,
                 :openstack_tenant, :openstack_tenant_id,
                 :openstack_api_key, :openstack_username, :openstack_identity_endpoint,
                 :current_user, :current_tenant, :openstack_region,
Severity: Major
Found in lib/fog/openstack/metering.rb and 9 other locations - About 15 mins to fix
lib/fog/openstack/baremetal.rb on lines 7..18
lib/fog/openstack/container_infra.rb on lines 8..19
lib/fog/openstack/event.rb on lines 7..18
lib/fog/openstack/image/v1.rb on lines 10..21
lib/fog/openstack/image/v2.rb on lines 10..21
lib/fog/openstack/introspection.rb on lines 9..20
lib/fog/openstack/metric.rb on lines 7..18
lib/fog/openstack/orchestration.rb on lines 5..16
lib/fog/openstack/planning.rb on lines 7..18

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

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

  module OpenStack
    class Compute
      class Real
        def add_security_group(server_id, group_name)
          body = {'addSecurityGroup' => {"name" => group_name}}
Severity: Minor
Found in lib/fog/openstack/compute/requests/add_security_group.rb and 4 other locations - About 15 mins to fix
lib/fog/openstack/compute/requests/change_server_password.rb on lines 2..15
lib/fog/openstack/compute/requests/get_console_output.rb on lines 2..19
lib/fog/openstack/compute/requests/remove_security_group.rb on lines 2..15
lib/fog/openstack/compute/requests/resize_server.rb on lines 2..15

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

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

  module OpenStack
    class Compute
      class Real
        def change_server_password(server_id, admin_password)
          body = {'changePassword' => {'adminPass' => admin_password}}
Severity: Minor
Found in lib/fog/openstack/compute/requests/change_server_password.rb and 4 other locations - About 15 mins to fix
lib/fog/openstack/compute/requests/add_security_group.rb on lines 2..15
lib/fog/openstack/compute/requests/get_console_output.rb on lines 2..19
lib/fog/openstack/compute/requests/remove_security_group.rb on lines 2..15
lib/fog/openstack/compute/requests/resize_server.rb on lines 2..15

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

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

  module OpenStack
    class Identity
      class V3
        class Real
          def list_domains(options = {})
Severity: Minor
Found in lib/fog/openstack/identity/v3/requests/list_domains.rb and 6 other locations - About 15 mins to fix
lib/fog/openstack/identity/v3/requests/list_endpoints.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_os_credentials.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_policies.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_roles.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_services.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_users.rb on lines 2..18

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  module OpenStack
    class Identity
      class V3
        class Real
          def update_project(id, project)
Severity: Major
Found in lib/fog/openstack/identity/v3/requests/update_project.rb and 8 other locations - About 15 mins to fix
lib/fog/openstack/identity/v3/requests/update_domain.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_endpoint.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_group.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_os_credential.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_policy.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_role.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_service.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_user.rb on lines 2..16

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

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

  module OpenStack
    class Identity
      class V3
        class Real
          def list_os_credentials(options = {})
Severity: Minor
Found in lib/fog/openstack/identity/v3/requests/list_os_credentials.rb and 6 other locations - About 15 mins to fix
lib/fog/openstack/identity/v3/requests/list_domains.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_endpoints.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_policies.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_roles.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_services.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_users.rb on lines 2..18

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

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

  module OpenStack
    class Compute
      class Real
        def get_console_output(server_id, log_length)
          body = {
Severity: Minor
Found in lib/fog/openstack/compute/requests/get_console_output.rb and 4 other locations - About 15 mins to fix
lib/fog/openstack/compute/requests/add_security_group.rb on lines 2..15
lib/fog/openstack/compute/requests/change_server_password.rb on lines 2..15
lib/fog/openstack/compute/requests/remove_security_group.rb on lines 2..15
lib/fog/openstack/compute/requests/resize_server.rb on lines 2..15

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  module OpenStack
    class Identity
      class V3
        class Real
          def update_service(id, service)
Severity: Major
Found in lib/fog/openstack/identity/v3/requests/update_service.rb and 8 other locations - About 15 mins to fix
lib/fog/openstack/identity/v3/requests/update_domain.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_endpoint.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_group.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_os_credential.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_policy.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_project.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_role.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_user.rb on lines 2..16

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

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

        recognizes :openstack_auth_token, :openstack_management_url,
                   :persistent, :openstack_service_type, :openstack_service_name,
                   :openstack_tenant, :openstack_tenant_id,
                   :openstack_api_key, :openstack_username, :openstack_identity_endpoint,
                   :current_user, :current_tenant, :openstack_region,
Severity: Major
Found in lib/fog/openstack/image/v2.rb and 9 other locations - About 15 mins to fix
lib/fog/openstack/baremetal.rb on lines 7..18
lib/fog/openstack/container_infra.rb on lines 8..19
lib/fog/openstack/event.rb on lines 7..18
lib/fog/openstack/image/v1.rb on lines 10..21
lib/fog/openstack/introspection.rb on lines 9..20
lib/fog/openstack/metering.rb on lines 9..20
lib/fog/openstack/metric.rb on lines 7..18
lib/fog/openstack/orchestration.rb on lines 5..16
lib/fog/openstack/planning.rb on lines 7..18

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

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

      recognizes :openstack_auth_token, :openstack_management_url,
                 :persistent, :openstack_service_type, :openstack_service_name,
                 :openstack_tenant, :openstack_tenant_id,
                 :openstack_api_key, :openstack_username, :openstack_identity_endpoint,
                 :current_user, :current_tenant, :openstack_region,
Severity: Major
Found in lib/fog/openstack/metric.rb and 9 other locations - About 15 mins to fix
lib/fog/openstack/baremetal.rb on lines 7..18
lib/fog/openstack/container_infra.rb on lines 8..19
lib/fog/openstack/event.rb on lines 7..18
lib/fog/openstack/image/v1.rb on lines 10..21
lib/fog/openstack/image/v2.rb on lines 10..21
lib/fog/openstack/introspection.rb on lines 9..20
lib/fog/openstack/metering.rb on lines 9..20
lib/fog/openstack/orchestration.rb on lines 5..16
lib/fog/openstack/planning.rb on lines 7..18

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

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

      recognizes :openstack_auth_token, :openstack_management_url,
                 :persistent, :openstack_service_type, :openstack_service_name,
                 :openstack_tenant, :openstack_tenant_id,
                 :openstack_api_key, :openstack_username, :openstack_identity_endpoint,
                 :current_user, :current_tenant, :openstack_region,
Severity: Major
Found in lib/fog/openstack/orchestration.rb and 9 other locations - About 15 mins to fix
lib/fog/openstack/baremetal.rb on lines 7..18
lib/fog/openstack/container_infra.rb on lines 8..19
lib/fog/openstack/event.rb on lines 7..18
lib/fog/openstack/image/v1.rb on lines 10..21
lib/fog/openstack/image/v2.rb on lines 10..21
lib/fog/openstack/introspection.rb on lines 9..20
lib/fog/openstack/metering.rb on lines 9..20
lib/fog/openstack/metric.rb on lines 7..18
lib/fog/openstack/planning.rb on lines 7..18

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

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

  module OpenStack
    class Volume
      class V2 < Fog::OpenStack::Volume
        class Real
          include Fog::OpenStack::Core
Severity: Minor
Found in lib/fog/openstack/volume/v2/real.rb and 2 other locations - About 15 mins to fix
lib/fog/openstack/volume/v1/real.rb on lines 2..17
lib/fog/openstack/volume/v3/real.rb on lines 2..17

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

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