def show_run_vlan(self):
        self.write_line("spanning-tree")
        self.write_line("!")
        self.write_line("!")
        for vlan in sorted(self.switch_configuration.vlans, key=lambda v: v.number):
            if vlan_name(vlan):
                self.write_line("vlan %d name %s" % (vlan.number, vlan_name(vlan)))
            else:
                self.write_line("vlan %d" % vlan.number)

            untagged_ports = []
            for port in self.switch_configuration.ports:
                if not isinstance(port, VlanPort):
                    if vlan.number == 1 and port.access_vlan is None and port.trunk_native_vlan is None:
                        untagged_ports.append(port)
                    elif port.access_vlan == vlan.number or port.trunk_native_vlan == vlan.number:
                        untagged_ports.append(port)

            if len(untagged_ports) > 0:
                if vlan.number == 1:
                    self.write_line(" no untagged %s" % to_port_ranges(untagged_ports))
                else:
                    self.write_line(" untagged %s" % to_port_ranges(untagged_ports))

            tagged_ports = [p for p in self.switch_configuration.ports if
                            p.trunk_vlans and vlan.number in p.trunk_vlans]
            if tagged_ports:
                self.write_line(" tagged %s" % to_port_ranges(tagged_ports))

            vif = self.get_interface_vlan_for(vlan)
            if vif is not None:
                self.write_line(" router-interface %s" % vif.name)

            self.write_line("!")
        self.write_line("!")
        self.write_line("")
dataset/ETHPy150Open internap/fake-switches/fake_switches/brocade/command_processor/enabled.py/EnabledCommandProcessor.show_run_vlan/original