Package com.vmware.vim25

Examples of com.vmware.vim25.HostNetworkInfo


        return null;
    }

    public String getPortGroupVirtualSwitchName(String portGroupName) throws Exception {
        HostNetworkInfo hostNetInfo = getHostNetworkInfo();
        List<HostPortGroup> portGroups = hostNetInfo.getPortgroup();
        if (portGroups != null) {
            for (HostPortGroup portGroup : portGroups) {
                HostPortGroupSpec spec = portGroup.getSpec();
                if (spec.getName().equals(portGroupName))
                    return spec.getVswitchName();
View Full Code Here


        return null;
    }

    public HostPortGroupSpec getPortGroupSpec(String portGroupName) throws Exception {
        HostNetworkInfo hostNetInfo = getHostNetworkInfo();
        List<HostPortGroup> portGroups = hostNetInfo.getPortgroup();
        if (portGroups != null) {
            for (HostPortGroup portGroup : portGroups) {
                HostPortGroupSpec spec = portGroup.getSpec();
                if (spec.getName().equals(portGroupName))
                    return spec;
View Full Code Here

            }
        }

        if (nicType == HostVirtualNicType.management) {
            // ESX management network is configured in service console
            HostNetworkInfo netInfo = getHostNetworkInfo();
            assert (netInfo != null);
            List<HostVirtualNic> nics = netInfo.getConsoleVnic();
            if (nics != null) {
                for (HostVirtualNic nic : nics) {
                    return nic.getPortgroup();
                }
            }
View Full Code Here

                firewallMo.refreshFirewall();
        }
    }

    public String getHostManagementIp(String managementPortGroup) throws Exception {
        HostNetworkInfo netInfo = getHostNetworkInfo();

        List<HostVirtualNic> nics = netInfo.getVnic();
        for (HostVirtualNic nic : nics) {
            if (nic.getPortgroup().equals(managementPortGroup)) {
                HostIpConfig ipConfig = nic.getSpec().getIp();

                return ipConfig.getIpAddress();
View Full Code Here

    return (HostNetworkInfo)_context.getVimClient().getDynamicProperty(_mor, "config.network");
  }

  public HostPortGroupSpec getHostPortGroupSpec(String portGroupName) throws Exception {

    HostNetworkInfo hostNetInfo = getHostNetworkInfo();

    List<HostPortGroup> portGroups = hostNetInfo.getPortgroup();
    if(portGroups != null) {
      for(HostPortGroup portGroup : portGroups) {
        HostPortGroupSpec spec = portGroup.getSpec();
        if(spec.getName().equals(portGroupName))
          return spec;
View Full Code Here

    return null;
  }

  public String getPortGroupVirtualSwitchName(String portGroupName) throws Exception {
    HostNetworkInfo hostNetInfo = getHostNetworkInfo();
    List<HostPortGroup> portGroups = hostNetInfo.getPortgroup();
    if(portGroups != null) {
      for(HostPortGroup portGroup : portGroups) {
        HostPortGroupSpec spec = portGroup.getSpec();
        if(spec.getName().equals(portGroupName))
          return spec.getVswitchName();
View Full Code Here

    return null;
  }

  public HostPortGroupSpec getPortGroupSpec(String portGroupName) throws Exception {
    HostNetworkInfo hostNetInfo = getHostNetworkInfo();
    List<HostPortGroup> portGroups = hostNetInfo.getPortgroup();
    if(portGroups != null) {
      for(HostPortGroup portGroup : portGroups) {
        HostPortGroupSpec spec = portGroup.getSpec();
        if(spec.getName().equals(portGroupName))
          return spec;
View Full Code Here

      }
    }

    if(nicType == HostVirtualNicType.management) {
      // ESX management network is configured in service console
      HostNetworkInfo netInfo = getHostNetworkInfo();
      assert(netInfo != null);
      List<HostVirtualNic> nics = netInfo.getConsoleVnic();
      if(nics != null) {
        for(HostVirtualNic nic : nics) {
          return nic.getPortgroup();
        }
      }
View Full Code Here

                return node.getSnapshot();
            } else {
                VirtualMachineSnapshotTree[] childTree =
                    node.getChildSnapshotList();
                if (childTree != null) {
                    ManagedObjectReference mor =
                        findSnapshotInTree(childTree, snapName);
                    if (mor != null) { return mor; }
                }
            }
        }
View Full Code Here

       
        VirtualMachineSnapshotTree[] snapTree =
            vm_.getSnapshot().getRootSnapshotList();
       
        if (snapTree != null) {
            ManagedObjectReference mor = findSnapshotInTree(snapTree, snapName);
            if (mor != null) {
                return new
                    VirtualMachineSnapshot(vm_.getServerConnection(), mor);
            }
        }
View Full Code Here

TOP

Related Classes of com.vmware.vim25.HostNetworkInfo

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.