aviator/aviator

View on GitHub

Showing 74 of 74 total issues

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

  define_request :update_server_metadata, :inherit => [:openstack, :common, :v2, :public, :base] do

    meta :service, :compute

    link 'documentation',
lib/aviator/openstack/compute/requests/v2/public/set_image_metadata.rb on lines 3..33
lib/aviator/openstack/compute/requests/v2/public/set_server_metadata.rb on lines 3..33
lib/aviator/openstack/compute/requests/v2/public/update_image_metadata.rb on lines 3..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 52.

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

  define_request :update_image_metadata, :inherit => [:openstack, :common, :v2, :public, :base] do

    meta :service, :compute

    link 'documentation',
lib/aviator/openstack/compute/requests/v2/public/set_image_metadata.rb on lines 3..33
lib/aviator/openstack/compute/requests/v2/public/set_server_metadata.rb on lines 3..33
lib/aviator/openstack/compute/requests/v2/public/update_server_metadata.rb on lines 3..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 52.

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

Method find_request has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      def find_request(service, name, session_data, options)
        service = service.to_s
        endpoint_type = options[:endpoint_type]
        endpoint_types = if endpoint_type
                           [StrUtil.camelize(endpoint_type.to_s)]
Severity: Minor
Found in lib/aviator/openstack/provider.rb - About 1 hr to fix

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

      define_request :get_image_metadata_item, :inherit => [:openstack, :common, :v2, :public, :base] do
    
        meta :service, :compute
    
        link 'documentation',
    lib/aviator/openstack/compute/requests/v2/public/delete_image_metadata_item.rb on lines 3..26
    lib/aviator/openstack/compute/requests/v2/public/delete_server_metadata_item.rb on lines 3..26
    lib/aviator/openstack/compute/requests/v2/public/get_server_metadata_item.rb on lines 3..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 49.

    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

      define_request :delete_server_metadata_item, :inherit => [:openstack, :common, :v2, :public, :base] do
    
        meta :service, :compute
    
        link 'documentation',
    lib/aviator/openstack/compute/requests/v2/public/delete_image_metadata_item.rb on lines 3..26
    lib/aviator/openstack/compute/requests/v2/public/get_image_metadata_item.rb on lines 3..26
    lib/aviator/openstack/compute/requests/v2/public/get_server_metadata_item.rb on lines 3..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 49.

    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

      define_request :delete_image_metadata_item, :inherit => [:openstack, :common, :v2, :public, :base] do
    
        meta :service, :compute
    
        link 'documentation',
    lib/aviator/openstack/compute/requests/v2/public/delete_server_metadata_item.rb on lines 3..26
    lib/aviator/openstack/compute/requests/v2/public/get_image_metadata_item.rb on lines 3..26
    lib/aviator/openstack/compute/requests/v2/public/get_server_metadata_item.rb on lines 3..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 49.

    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

      define_request :get_server_metadata_item, :inherit => [:openstack, :common, :v2, :public, :base] do
    
        meta :service, :compute
    
        link 'documentation',
    lib/aviator/openstack/compute/requests/v2/public/delete_image_metadata_item.rb on lines 3..26
    lib/aviator/openstack/compute/requests/v2/public/delete_server_metadata_item.rb on lines 3..26
    lib/aviator/openstack/compute/requests/v2/public/get_image_metadata_item.rb on lines 3..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 49.

    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

      define_request :start_server, :inherit => [:openstack, :common, :v2, :public, :base] do
    
        meta :service, :compute
    
        link 'documentation',
    lib/aviator/openstack/compute/requests/v2/public/stop_server.rb on lines 3..25

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

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

      define_request :unlock_server, :inherit => [:openstack, :common, :v2, :admin, :base] do
    
        meta :service, :compute
    
        link 'documentation',
    lib/aviator/openstack/compute/requests/v2/admin/confirm_server_resize.rb on lines 3..31
    lib/aviator/openstack/compute/requests/v2/admin/lock_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/admin/migrate_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/pause_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/resume_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/suspend_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/unpause_server.rb on lines 3..29

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

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

      define_request :lock_server, :inherit => [:openstack, :common, :v2, :admin, :base] do
    
        meta :service, :compute
    
        link 'documentation',
    Severity: Major
    Found in lib/aviator/openstack/compute/requests/v2/admin/lock_server.rb and 7 other locations - About 55 mins to fix
    lib/aviator/openstack/compute/requests/v2/admin/confirm_server_resize.rb on lines 3..31
    lib/aviator/openstack/compute/requests/v2/admin/migrate_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/admin/unlock_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/pause_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/resume_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/suspend_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/unpause_server.rb on lines 3..29

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

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

      define_request :pause_server, :inherit => [:openstack, :common, :v2, :public, :base] do
    
        meta :service, :compute
    
        link 'documentation',
    lib/aviator/openstack/compute/requests/v2/admin/confirm_server_resize.rb on lines 3..31
    lib/aviator/openstack/compute/requests/v2/admin/lock_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/admin/migrate_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/admin/unlock_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/resume_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/suspend_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/unpause_server.rb on lines 3..29

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

    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

      define_request :stop_server, :inherit => [:openstack, :common, :v2, :public, :base] do
    
        meta :service, :compute
    
        link 'documentation',
    Severity: Minor
    Found in lib/aviator/openstack/compute/requests/v2/public/stop_server.rb and 1 other location - About 55 mins to fix
    lib/aviator/openstack/compute/requests/v2/public/start_server.rb on lines 3..25

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

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

      define_request :suspend_server, :inherit => [:openstack, :common, :v2, :public, :base] do
    
        meta :service, :compute
    
        link 'documentation',
    lib/aviator/openstack/compute/requests/v2/admin/confirm_server_resize.rb on lines 3..31
    lib/aviator/openstack/compute/requests/v2/admin/lock_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/admin/migrate_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/admin/unlock_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/pause_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/resume_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/unpause_server.rb on lines 3..29

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

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

      define_request :resume_server, :inherit => [:openstack, :common, :v2, :public, :base] do
    
        meta :service, :compute
    
        link 'documentation',
    lib/aviator/openstack/compute/requests/v2/admin/confirm_server_resize.rb on lines 3..31
    lib/aviator/openstack/compute/requests/v2/admin/lock_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/admin/migrate_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/admin/unlock_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/pause_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/suspend_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/unpause_server.rb on lines 3..29

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

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

      define_request :migrate_server, :inherit => [:openstack, :common, :v2, :admin, :base] do
    
        meta :service, :compute
    
        link 'documentation',
    lib/aviator/openstack/compute/requests/v2/admin/confirm_server_resize.rb on lines 3..31
    lib/aviator/openstack/compute/requests/v2/admin/lock_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/admin/unlock_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/pause_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/resume_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/suspend_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/unpause_server.rb on lines 3..29

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

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

      define_request :unpause_server, :inherit => [:openstack, :common, :v2, :public, :base] do
    
        meta :service, :compute
    
        link 'documentation',
    lib/aviator/openstack/compute/requests/v2/admin/confirm_server_resize.rb on lines 3..31
    lib/aviator/openstack/compute/requests/v2/admin/lock_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/admin/migrate_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/admin/unlock_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/pause_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/resume_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/suspend_server.rb on lines 3..29

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

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

      define_request :confirm_server_resize, :inherit => [:openstack, :common, :v2, :admin, :base] do
    
        meta :service, :compute
    
        link 'documentation',
    lib/aviator/openstack/compute/requests/v2/admin/lock_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/admin/migrate_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/admin/unlock_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/pause_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/resume_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/suspend_server.rb on lines 3..29
    lib/aviator/openstack/compute/requests/v2/public/unpause_server.rb on lines 3..29

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

    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

      define_request :root, :inherit => [:openstack, :common, :v2, :public, :base] do
    
        meta :service,     :image
        meta :api_version, :v1
    
    
    Severity: Minor
    Found in lib/aviator/openstack/image/requests/v1/public/root.rb and 1 other location - About 50 mins to fix
    lib/aviator/openstack/volume/requests/v1/public/root.rb on lines 3..21

    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

      define_request :root, :inherit => [:openstack, :common, :v2, :public, :base] do
    
        meta :service,     :volume
        meta :api_version, :v1
    
    
    Severity: Minor
    Found in lib/aviator/openstack/volume/requests/v1/public/root.rb and 1 other location - About 50 mins to fix
    lib/aviator/openstack/image/requests/v1/public/root.rb on lines 3..20

    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

    Avoid deeply nested control flow statements.
    Open

              raise Aviator::Service::MissingServiceEndpointError.new(service.to_s, request_name) unless service_specs.length > 0
    Severity: Major
    Found in lib/aviator/openstack/provider.rb - About 45 mins to fix
      Severity
      Category
      Status
      Source
      Language