parameters: (ctx, vm, nicnum, adapter, args)
return_statement: return (0, None)
docstring: usage: nic <vm> <nicnum> trace [on|off [file]]
docstring_summary: usage: nic <vm> <nicnum> trace [on|off [file]]
docstring_tokens: usage : nic <vm > <nicnum > trace [ on|off [ file ]]
function: def nicTraceSubCmd(ctx, vm, nicnum, adapter, args):
      '''
      usage: nic <vm> <nicnum> trace [on|off [file]]
      '''
      (rc, r) = nicSwitchOnOff(adapter, 'traceEnabled', args)
      if len(args) == 1 and rc == 0:
          r = '%s file:%s' % (r, adapter.traceFile)
          return (0, r)
      elif len(args) == 3 and rc == 0:
          adapter.traceFile = args[2]
      return (0, None)
function_tokens: def nicTraceSubCmd ( ctx , vm , nicnum , adapter , args ) : ( rc , r ) = nicSwitchOnOff ( adapter , 'traceEnabled' , args ) if len ( args ) == 1 and rc == 0 : r = '%s file:%s' % ( r , adapter . traceFile ) return ( 0 , r ) elif len ( args ) == 3 and rc == 0 : adapter . traceFile = args [ 2 ] return ( 0 , None )