@Override
 public void processConnect(HostVO agent, StartupCommand cmd, boolean forRebalance) {
   if ((cmd instanceof StartupStorageCommand)) {
     StartupStorageCommand scmd = (StartupStorageCommand) cmd;
     if (scmd.getResourceType() == Storage.StorageResourceType.SECONDARY_STORAGE) {
       _ssVmMgr.generateSetupCommand(agent.getId());
       return;
     }
   } else if (cmd instanceof StartupSecondaryStorageCommand) {
     if (s_logger.isInfoEnabled()) {
       s_logger.info("Received a host startup notification " + cmd);
     }
     _ssVmMgr.onAgentConnect(agent.getDataCenterId(), cmd);
     _ssVmMgr.generateSetupCommand(agent.getId());
     _ssVmMgr.generateFirewallConfiguration(agent.getId());
     _ssVmMgr.generateVMSetupCommand(agent.getId());
     return;
   }
   return;
 }
  @Override
  @DB
  public void processConnect(Host host, StartupCommand cmd, boolean forRebalance)
      throws ConnectionException {
    if (!(cmd instanceof StartupStorageCommand)) {
      return;
    }

    StartupStorageCommand ssCmd = (StartupStorageCommand) cmd;

    if (ssCmd.getResourceType() != Storage.StorageResourceType.STORAGE_POOL) {
      return;
    }

    StoragePoolInfo pInfo = ssCmd.getPoolInfo();
    if (pInfo == null) {
      return;
    }

    this._storageMgr.createLocalStorage(host, pInfo);
  }