Package com.vmware.vim25

Examples of com.vmware.vim25.AboutInfo


  public AboutInfo getHostAboutInfo() throws Exception {
    return (AboutInfo)_context.getServiceUtil().getDynamicProperty(_mor, "config.product");
  }
 
  public VmwareHostType getHostType() throws Exception {
    AboutInfo aboutInfo = getHostAboutInfo();
    if("VMware ESXi".equals(aboutInfo.getName()))
      return VmwareHostType.ESXi;
    else if("VMware ESX".equals(aboutInfo.getName()))
      return VmwareHostType.ESX;
   
    throw new Exception("Unrecognized VMware host type " + aboutInfo.getName());
  }
View Full Code Here


            if(!((HostMO)hyperHost).isHyperHostConnected()) {
              s_logger.info("Host " + hyperHost.getHyperHostName() + " is not in connected state");
              return null;
            }
           
            AboutInfo aboutInfo = ((HostMO)hyperHost).getHostAboutInfo();
            hostApiVersion = aboutInfo.getApiVersion();
           
        } catch (Exception e) {
            String msg = "VmwareResource intialize() failed due to : " + VmwareHelper.getExceptionMessage(e);
            s_logger.error(msg);
            invalidateServiceContext();
View Full Code Here

  public AboutInfo getHostAboutInfo() throws Exception {
    return (AboutInfo)_context.getVimClient().getDynamicProperty(_mor, "config.product");
  }

  public VmwareHostType getHostType() throws Exception {
    AboutInfo aboutInfo = getHostAboutInfo();
    if("VMware ESXi".equals(aboutInfo.getName()))
      return VmwareHostType.ESXi;
    else if("VMware ESX".equals(aboutInfo.getName()))
      return VmwareHostType.ESX;

    throw new Exception("Unrecognized VMware host type " + aboutInfo.getName());
  }
View Full Code Here

            } else if(mor.getType().equals("ClusterComputeResource")) {
                List<ManagedObjectReference> hosts = (List<ManagedObjectReference>)serviceContext.getVimClient().getDynamicProperty(mor, "host");
                assert(hosts != null);

                if (hosts.size() > 0) {
                    AboutInfo about = (AboutInfo)(serviceContext.getVimClient().getDynamicProperty(hosts.get(0), "config.product"));
                    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);
View Full Code Here

                  return null;
              }
             
              ((HostMO)hyperHost).enableVncOnHostFirewall();
 
              AboutInfo aboutInfo = ((HostMO)hyperHost).getHostAboutInfo();
              hostApiVersion = aboutInfo.getApiVersion();
 
          } catch (Exception e) {
              String msg = "VmwareResource intialize() failed due to : " + VmwareHelper.getExceptionMessage(e);
              s_logger.error(msg);
              invalidateServiceContext();
View Full Code Here

            } else if(mor.getType().equals("ClusterComputeResource")) {
                List<ManagedObjectReference> hosts = (List<ManagedObjectReference>)serviceContext.getVimClient().getDynamicProperty(mor, "host");
                assert(hosts != null);

                if (hosts.size() > 0) {
                    AboutInfo about = (AboutInfo)(serviceContext.getVimClient().getDynamicProperty(hosts.get(0), "config.product"));
                    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);
View Full Code Here

                    return null;
                }

                ((HostMO)hyperHost).enableVncOnHostFirewall();

                AboutInfo aboutInfo = ((HostMO)hyperHost).getHostAboutInfo();
                hostApiVersion = aboutInfo.getApiVersion();

            } catch (Exception e) {
                String msg = "VmwareResource intialize() failed due to : " + VmwareHelper.getExceptionMessage(e);
                s_logger.error(msg);
                invalidateServiceContext();
View Full Code Here

            } else if (mor.getType().equals("ClusterComputeResource")) {
                List<ManagedObjectReference> hosts = serviceContext.getVimClient().getDynamicProperty(mor, "host");
                assert (hosts != null);

                if (hosts.size() > 0) {
                    AboutInfo about = (AboutInfo)(serviceContext.getVimClient().getDynamicProperty(hosts.get(0), "config.product"));
                    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);
View Full Code Here

                  return null;
              }
             
              ((HostMO)hyperHost).enableVncOnHostFirewall();
 
              AboutInfo aboutInfo = ((HostMO)hyperHost).getHostAboutInfo();
              hostApiVersion = aboutInfo.getApiVersion();
 
          } catch (Exception e) {
              String msg = "VmwareResource intialize() failed due to : " + VmwareHelper.getExceptionMessage(e);
              s_logger.error(msg);
              invalidateServiceContext();
View Full Code Here

                    return null;
                }

                ((HostMO)hyperHost).enableVncOnHostFirewall();

                AboutInfo aboutInfo = ((HostMO)hyperHost).getHostAboutInfo();
                hostApiVersion = aboutInfo.getApiVersion();

            } catch (Exception e) {
                String msg = "VmwareResource intialize() failed due to : " + VmwareHelper.getExceptionMessage(e);
                s_logger.error(msg);
                invalidateServiceContext();
View Full Code Here

TOP

Related Classes of com.vmware.vim25.AboutInfo

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.