public String[] showVersion() throws NetworkDeviceControllerException {
  String[] returnVal=new String[2];
  SSHPrompt[] prompts={SSHPrompt.MDS_POUND,SSHPrompt.MDS_GREATER_THAN};
  StringBuilder buf=new StringBuilder();
  SSHPrompt prompt=sendWaitFor(MDSDialogProperties.getString("MDSDialog.showVersion.cmd"),10000,prompts,buf);
  String[] lines=getLines(buf);
  String[] regex={MDSDialogProperties.getString("MDSDialog.showVersion.version.match"),MDSDialogProperties.getString("MDSDialog.showVersion.MDS.match"),MDSDialogProperties.getString("MDSDialog.showVersion.Nexus.match")};
  String[] groups=new String[2];
  for (  String line : lines) {
    int index=match(line,regex,groups);
switch (index) {
case 0:
      returnVal[1]=groups[0];
    break;
case 1:
  returnVal[0]=groups[0];
break;
case 2:
returnVal[0]=groups[0];
break;
}
}
return returnVal;
}

public String [ ] showVersion ( ) throws NetworkDeviceControllerException { String [ ] returnVal = new String [ 2 ] ; SSHPrompt [ ] prompts = { SSHPrompt . MDS_POUND , SSHPrompt . MDS_GREATER_THAN } ; StringBuilder buf = new StringBuilder ( ) ; SSHPrompt prompt = sendWaitFor ( MDSDialogProperties . getString ( "MDSDialog.showVersion.cmd" ) , 10000 , prompts , buf ) ; String [ ] lines = getLines ( buf ) ; String [ ] regex = { MDSDialogProperties . getString ( "MDSDialog.showVersion.version.match" ) , MDSDialogProperties . getString ( "MDSDialog.showVersion.MDS.match" ) , MDSDialogProperties . getString ( "MDSDialog.showVersion.Nexus.match" ) } ; String [ ] groups = new String [ 2 ] ; for ( String line : lines ) { int index = match ( line , regex , groups ) ; switch ( index ) { case 0 : returnVal [ 1 ] = groups [ 0 ] ; break ; case 1 : returnVal [ 0 ] = groups [ 0 ] ; break ; case 2 : returnVal [ 0 ] = groups [ 0 ] ; break ; } } return returnVal ; }
returns the device type and software version
