diff --git a/TestON/drivers/common/cli/remotetestbed/floodlightclidriver.py b/TestON/drivers/common/cli/remotetestbed/floodlightclidriver.py
index 8b25b2f..10e7a85 100644
--- a/TestON/drivers/common/cli/remotetestbed/floodlightclidriver.py
+++ b/TestON/drivers/common/cli/remotetestbed/floodlightclidriver.py
@@ -1,14 +1,14 @@
 #!/usr/bin/env python
-'''
+"""
 Created on 12-Feb-2013
 
-@author: Anil Kumar (anilkumar.s@paxterrasolutions.com)
+author:: Anil Kumar ( anilkumar.s@paxterrasolutions.com )
 
 
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation, either version 2 of the License, or
-    (at your option) any later version.
+    ( at your option ) any later version.
 
     TestON is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,12 +16,11 @@
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License
-    along with TestON.  If not, see <http://www.gnu.org/licenses/>.		
+    along with TestON.  If not, see <http://www.gnu.org/licenses/>.
 
 
 FloodLightCliDriver is the basic driver which will handle the Mininet functions
-'''
-
+"""
 import pexpect
 import struct
 import fcntl
@@ -31,30 +30,44 @@
 import sys
 import time
 
-sys.path.append("../")
+sys.path.append( "../" )
 
 from drivers.common.cli.remotetestbeddriver import RemoteTestBedDriver
 
-class FloodLightCliDriver(RemoteTestBedDriver):
-    '''
-        FloodLightCliDriver is the basic driver which will handle the Mininet functions
-    '''
-    def __init__(self):
-        super(RemoteTestBedDriver, self).__init__()
-        
-    def connect(self,**connectargs):
-        for key in connectargs:
-            vars(self)[key] = connectargs[key]
-        
-        self.name = self.options['name']
 
-        self.handle = super(FloodLightCliDriver,self).connect(user_name = self.user_name, ip_address = self.ip_address,port = self.port, pwd = self.pwd)
-        if self.handle :
-            main.log.info("Connected "+self.name)
-            self.execute(cmd="\r",prompt="\$",timeout=10)
-            self.execute(cmd="cd /home/openflow/floodlight/",prompt="floodlight\$",timeout=3)
-            self.execute(cmd="java -jar target/floodlight.jar &",prompt="\$",timeout=3)
-            self.execute(cmd="\r",prompt="\$",timeout=10)
+class FloodLightCliDriver( RemoteTestBedDriver ):
+
+    """
+        FloodLightCliDriver is the basic driver which will handle the Mininet functions
+    """
+    def __init__( self ):
+        super( RemoteTestBedDriver, self ).__init__()
+
+    def connect( self, **connectargs ):
+        for key in connectargs:
+            vars( self )[ key ] = connectargs[ key ]
+
+        self.name = self.options[ 'name' ]
+
+        self.handle = super(
+            FloodLightCliDriver,
+            self ).connect(
+            user_name=self.user_name,
+            ip_address=self.ip_address,
+            port=self.port,
+            pwd=self.pwd )
+        if self.handle:
+            main.log.info( "Connected " + self.name )
+            self.execute( cmd="\r", prompt="\$", timeout=10 )
+            self.execute(
+                cmd="cd /home/openflow/floodlight/",
+                prompt="floodlight\$",
+                timeout=3 )
+            self.execute(
+                cmd="java -jar target/floodlight.jar &",
+                prompt="\$",
+                timeout=3 )
+            self.execute( cmd="\r", prompt="\$", timeout=10 )
             return self.handle
-        else :
+        else:
             return main.FALSE
diff --git a/TestON/drivers/common/cli/remotetestbed/necswitchdriver.py b/TestON/drivers/common/cli/remotetestbed/necswitchdriver.py
index f5e652a..07fb668 100644
--- a/TestON/drivers/common/cli/remotetestbed/necswitchdriver.py
+++ b/TestON/drivers/common/cli/remotetestbed/necswitchdriver.py
@@ -1,545 +1,757 @@
 class NEC:
+
     def __init__( self ):
         self.prompt = '(.*)'
-        self.timeout = 60 
+        self.timeout = 60
 
-    def show(self, *options, **def_args ):
-        '''Possible Options :['  access-filter  ', '  accounting  ', '  acknowledgments  ', '  auto-config  ', '  axrp  ', '  cfm  ', '  channel-group  ', '  clock  ', '  config-lock-status  ', '  cpu  ', '  dhcp  ', '  dot1x  ', '  dumpfile  ', '  efmoam  ', '  environment  ', '  file  ', '  flash  ', '  gsrp  ', '  history  ', '  igmp-snooping  ', '  interfaces  ', '  ip  ', '  ip-dual  ', '  ipv6-dhcp  ', '  license  ', '  lldp  ', '  logging  ', '  loop-detection  ', '  mac-address-table  ', '  mc  ', '  memory  ', '  mld-snooping  ', '  netconf  ', '  netstat  ', '  ntp  ', '  oadp  ', '  openflow  ', '  port  ', '  power  ', '  processes  ', '  qos  ', '  qos-flow  ', '  sessions  ', '  sflow  ', '  spanning-tree  ', '  ssh  ', '  system  ', '  tcpdump  ', '  tech-support  ', '  track  ', '  version  ', '  vlan  ', '  vrrpstatus  ', '  whoami  ']'''
-        arguments= ''
+    def show( self, *options, **def_args ):
+        "Possible Options :['  access-filter  ', '  accounting  ', '  acknowledgments  ', '  auto-config  ', '  axrp  ', '  cfm  ', '  channel-group  ', '  clock  ', '  config-lock-status  ', '  cpu  ', '  dhcp  ', '  dot1x  ', '  dumpfile  ', '  efmoam  ', '  environment  ', '  file  ', '  flash  ', '  gsrp  ', '  history  ', '  igmp-snooping  ', '  interfaces  ', '  ip  ', '  ip-dual  ', '  ipv6-dhcp  ', '  license  ', '  lldp  ', '  logging  ', '  loop-detection  ', '  mac-address-table  ', '  mc  ', '  memory  ', '  mld-snooping  ', '  netconf  ', '  netstat  ', '  ntp  ', '  oadp  ', '  openflow  ', '  port  ', '  power  ', '  processes  ', '  qos  ', '  qos-flow  ', '  sessions  ', '  sflow  ', '  spanning-tree  ', '  ssh  ', '  system  ', '  tcpdump  ', '  tech-support  ', '  track  ', '  version  ', '  vlan  ', '  vrrpstatus  ', '  whoami  ']"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute( cmd="show " + arguments, prompt=prompt, timeout=timeout )
         return main.TRUE
 
-    def show_ip(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_ip( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   ip   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   ip   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_mc(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_mc( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   mc   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   mc   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_cfm(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_cfm( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   cfm   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   cfm   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_ntp(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_ntp( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   ntp   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   ntp   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_ssh(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_ssh( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   ssh   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   ssh   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_qos(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_qos( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   qos   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   qos   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_cpu(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_cpu( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   cpu   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   cpu   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_vlan(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_vlan( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   vlan   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   vlan   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_lldp(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_lldp( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   lldp   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   lldp   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_dhcp(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_dhcp( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   dhcp   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   dhcp   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_axrp(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_axrp( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   axrp   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   axrp   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_oadp(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_oadp( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   oadp   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   oadp   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_gsrp(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_gsrp( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   gsrp   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   gsrp   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_port(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_port( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   port   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   port   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_file(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_file( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   file   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   file   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_power(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_power( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   power   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   power   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_clock(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_clock( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   clock   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   clock   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_dot1x(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_dot1x( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   dot1x   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   dot1x   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_sflow(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_sflow( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   sflow   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   sflow   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_track(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_track( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   track   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   track   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_flash(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_flash( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   flash   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   flash   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_system(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_system( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   system   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   system   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_whoami(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_whoami( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   whoami   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   whoami   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_efmoam(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_efmoam( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   efmoam   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   efmoam   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_memory(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_memory( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   memory   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   memory   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_tcpdump(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_tcpdump( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   tcpdump   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   tcpdump   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_history(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_history( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   history   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   history   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_logging(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_logging( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   logging   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   logging   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_license(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_license( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   license   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   license   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_netstat(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_netstat( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   netstat   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   netstat   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_version(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_version( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   version   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   version   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_netconf(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_netconf( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   netconf   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   netconf   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_ipdual(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_ipdual( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   ip-dual   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   ip-dual   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_sessions(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_sessions( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   sessions   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   sessions   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_qosflow(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_qosflow( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   qos-flow   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   qos-flow   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_openflow(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_openflow( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   openflow   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   openflow   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_dumpfile(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_dumpfile( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   dumpfile   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   dumpfile   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_ipv6dhcp(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_ipv6dhcp( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   ipv6-dhcp   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   ipv6-dhcp   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_processes(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_processes( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   processes   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   processes   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_vrrpstatus(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_vrrpstatus( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   vrrpstatus   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   vrrpstatus   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_interfaces(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_interfaces( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   interfaces   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   interfaces   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_environment(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_environment( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   environment   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   environment   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_autoconfig(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_autoconfig( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   auto-config   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   auto-config   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_techsupport(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_techsupport( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   tech-support   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   tech-support   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_mldsnooping(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_mldsnooping( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   mld-snooping   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   mld-snooping   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_igmpsnooping(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_igmpsnooping( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   igmp-snooping   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   igmp-snooping   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_channelgroup(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_channelgroup( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   channel-group   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   channel-group   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_spanningtree(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_spanningtree( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   spanning-tree   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   spanning-tree   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_loopdetection(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_loopdetection( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   loop-detection   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   loop-detection   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_acknowledgments(self, *options, **def_args ):
-        '''Possible Options :['  interface  ']'''
-        arguments= ''
+    def show_acknowledgments( self, *options, **def_args ):
+        "Possible Options :['  interface  ']"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   acknowledgments   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   acknowledgments   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_macaddresstable(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_macaddresstable( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   mac-address-table   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   mac-address-table   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_configlockstatus(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_configlockstatus( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   config-lock-status   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   config-lock-status   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
 
-    def show_acknowledgments_interface(self, *options, **def_args ):
-        '''Possible Options :[]'''
-        arguments= ''
+    def show_acknowledgments_interface( self, *options, **def_args ):
+        "Possible Options :[]"
+        arguments = ''
         for option in options:
-            arguments = arguments + option +' ' 
-        prompt = def_args.setdefault('prompt',self.prompt)
-        timeout = def_args.setdefault('timeout',self.timeout)
-        self.execute( cmd= "show   acknowledgments     interface   "+ arguments, prompt = prompt, timeout = timeout ) 
+            arguments = arguments + option + ' '
+        prompt = def_args.setdefault( 'prompt', self.prompt )
+        timeout = def_args.setdefault( 'timeout', self.timeout )
+        self.execute(
+            cmd="show   acknowledgments     interface   " +
+            arguments,
+            prompt=prompt,
+            timeout=timeout )
         return main.TRUE
-
