question: public List < Interface > showInterface ( ) throws NetworkDeviceControllerException { List < Interface > interfaces = new ArrayList < Interface > ( ) ; SSHPrompt [ ] prompts = { SSHPrompt . POUND , SSHPrompt . GREATER_THAN } ; StringBuilder buf = new StringBuilder ( ) ; SSHPrompt prompt = sendWaitFor ( MDSDialogProperties . getString ( "MDSDialog.showInterface.cmd" ) , 60000 , prompts , buf ) ; String [ ] lines = getLines ( buf ) ; String [ ] regex = { MDSDialogProperties . getString ( "MDSDialog.showInterface.interfacename.match" ) , MDSDialogProperties . getString ( "MDSDialog.showInterface.Portdescription.match" ) , MDSDialogProperties . getString ( "MDSDialog.showInterface.PortWWN.match" ) , MDSDialogProperties . getString ( "MDSDialog.showInterface.PortmodeFCID.match" ) , MDSDialogProperties . getString ( "MDSDialog.showInterface.Portvsan.match" ) , MDSDialogProperties . getString ( "MDSDialog.showInterface.Portmode.match" ) } ; String [ ] groups = new String [ 10 ] ; Interface intf = null ; for ( String line : lines ) { int index = match ( line , regex , groups ) ; switch ( index ) { case 0 : intf = new Interface ( groups [ 0 ] ) ; intf . setStatus ( groups [ 1 ] ) ; interfaces . add ( intf ) ; break ; case 1 : intf . setDescription ( groups [ 0 ] ) ; break ; case 2 : intf . setWwpn ( groups [ 0 ] ) ; break ; case 3 : intf . setMode ( groups [ 0 ] ) ; intf . setFcid ( groups [ 1 ] ) ; break ; case 4 : intf . setVsan ( groups [ 0 ] ) ; break ; case 5 : intf . setMode ( groups [ 0 ] ) ; break ; } } return interfaces ; }
target:  Issues the "show interface" command and collects in information into a list of interfaces. For now only parses fiber channel interfaces starting with "fc", e.g. fc1/1, fc2/20, ... This method is not currently used.