question: public List < FCEndpoint > showFcnsDatabase ( Integer vsanId ) throws NetworkDeviceControllerException { Map < Integer , String > vsanToWwns = getVsanWwns ( vsanId ) ; List < FCEndpoint > connections = new ArrayList < FCEndpoint > ( ) ; SSHPrompt [ ] prompts = { SSHPrompt . MDS_POUND , SSHPrompt . MDS_GREATER_THAN } ; StringBuilder buf = new StringBuilder ( ) ; String cmd = MDSDialogProperties . getString ( "MDSDialog.showFcnsDatabase.cmd" ) ; if ( vsanId != null ) { cmd = cmd + MDSDialogProperties . getString ( "MDSDialog.showFcnsDatabase.vsan.cmd" ) + vsanId . toString ( ) + "\n" ; } else { cmd = cmd + "\n" ; } SSHPrompt prompt = sendWaitFor ( cmd , defaultTimeout , prompts , buf ) ; String [ ] lines = getLines ( buf ) ; String [ ] regex = { MDSDialogProperties . getString ( "MDSDialog.showFcnsDatabase.VSAN.match" ) , MDSDialogProperties . getString ( "MDSDialog.showFcnsDatabase.portwwn.match" ) , MDSDialogProperties . getString ( "MDSDialog.showFcnsDatabase.nodewwn.match" ) , MDSDialogProperties . getString ( "MDSDialog.showFcnsDatabase.fabricportwwn.match" ) , MDSDialogProperties . getString ( "MDSDialog.showFcnsDatabase.ConnectedInterface.match" ) , MDSDialogProperties . getString ( "MDSDialog.showFcnsDatabase.SwitchName.match" ) , MDSDialogProperties . getString ( "MDSDialog.showFcnsDatabase.deviceAlias.match" ) } ; String [ ] groups = new String [ 10 ] ; FCEndpoint conn = null ; for ( String line : lines ) { int index = match ( line , regex , groups , Pattern . CASE_INSENSITIVE ) ; switch ( index ) { case 0 : conn = new FCEndpoint ( ) ; conn . setFabricId ( groups [ 0 ] ) ; conn . setFcid ( groups [ 1 ] ) ; String fabricWwn = vsanToWwns . get ( new Integer ( groups [ 0 ] ) ) ; if ( fabricWwn != null ) { conn . setFabricWwn ( fabricWwn ) ; } connections . add ( conn ) ; break ; case 1 : conn . setRemotePortName ( groups [ 0 ] ) ; break ; case 2 : conn . setRemoteNodeName ( groups [ 0 ] ) ; break ; case 3 : conn . setSwitchPortName ( groups [ 0 ] ) ; break ; case 4 : conn . setSwitchInterface ( groups [ 0 ] ) ; break ; case 5 : conn . setSwitchName ( groups [ 0 ] ) ; break ; case 6 : conn . setRemotePortAlias ( groups [ 0 ] ) ; } } return connections ; }
target:  Generates a set of FCPortConnection entries for the specified vsan id (or all Vsans if vsanId is null).