Package com.cloud.exception

Examples of com.cloud.exception.DiscoveredWithErrorException


                }
                resource.start();
                resources.put(resource, details);
            }
        } catch (SessionAuthenticationFailed e) {
            throw new DiscoveredWithErrorException("Authentication error");
        } catch (XenAPIException e) {
            s_logger.warn("XenAPI exception", e);
            return null;
        } catch (XmlRpcException e) {
            s_logger.warn("Xml Rpc Exception", e);
View Full Code Here


       
        List<HostVO> hosts = _resourceMgr.listAllHostsInCluster(clusterId);
        if(hosts.size() >= _vmwareMgr.getMaxHostsPerCluster()) {
          String msg = "VMware cluster " + cluster.getName() + " is too big to add new host now. (current configured cluster size: " + _vmwareMgr.getMaxHostsPerCluster() + ")";
          s_logger.error(msg);
          throw new DiscoveredWithErrorException(msg);
        }

        String privateTrafficLabel = null;
        String publicTrafficLabel = null;
        String guestTrafficLabel = null;
View Full Code Here

                assert(hosts != null);
               
                if(hosts.length > _maxHostsPerCluster) {
                  String msg = "vCenter cluster size is too big (current configured cluster size: " + _maxHostsPerCluster + ")";
                  s_logger.error(msg);
                  throw new DiscoveredWithErrorException(msg);
                }
               
                for(ManagedObjectReference morHost: hosts) {
                    // For ESX host, we need to enable host firewall to allow VNC access
                    HostMO hostMo = new HostMO(serviceContext, morHost);
View Full Code Here

                }
                resource.start();
                resources.put(resource, details);
            }                       
        } catch (SessionAuthenticationFailed e) {      
            throw new DiscoveredWithErrorException("Authentication error");
        } catch (XenAPIException e) {
            s_logger.warn("XenAPI exception", e);
            return null;
        } catch (XmlRpcException e) {
            s_logger.warn("Xml Rpc Exception", e);
View Full Code Here

      sshConnection = new com.trilead.ssh2.Connection(agentIp, 22);

      sshConnection.connect(null, 60000, 60000);
      if (!sshConnection.authenticateWithPassword(username, password)) {
        s_logger.debug("Failed to authenticate");
        throw new DiscoveredWithErrorException("Authentication error");
      }
     
      if (!SSHCmdHelper.sshExecuteCmd(sshConnection, "lsmod|grep kvm", 3)) {
        s_logger.debug("It's not a KVM enabled machine");
        return null;
View Full Code Here

                    String version = about.getApiVersion();
                    int maxHostsPerCluster = _hvCapabilitiesDao.getMaxHostsPerCluster(HypervisorType.VMware, version);
                    if (hosts.size() > maxHostsPerCluster) {
                        String msg = "Failed to add VMware cluster as size is too big, current size: " + hosts.size() + ", max. size: " + maxHostsPerCluster;
                        s_logger.error(msg);
                        throw new DiscoveredWithErrorException(msg);
                    }
                }

                for(ManagedObjectReference morHost: hosts) {
                    // For ESX host, we need to enable host firewall to allow VNC access
View Full Code Here

                assert(hosts != null);

                if(hosts.length > _maxHostsPerCluster) {
                    String msg = "vCenter cluster size is too big (current configured cluster size: " + _maxHostsPerCluster + ")";
                    s_logger.error(msg);
                    throw new DiscoveredWithErrorException(msg);
                }

                for(ManagedObjectReference morHost: hosts) {
                    // For ESX host, we need to enable host firewall to allow VNC access
                    HostMO hostMo = new HostMO(serviceContext, morHost);
View Full Code Here

      String msg = "VMware cluster "
          + cluster.getName()
          + " is too big to add new host now. (current configured cluster size: "
          + _vmwareMgr.getMaxHostsPerCluster() + ")";
      s_logger.error(msg);
      throw new DiscoveredWithErrorException(msg);
    }

    String privateTrafficLabel = null;
    String publicTrafficLabel = null;
    String guestTrafficLabel = null;
View Full Code Here

            sshConnection = new com.trilead.ssh2.Connection(agentIp, 22);

            sshConnection.connect(null, 60000, 60000);
            if (!sshConnection.authenticateWithPassword(username, password)) {
                s_logger.debug("Failed to authenticate");
                throw new DiscoveredWithErrorException("Authentication error");
            }

            if (!SSHCmdHelper.sshExecuteCmd(sshConnection, "lsmod|grep kvm", 3)) {
                s_logger.debug("It's not a KVM enabled machine");
                return null;
View Full Code Here

            sshConnection = new com.trilead.ssh2.Connection(agentIp, 22);

            sshConnection.connect(null, 60000, 60000);
            if (!sshConnection.authenticateWithPassword(username, password)) {
                s_logger.debug("Failed to authenticate");
                throw new DiscoveredWithErrorException("Authentication error");
            }

            if (!SSHCmdHelper.sshExecuteCmd(sshConnection, "lsmod|grep kvm", 3)) {
                s_logger.debug("It's not a KVM enabled machine");
                return null;
View Full Code Here

TOP

Related Classes of com.cloud.exception.DiscoveredWithErrorException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.