

def do_show(self, *args):
    if 'running-config'.startswith(args[0]):
        if (len(args) == 1):
            self.write_line('!Current Configuration:')
            self.write_line('!System Description "PowerConnect 6224P, 3.3.7.3, VxWorks 6.5"')
            self.write_line('!System Software Version 3.3.7.3')
            self.write_line('!Cut-through mode is configured as disabled')
            self.write_line('!')
            self.write_line('configure')
            self.write_line('vlan database')
            if (len(self.switch_configuration.vlans) > 0):
                self.write_line(('vlan %s' % ','.join(sorted([str(v.number) for v in self.switch_configuration.vlans]))))
            self.write_line('exit')
            for port in self.switch_configuration.ports:
                port_config = self.get_port_configuration(port)
                if (len(port_config) > 0):
                    self.write_line(('interface %s' % port.name))
                    for item in port_config:
                        self.write_line(item)
                    self.write_line('exit')
                    self.write_line('!')
            self.write_line('exit')
        elif 'interface'.startswith(args[1]):
            interface_name = ' '.join(args[2:])
            port = self.switch_configuration.get_port_by_partial_name(interface_name)
            if port:
                if isinstance(port, VlanPort):
                    config = self.get_vlan_port_configuration(port)
                else:
                    config = self.get_port_configuration(port)
                if (len(config) > 0):
                    for line in config:
                        self.write_line(line)
                else:
                    self.write_line('')
                self.write_line('')
            else:
                self.write_line('\nERROR: Invalid input!\n')
    elif 'vlan'.startswith(args[0]):
        if (len(args) == 1):
            self.show_vlan_page(list(self.switch_configuration.vlans))
        elif (args[1] == 'id'):
            if (len(args) < 3):
                self.write_line('')
                self.write_line('Command not found / Incomplete command. Use ? to list commands.')
                self.write_line('')
            elif (not _is_vlan_id(args[2])):
                self.write_line('                     ^')
                self.write_line('Invalid input. Please specify an integer in the range 1 to 4093.')
                self.write_line('')
            else:
                vlan = self.switch_configuration.get_vlan(int(args[2]))
                if (vlan is None):
                    self.write_line('')
                    self.write_line('ERROR: This VLAN does not exist.')
                    self.write_line('')
                else:
                    args.show_vlan_page([vlan])
    elif ('interfaces'.startswith(args[0]) and 'status'.startswith(args[1])):
        self.show_page(self.get_interfaces_status_output())
    elif 'version'.startswith(args[0]):
        self.show_version()

dataset/ETHPy150Open internap/fake-switches/fake_switches/dell/command_processor/enabled.py DellEnabledCommandProcessor.do_show/VarMisuse@545/817 `self`->`args`