CiscoUcs/imcsdk

View on GitHub
imcsdk/apis/v2/storage/vd.py

Summary

Maintainability
F
1 wk
Test Coverage

File vd.py has 586 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2017 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Severity: Major
Found in imcsdk/apis/v2/storage/vd.py - About 1 day to fix

    Function vd_create_using_unused_pds has 15 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def vd_create_using_unused_pds(handle,
    Severity: Major
    Found in imcsdk/apis/v2/storage/vd.py - About 1 hr to fix

      Function vd_create_using_existing_vd has 13 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def vd_create_using_existing_vd(handle,
      Severity: Major
      Found in imcsdk/apis/v2/storage/vd.py - About 1 hr to fix

        Function vd_update has 10 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def vd_update(handle,
        Severity: Major
        Found in imcsdk/apis/v2/storage/vd.py - About 1 hr to fix

          Function _vd_set_action has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def _vd_set_action(handle, controller_type, controller_slot, id,
          Severity: Major
          Found in imcsdk/apis/v2/storage/vd.py - About 50 mins to fix

            Function vd_exists has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def vd_exists(handle, controller_type, controller_slot, id, server_id=1, **kwargs):
            Severity: Minor
            Found in imcsdk/apis/v2/storage/vd.py - About 45 mins to fix

              Function vd_delete has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def vd_delete(handle, controller_type, controller_slot, id, server_id=1,
              Severity: Minor
              Found in imcsdk/apis/v2/storage/vd.py - About 45 mins to fix

                Function _vd_max_size_get has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def _vd_max_size_get(handle,
                Severity: Minor
                Found in imcsdk/apis/v2/storage/vd.py - About 45 mins to fix

                  Function vd_boot_drive_enable has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def vd_boot_drive_enable(handle, controller_type, controller_slot, id,
                  Severity: Minor
                  Found in imcsdk/apis/v2/storage/vd.py - About 45 mins to fix

                    Function vd_exists_any has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def vd_exists_any(handle, controller_type, controller_slot, server_id=1,
                    Severity: Minor
                    Found in imcsdk/apis/v2/storage/vd.py - About 35 mins to fix

                      Function _pd_sizes_get has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def _pd_sizes_get(handle,
                      Severity: Minor
                      Found in imcsdk/apis/v2/storage/vd.py - About 35 mins to fix

                        Function vd_boot_drive_disable has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def vd_boot_drive_disable(handle, controller_type, controller_slot, id,
                        Severity: Minor
                        Found in imcsdk/apis/v2/storage/vd.py - About 35 mins to fix

                          Function vd_encryption_enable has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def vd_encryption_enable(handle, controller_type, controller_slot, id,
                          Severity: Minor
                          Found in imcsdk/apis/v2/storage/vd.py - About 35 mins to fix

                            Function vd_delete_all has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def vd_delete_all(handle, controller_type, controller_slot, server_id=1,
                            Severity: Minor
                            Found in imcsdk/apis/v2/storage/vd.py - About 35 mins to fix

                              Function vd_boot_drive_exists has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              def vd_boot_drive_exists(handle, controller_type, controller_slot, id,
                              Severity: Minor
                              Found in imcsdk/apis/v2/storage/vd.py - About 35 mins to fix

                                Function vd_get has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                def vd_get(handle, controller_type, controller_slot, id, server_id=1):
                                Severity: Minor
                                Found in imcsdk/apis/v2/storage/vd.py - About 35 mins to fix

                                  Function vd_encryption_exists has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  def vd_encryption_exists(handle, controller_type, controller_slot, id,
                                  Severity: Minor
                                  Found in imcsdk/apis/v2/storage/vd.py - About 35 mins to fix

                                    Function vd_get_by_name has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    def vd_get_by_name(handle, controller_type, controller_slot, name,
                                    Severity: Minor
                                    Found in imcsdk/apis/v2/storage/vd.py - About 35 mins to fix

                                      Function vd_delete_all has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      def vd_delete_all(handle, controller_type, controller_slot, server_id=1,
                                                        delete_boot_drive=False):
                                          """
                                          Delete all the specified virtual drive
                                      
                                      
                                      Severity: Minor
                                      Found in imcsdk/apis/v2/storage/vd.py - About 25 mins to fix

                                      Cognitive Complexity

                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                      A method's cognitive complexity is based on a few simple rules:

                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                      • Code is considered more complex for each "break in the linear flow of the code"
                                      • Code is considered more complex when "flow breaking structures are nested"

                                      Further reading

                                      Function vd_update has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      def vd_update(handle,
                                                  controller_type,
                                                  controller_slot,
                                                  id,
                                                  server_id=1,
                                      Severity: Minor
                                      Found in imcsdk/apis/v2/storage/vd.py - About 25 mins to fix

                                      Cognitive Complexity

                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                      A method's cognitive complexity is based on a few simple rules:

                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                      • Code is considered more complex for each "break in the linear flow of the code"
                                      • Code is considered more complex when "flow breaking structures are nested"

                                      Further reading

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

                                      def _bytes_to_human(size, output_format=None):
                                          """
                                          converts bytes to human readable format.
                                              The return is in output_format.
                                          """
                                      Severity: Major
                                      Found in imcsdk/apis/v2/storage/vd.py and 1 other location - About 1 day to fix
                                      imcsdk/apis/v2/server/storage.py on lines 89..101

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

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

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

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

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

                                      Refactorings

                                      Further Reading

                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                          size = {0: total_size,
                                                  1: total_size/2,
                                                  5: total_size - (span_depth * 1 * min_size),
                                                  6: total_size - (span_depth * 2 * min_size),
                                                  10: total_size/2,
                                      Severity: Major
                                      Found in imcsdk/apis/v2/storage/vd.py and 2 other locations - About 6 hrs to fix
                                      imcsdk/apis/server/storage.py on lines 134..140
                                      imcsdk/apis/v2/server/storage.py on lines 134..140

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

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                      def _human_to_bytes(size_str):
                                          """
                                          returns the size in bytes
                                              supported formats KB, MB, GB, TB, PB, EB, ZB, YB
                                      
                                      
                                      Severity: Major
                                      Found in imcsdk/apis/v2/storage/vd.py and 1 other location - About 6 hrs to fix
                                      imcsdk/apis/v2/server/storage.py on lines 72..86

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

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

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

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

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

                                      Refactorings

                                      Further Reading

                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                      def _vd_max_size_get(handle,
                                                           controller_type,
                                                           controller_slot,
                                                           drive_list,
                                                           raid_level,
                                      Severity: Major
                                      Found in imcsdk/apis/v2/storage/vd.py and 2 other locations - About 5 hrs to fix
                                      imcsdk/apis/server/storage.py on lines 147..173
                                      imcsdk/apis/v2/server/storage.py on lines 147..173

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

                                      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 vd_encryption_exists(handle, controller_type, controller_slot, id,
                                                               server_id=1):
                                          """
                                          Checks if encryption is enabled on the virtual drive
                                      
                                      
                                      Severity: Major
                                      Found in imcsdk/apis/v2/storage/vd.py and 1 other location - About 4 hrs to fix
                                      imcsdk/apis/v2/storage/pd.py on lines 588..617

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

                                      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

                                      def _pd_sizes_get(handle,
                                                        controller_type,
                                                        controller_slot,
                                                        drive_list,
                                                        server_id=1):
                                      Severity: Major
                                      Found in imcsdk/apis/v2/storage/vd.py and 2 other locations - About 3 hrs to fix
                                      imcsdk/apis/server/storage.py on lines 104..118
                                      imcsdk/apis/v2/server/storage.py on lines 104..118

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

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                      def _flatten_list(drive_list):
                                          # convert to format imc expects
                                          # [[1]] => [1]
                                          # [[1,2],[3,4]] => [1, 2, 3, 4]
                                          if not (isinstance(drive_list, list) and isinstance(drive_list[0], list)):
                                      Severity: Major
                                      Found in imcsdk/apis/v2/storage/vd.py and 1 other location - About 3 hrs to fix
                                      imcsdk/apis/v2/server/storage.py on lines 48..58

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

                                      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 vd_boot_drive_enable(handle, controller_type, controller_slot, id,
                                                               server_id=1, **kwargs):
                                          """
                                          Set a virtual drive as boot drive.
                                      
                                      
                                      Severity: Major
                                      Found in imcsdk/apis/v2/storage/vd.py and 1 other location - About 1 hr to fix
                                      imcsdk/apis/v2/storage/vd.py on lines 651..676

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

                                      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 vd_encryption_enable(handle, controller_type, controller_slot, id,
                                                               server_id=1):
                                          """
                                          Enables encryption on the virtual drive if it is supported by the
                                          controller and the underlying physical drive
                                      Severity: Major
                                      Found in imcsdk/apis/v2/storage/vd.py and 1 other location - About 1 hr to fix
                                      imcsdk/apis/v2/storage/vd.py on lines 551..575

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

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

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

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

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

                                      Refactorings

                                      Further Reading

                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                      def _list_to_string(drive_list):
                                          # convert to format imc expects
                                          # list to string
                                          # [[1]] => '[1]'
                                          # [[1,2],[3,4]] => '[1,2][3,4]'
                                      Severity: Major
                                      Found in imcsdk/apis/v2/storage/vd.py and 2 other locations - About 1 hr to fix
                                      imcsdk/apis/server/storage.py on lines 34..45
                                      imcsdk/apis/v2/server/storage.py on lines 34..45

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

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

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

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

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

                                      Refactorings

                                      Further Reading

                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                      def _flatten_to_string(drive_list):
                                          # convert to format imc expects
                                          # [[1]] => '1'
                                          # [[1,2],[3,4]] => '1234'
                                          return ''.join([''.join(str(x)) for x in _flatten_list(drive_list)])
                                      Severity: Major
                                      Found in imcsdk/apis/v2/storage/vd.py and 2 other locations - About 55 mins to fix
                                      imcsdk/apis/server/storage.py on lines 61..65
                                      imcsdk/apis/v2/server/storage.py on lines 61..65

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

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

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

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

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

                                      Refactorings

                                      Further Reading

                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                      def vd_name_derive(raid_level, drive_list):
                                          return "RAID" + str(raid_level) + "_" + _flatten_to_string(drive_list)
                                      Severity: Major
                                      Found in imcsdk/apis/v2/storage/vd.py and 2 other locations - About 50 mins to fix
                                      imcsdk/apis/server/storage.py on lines 68..69
                                      imcsdk/apis/v2/server/storage.py on lines 68..69

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 36.

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                          if delete_boot_drive and mo.boot_drive.lower() in ('yes', 'true'):
                                              controller_clear_boot_drive(handle, controller_type,
                                                                          controller_slot, server_id)
                                      Severity: Minor
                                      Found in imcsdk/apis/v2/storage/vd.py and 1 other location - About 40 mins to fix
                                      imcsdk/apis/v2/storage/vd.py on lines 510..512

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

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                              if delete_boot_drive and mo.boot_drive.lower() in ('yes', 'true'):
                                                  controller_clear_boot_drive(handle, controller_type,
                                                                              controller_slot, server_id)
                                      Severity: Minor
                                      Found in imcsdk/apis/v2/storage/vd.py and 1 other location - About 40 mins to fix
                                      imcsdk/apis/v2/storage/vd.py on lines 479..481

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

                                      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

                                      There are no issues that match your filters.

                                      Category
                                      Status