Orange-OpenSource/python-onapsdk

View on GitHub

Showing 97 of 1,318 total issues

Function __init__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def __init__(self, name: str = None, version: str = None, # pylint: disable=too-many-arguments
Severity: Major
Found in src/onapsdk/sdc/sdc_resource.py - About 1 hr to fix

    Function instantiate_ala_carte has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def instantiate_ala_carte(cls,  # pylint: disable=too-many-arguments
    Severity: Major
    Found in src/onapsdk/so/instantiation.py - About 1 hr to fix

      Function __init__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def __init__(self,  # pylint: disable=too-many-arguments
      Severity: Major
      Found in src/onapsdk/so/instantiation.py - About 1 hr to fix

        Function add_vf_module has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def add_vf_module(self,  # pylint: disable=too-many-arguments
        Severity: Major
        Found in src/onapsdk/aai/business/vnf.py - About 1 hr to fix

          Function __init__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def __init__(self,  # pylint: disable=too-many-arguments
          Severity: Major
          Found in src/onapsdk/so/instantiation.py - About 1 hr to fix

            Function __init__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def __init__(self,  # pylint: disable=too-many-arguments
            Severity: Major
            Found in src/onapsdk/nbi/nbi.py - About 1 hr to fix

              Function _parse_sdc_status has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _parse_sdc_status(sdc_status: str, distribution_state: str,
                                        logger: logging.Logger) -> str:
                      """
                      Parse SDC status in order to normalize it.
              
              
              Severity: Minor
              Found in src/onapsdk/sdc/sdc_resource.py - About 55 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 __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def __init__(self,  # pylint: disable=too-many-arguments
              Severity: Major
              Found in src/onapsdk/so/instantiation.py - About 50 mins to fix

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

                    def get_resolved_template(self,  # pylint: disable=too-many-arguments
                Severity: Major
                Found in src/onapsdk/cds/blueprint.py - About 50 mins to fix

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

                      def __init__(self, rb_name: str,
                  Severity: Major
                  Found in src/onapsdk/msb/k8s/definition.py - About 50 mins to fix

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

                        def store_resolved_template(self,  # pylint: disable=too-many-arguments
                    Severity: Major
                    Found in src/onapsdk/cds/blueprint.py - About 50 mins to fix

                      Function onboard has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def onboard(self) -> None:
                              """Onboard the Service in SDC.
                      
                              Raises:
                                  StatusError: service has an invalid status
                      Severity: Minor
                      Found in src/onapsdk/sdc/service.py - About 45 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 onboard has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def onboard(self) -> None:
                              """Onboard resource in SDC."""
                              if not self.status:
                                  self.create()
                                  time.sleep(self._time_wait)
                      Severity: Minor
                      Found in src/onapsdk/sdc/sdc_resource.py - About 45 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 send_message has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def send_message(cls, method: str, action: str, url: str,  # pylint: disable=too-many-locals
                      Severity: Minor
                      Found in src/onapsdk/onap_service.py - About 45 mins to fix

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

                            def create(cls,
                        Severity: Minor
                        Found in src/onapsdk/msb/k8s/instance.py - About 45 mins to fix

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

                              def __init__(self,  # pylint: disable=too-many-arguments
                          Severity: Minor
                          Found in src/onapsdk/aai/cloud_infrastructure/tenant.py - About 45 mins to fix

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

                                def upload_vf_module_preload(cls,  # pylint: disable=too-many-arguments
                            Severity: Minor
                            Found in src/onapsdk/sdnc/preload.py - About 45 mins to fix

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

                                  def create(cls, rb_name: str,
                              Severity: Minor
                              Found in src/onapsdk/msb/k8s/definition.py - About 35 mins to fix

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

                                    def create(cls,
                                Severity: Minor
                                Found in src/onapsdk/nbi/nbi.py - About 35 mins to fix

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

                                      def get_all(cls,
                                  Severity: Minor
                                  Found in src/onapsdk/aai/cloud_infrastructure/complex.py - About 35 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language