fog/fog-openstack

View on GitHub

Showing 460 of 616 total issues

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

action_def = {
  :version => "2.0",
  :myaction => {
    :input => ['execution_id'],
    :base  => "std.email",
Severity: Minor
Found in examples/workflow/workflow-examples.rb and 1 other location - About 15 mins to fix
examples/workflow/workflow-examples.rb on lines 265..276

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

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

          def find_by_name(name)
            find { |user| user.name == name } ||
              Fog::OpenStack::Identity::V2::User.new(
                service.get_user_by_name(name).body['user'].merge(
                  'service' => service
Severity: Minor
Found in lib/fog/openstack/identity/v2/models/users.rb and 1 other location - About 15 mins to fix
lib/fog/openstack/identity/v2/models/users.rb on lines 19..26

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

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 OpenStack
    class Identity
      class V3
        class Real
          def list_user_projects(user_id, options = {})
Severity: Minor
Found in lib/fog/openstack/identity/v3/requests/list_user_projects.rb and 1 other location - About 15 mins to fix
lib/fog/openstack/identity/v3/requests/list_group_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 26.

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

      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: Minor
Found in lib/fog/openstack/shared_file_system.rb and 1 other location - About 15 mins to fix
lib/fog/openstack/identity/v2.rb on lines 8..19

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

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 OpenStack
    class Volume
      module Real
        def delete_volume_type(volume_type_id)
          request(
Severity: Minor
Found in lib/fog/openstack/volume/requests/delete_volume_type.rb and 3 other locations - About 15 mins to fix
lib/fog/openstack/volume/requests/delete_backup.rb on lines 2..18
lib/fog/openstack/volume/requests/delete_snapshot.rb on lines 2..18
lib/fog/openstack/volume/requests/delete_volume.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 26.

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

          def find_by_id(id)
            find { |user| user.id == id } ||
              Fog::OpenStack::Identity::V2::User.new(
                service.get_user_by_id(id).body['user'].merge(
                  'service' => service
Severity: Minor
Found in lib/fog/openstack/identity/v2/models/users.rb and 1 other location - About 15 mins to fix
lib/fog/openstack/identity/v2/models/users.rb on lines 28..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 26.

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

                    {
                      "description" => '',
                      "id"          => "794ccc2c-d751-44fe-b57f-8894c9f5c842",
                      "project_id"  => '',
                      "created_at"  => "2015-02-18T22:18:58.000000",
Severity: Minor
Found in lib/fog/openstack/dns/v2.rb and 1 other location - About 15 mins to fix
lib/fog/openstack/dns/v2.rb on lines 129..145

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

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 OpenStack
    class Identity
      class V3
        class Real
          def list_group_users(id, options = {})
Severity: Minor
Found in lib/fog/openstack/identity/v3/requests/list_group_users.rb and 1 other location - About 15 mins to fix
lib/fog/openstack/identity/v3/requests/list_user_projects.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 26.

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/planning.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/orchestration.rb on lines 5..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_os_credential(id, credential)
Severity: Major
Found in lib/fog/openstack/identity/v3/requests/update_os_credential.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_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_user(id, user)
Severity: Major
Found in lib/fog/openstack/identity/v3/requests/update_user.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_service.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_group(id, group)
Severity: Major
Found in lib/fog/openstack/identity/v3/requests/update_group.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_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

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/introspection.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/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_endpoint(id, endpoint)
Severity: Major
Found in lib/fog/openstack/identity/v3/requests/update_endpoint.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_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

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/baremetal.rb and 9 other locations - About 15 mins to fix
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/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 remove_security_group(server_id, group_name)
          body = {'removeSecurityGroup' => {"name" => group_name}}
Severity: Minor
Found in lib/fog/openstack/compute/requests/remove_security_group.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/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_policies(options = {})
Severity: Minor
Found in lib/fog/openstack/identity/v3/requests/list_policies.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_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

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

  module OpenStack
    class Identity
      class V3
        class Real
          def update_policy(id, policy)
Severity: Major
Found in lib/fog/openstack/identity/v3/requests/update_policy.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_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 7 locations. Consider refactoring.
Open

  module OpenStack
    class Identity
      class V3
        class Real
          def list_endpoints(options = {})
Severity: Minor
Found in lib/fog/openstack/identity/v3/requests/list_endpoints.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_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

Severity
Category
Status
Source
Language