Пример #1
0
 /* (non-Javadoc)
  * If this element is ready, then it can be enabled.
  * @see org.apache.cloudstack.network.element.SspManager#isEnabled(com.cloud.network.PhysicalNetwork)
  */
 @Override
 public boolean canHandle(PhysicalNetwork physicalNetwork) {
   if (physicalNetwork != null) {
     if (fetchSspClients(physicalNetwork.getId(), physicalNetwork.getDataCenterId(), true).size()
         > 0) {
       return true;
     }
     s_logger.warn("enabled Ssp api endpoint not found. " + physicalNetwork.toString());
   } else {
     s_logger.warn("PhysicalNetwork is NULL.");
   }
   return false;
 }
Пример #2
0
 /* (non-Javadoc)
  * @see org.apache.cloudstack.network.element.NetworkElement#isReady(com.cloud.network.PhysicalNetworkServiceProvider)
  */
 @Override
 public boolean isReady(PhysicalNetworkServiceProvider provider) {
   PhysicalNetwork physicalNetwork = _physicalNetworkDao.findById(provider.getPhysicalNetworkId());
   assert (physicalNetwork != null);
   if (physicalNetwork != null) {
     if (fetchSspClients(physicalNetwork.getId(), physicalNetwork.getDataCenterId(), false).size()
         > 0) {
       return true;
     }
     s_logger.warn("Ssp api endpoint not found. " + physicalNetwork.toString());
   } else {
     s_logger.warn("PhysicalNetwork is NULL.");
   }
   return false;
 }