public boolean isIvrEnabled() throws NetworkDeviceControllerException {
  boolean ivrEnabled=false;
  boolean ivrDistributeEnabled=false;
  ;
  boolean ivrVsanTopologyActive=false;
  SSHPrompt[] prompts={SSHPrompt.MDS_POUND,SSHPrompt.MDS_CONFIG,SSHPrompt.MDS_CONFIG_IVR_ZONE,SSHPrompt.MDS_CONFIG_IVR_ZONESET};
  StringBuilder buf=new StringBuilder();
  sendWaitFor(MDSDialogProperties.getString("MDSDialog.ivr.show.cmd"),10000,prompts,buf);
  String[] lines=getLines(buf);
  for (  String line : lines) {
    if (line.indexOf(MDSDialogProperties.getString("MDSDialog.ivr.enabled")) >= 0) {
      ivrEnabled=true;
    }
 else     if (line.indexOf(MDSDialogProperties.getString("MDSDialog.ivr.distribute.enabled")) >= 0) {
      ivrDistributeEnabled=true;
    }
 else     if (line.indexOf(MDSDialogProperties.getString("MDSDialog.ivr.auto.topology.enabled")) >= 0) {
      ivrVsanTopologyActive=true;
    }
    if (ivrEnabled && ivrVsanTopologyActive && ivrDistributeEnabled) {
      break;
    }
  }
  return ivrEnabled && ivrVsanTopologyActive && ivrDistributeEnabled;
}

public boolean isIvrEnabled ( ) throws NetworkDeviceControllerException { boolean ivrEnabled = false ; boolean ivrDistributeEnabled = false ; ; boolean ivrVsanTopologyActive = false ; SSHPrompt [ ] prompts = { SSHPrompt . MDS_POUND , SSHPrompt . MDS_CONFIG , SSHPrompt . MDS_CONFIG_IVR_ZONE , SSHPrompt . MDS_CONFIG_IVR_ZONESET } ; StringBuilder buf = new StringBuilder ( ) ; sendWaitFor ( MDSDialogProperties . getString ( "MDSDialog.ivr.show.cmd" ) , 10000 , prompts , buf ) ; String [ ] lines = getLines ( buf ) ; for ( String line : lines ) { if ( line . indexOf ( MDSDialogProperties . getString ( "MDSDialog.ivr.enabled" ) ) >= 0 ) { ivrEnabled = true ; } else if ( line . indexOf ( MDSDialogProperties . getString ( "MDSDialog.ivr.distribute.enabled" ) ) >= 0 ) { ivrDistributeEnabled = true ; } else if ( line . indexOf ( MDSDialogProperties . getString ( "MDSDialog.ivr.auto.topology.enabled" ) ) >= 0 ) { ivrVsanTopologyActive = true ; } if ( ivrEnabled && ivrVsanTopologyActive && ivrDistributeEnabled ) { break ; } } return ivrEnabled && ivrVsanTopologyActive && ivrDistributeEnabled ; }
check if auto routing is enabled for the device . it is enabled if ivr , its distributing mode , and auto topology are enabled
