intracom-telecom-sdn/multinet

View on GitHub

Showing 32 of 32 total issues

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

def copy_directory_to_target(ipaddr, user, passwd, local_path, remote_path,
Severity: Minor
Found in util/netutil.py - About 45 mins to fix

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

    def ssh_copy_file_to_target(ipaddr, user, passwd, local_file, remote_file,
    Severity: Minor
    Found in util/netutil.py - About 45 mins to fix

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

      def ssh_connect_or_return(ipaddr, user, passwd, maxretries, remote_port=22):
      Severity: Minor
      Found in util/netutil.py - About 35 mins to fix

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

        def create_remote_directory(ipaddr, user, passwd, remote_path, remote_port=22):
        Severity: Minor
        Found in util/netutil.py - About 35 mins to fix

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

          def ssh_delete_file_if_exists(ipaddr, user, passwd, remote_file,
          Severity: Minor
          Found in util/netutil.py - About 35 mins to fix

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

            def make_post_request_runner(host_ip, host_port, route, data, queue):
            Severity: Minor
            Found in util/multinet_requests.py - About 35 mins to fix

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

              def make_remote_file_executable(ipaddr, user, passwd, remote_file,
              Severity: Minor
              Found in util/netutil.py - About 35 mins to fix

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

                def genHostName(i, j, dpid, n, k):
                Severity: Minor
                Found in net/topologies.py - About 35 mins to fix

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

                  def remove_remote_directory(ipaddr, user, passwd, path, remote_port=22):
                  Severity: Minor
                  Found in util/netutil.py - About 35 mins to fix

                    Function build has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def build(self, k=2, n=1, dpid=1, **_opts):
                            """k: number of switches
                               n: number of hosts per switch"""
                            self.k = k
                            self.n = n
                    Severity: Minor
                    Found in net/topologies.py - About 35 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 copy_directory_to_target has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def copy_directory_to_target(ipaddr, user, passwd, local_path, remote_path,
                                                 remote_port=22):
                        """Copy a local directory on a remote machine.
                    
                        :param ipaddr: IP adress of the remote machine
                    Severity: Minor
                    Found in util/netutil.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_flows has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def get_flows(self):
                            """
                            Getting flows from switches
                            """
                            logging.info('[get_flows] Getting flows from switches.')
                    Severity: Minor
                    Found in net/multinet.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