Ejemplo n.º 1
0
 def cli_output(self, show_legend=False):
     """
     :return: output for 'netshow interface <ifacename> for a bridge interface'
     """
     _str = one_line_legend(show_legend)
     _str += self.cli_header()
     _str += self.bridgemem_details()
     _str += self.lldp_details()
     _str += full_legend(show_legend)
     return _str
Ejemplo n.º 2
0
 def cli_output(self, show_legend=False):
     """
     :return: output for 'netshow interface <ifacename> for a bridge interface'
     """
     _str = one_line_legend(show_legend)
     _str += self.cli_header()
     _str += self.bridgemem_details()
     _str += self.lldp_details()
     _str += full_legend(show_legend)
     return _str
Ejemplo n.º 3
0
 def cli_output(self, show_legend=False):
     """
     cli output of the linux bond member interface
     :return: output for 'netshow interface <ifacename>'
     """
     _str = one_line_legend(show_legend)
     _str += self.cli_header()
     _str += self.bondmem_details()
     _str += self.lldp_details()
     _str += full_legend(show_legend)
     return _str
Ejemplo n.º 4
0
 def cli_output(self, show_legend=False):
     """
     cli output of the linux bond member interface
     :return: output for 'netshow interface <ifacename>'
     """
     _str = one_line_legend(show_legend)
     _str += self.cli_header()
     _str += self.bondmem_details()
     _str += self.lldp_details()
     _str += full_legend(show_legend)
     return _str
Ejemplo n.º 5
0
    def cli_output(self, show_legend=False):
        """
        :return: output for 'netshow interface <ifacename> for a bridge interface'
        """
        _str = one_line_legend(show_legend)
        _str += self.cli_header()
        _str += self.ip_details()
        if self.iface.stp:
            _str += self.stp_details()
            for _state in ['forwarding', 'blocking']:
                _str += self.ports_of_some_kind_of_state(_state)
        else:
            _str += self.no_stp_details()
        _str += full_legend(show_legend)

        return _str
Ejemplo n.º 6
0
 def cli_output(self, show_legend=False):
     """
     Each PrintIface child should define their own  of this function
     Args:
         show_legend:  if set to to true, will show legend,
                     otherwise will show just one line. message
                     telling user to run "netshow" with -l option
     Returns:
         output for 'netshow interface <ifacename>'
     """
     _str = one_line_legend(show_legend)
     _str += self.cli_header()
     _str += self.ip_details()
     _str += self.lldp_details()
     _str += full_legend(show_legend)
     return _str
Ejemplo n.º 7
0
    def cli_output(self, show_legend=False):
        """
        :return: output for 'netshow interface <ifacename> for a bridge interface'
        """
        _str = one_line_legend(show_legend)
        _str += self.cli_header()
        _ip_details = self.ip_details()
        if _ip_details:
            _str += self.ip_details()
        if self.iface.stp:
            _str += self.stp_details()
            for _state in ['forwarding', 'blocking']:
                _str += self.ports_of_some_kind_of_state(_state)
        else:
            _str += self.no_stp_details()
        _str += full_legend(show_legend)

        return _str