Orange-OpenSource/python-onapsdk

View on GitHub

Showing 97 of 1,318 total issues

Function instantiate_ala_carte has 11 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 instantiate_ala_carte has 11 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 add_vnf has 11 arguments (exceeds 4 allowed). Consider refactoring.
      Open

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

        Function __init__ has 11 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 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def __init__(self,  # pylint: disable=too-many-arguments, too-many-locals
                           service_instance: "ServiceInstance",
                           pnf_name: str,
                           in_maint: bool,
                           selflink: str = None,
          Severity: Minor
          Found in src/onapsdk/aai/business/pnf.py - About 1 hr to fix

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

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

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

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

                Function instantiate_ala_carte has 10 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 10 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def __init__(self,
                  Severity: Major
                  Found in src/onapsdk/aai/cloud_infrastructure/geo_region.py - About 1 hr to fix

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

                        def create(cls,  # pylint: disable=too-many-arguments
                    Severity: Major
                    Found in src/onapsdk/aai/cloud_infrastructure/geo_region.py - About 1 hr to fix

                      Function create_node_template has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def create_node_template(self,
                                                   node_template_type: Type[NodeTemplate],
                                                   component: "Component") -> NodeTemplate:
                              """Create a node template type object.
                      
                      
                      Severity: Minor
                      Found in src/onapsdk/sdc/service.py - About 1 hr 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 9 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

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

                        Function add_network has 9 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

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

                          Function __init__ has 9 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 __init__ has 9 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

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

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

                                  def __init__(self, sp_partner_id: str, resource_version: str, url: str = None,  # pylint: disable=too-many-arguments, too-many-locals
                              Severity: Major
                              Found in src/onapsdk/aai/business/sp_partner.py - About 1 hr to fix

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

                                    def create(cls, sp_partner_id: str, url: str = "", callsource: str = "",  # pylint: disable=too-many-arguments
                                Severity: Major
                                Found in src/onapsdk/aai/business/sp_partner.py - About 1 hr to fix

                                  Function so_action has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

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

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

                                        def onboard(self) -> None:
                                            """Onboard the VSP in SDC."""
                                            status: Optional[str] = self.status
                                            if not status:
                                                if not self._vendor:
                                    Severity: Minor
                                    Found in src/onapsdk/sdc/vsp.py - About 1 hr 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 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        def __init__(self,  # pylint: disable=too-many-arguments, too-many-locals
                                                     service_instance: "ServiceInstance",
                                                     network_id: str,
                                                     is_bound_to_vpn: bool,
                                                     is_provider_network: bool,
                                    Severity: Minor
                                    Found in src/onapsdk/aai/business/network.py - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language