Orange-OpenSource/python-onapsdk

View on GitHub

Showing 97 of 1,318 total issues

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

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

        def _action_url(self,
    Severity: Minor
    Found in src/onapsdk/sdc/sdc_resource.py - About 35 mins to fix

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

          def add_deployment_artifact(self, artifact_type: str, artifact_label: str,
      Severity: Minor
      Found in src/onapsdk/sdc/sdc_resource.py - About 35 mins to fix

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

            def add_artifact_to_vf(self, vnf_name: str, artifact_type: str,
        Severity: Minor
        Found in src/onapsdk/sdc/service.py - About 35 mins to fix

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

              def __init__(self, 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, rb_name: str,
            Severity: Minor
            Found in src/onapsdk/msb/k8s/definition.py - About 35 mins to fix

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

                  def _verify_action_to_sdc(self, desired_status: str, desired_action: str,
              Severity: Minor
              Found in src/onapsdk/sdc/service.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 send_message_json has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def send_message_json(cls, method: str, action: str, url: str,
                  Severity: Minor
                  Found in src/onapsdk/onap_service.py - About 35 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return const.SUBMITTED
                    Severity: Major
                    Found in src/onapsdk/sdc/sdc_resource.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return None
                      Severity: Major
                      Found in src/onapsdk/sdc/sdc_resource.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return sdc_status
                        Severity: Major
                        Found in src/onapsdk/sdc/sdc_resource.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                      return const.UNDER_CERTIFICATION
                          Severity: Major
                          Found in src/onapsdk/sdc/sdc_resource.py - About 30 mins to fix

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

                                def vf_module(self) -> "VfModule":
                                    """Vf module associated with that vf module instance.
                            
                                    Returns:
                                        VfModule: VfModule object associated with vf module instance
                            Severity: Minor
                            Found in src/onapsdk/aai/business/vf_module.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 vnf has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def vnf(self) -> "Vnf":
                                    """Vnf associated with that vnf instance.
                            
                                    Raises:
                                        ResourceNotFound: Could not find VNF for that VNF instance
                            Severity: Minor
                            Found in src/onapsdk/aai/business/vnf.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 pnf has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def pnf(self) -> "Pnf":
                                    """Pnf associated with that pnf instance.
                            
                                    Raises:
                                        ResourceNotFound: Could not find PNF for that PNF instance
                            Severity: Minor
                            Found in src/onapsdk/aai/business/pnf.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 get_vf_list_from_tosca_file has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def get_vf_list_from_tosca_file(model: str) -> List:
                                """Get the list of Vfs of a VNF based on the tosca file.
                            
                                Args:
                                    model (str): the model retrieved from the tosca file at Vnf
                            Severity: Minor
                            Found in src/onapsdk/utils/tosca_file_handler.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

                            Severity
                            Category
                            Status
                            Source
                            Language