Search in sources :

Example 1 with HostPortGroup

use of com.vmware.vim25.HostPortGroup in project CloudStack-archive by CloudStack-extras.

the class HostMO method getHostPortGroupSpec.

public HostPortGroupSpec getHostPortGroupSpec(String portGroupName) throws Exception {
    HostNetworkInfo hostNetInfo = getHostNetworkInfo();
    HostPortGroup[] portGroups = hostNetInfo.getPortgroup();
    if (portGroups != null) {
        for (HostPortGroup portGroup : portGroups) {
            HostPortGroupSpec spec = portGroup.getSpec();
            if (spec.getName().equals(portGroupName))
                return spec;
        }
    }
    return null;
}
Also used : HostNetworkInfo(com.vmware.vim25.HostNetworkInfo) HostPortGroup(com.vmware.vim25.HostPortGroup) HostPortGroupSpec(com.vmware.vim25.HostPortGroupSpec)

Example 2 with HostPortGroup

use of com.vmware.vim25.HostPortGroup in project cloudstack by apache.

the class HostMO method getHostPortGroupSpec.

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;
        }
    }
    return null;
}
Also used : HostNetworkInfo(com.vmware.vim25.HostNetworkInfo) HostPortGroup(com.vmware.vim25.HostPortGroup) HostPortGroupSpec(com.vmware.vim25.HostPortGroupSpec)

Example 3 with HostPortGroup

use of com.vmware.vim25.HostPortGroup in project CloudStack-archive by CloudStack-extras.

the class HostMO method getPortGroupVirtualSwitchName.

public String getPortGroupVirtualSwitchName(String portGroupName) throws Exception {
    HostNetworkInfo hostNetInfo = getHostNetworkInfo();
    HostPortGroup[] portGroups = hostNetInfo.getPortgroup();
    if (portGroups != null) {
        for (HostPortGroup portGroup : portGroups) {
            HostPortGroupSpec spec = portGroup.getSpec();
            if (spec.getName().equals(portGroupName))
                return spec.getVswitchName();
        }
    }
    return null;
}
Also used : HostNetworkInfo(com.vmware.vim25.HostNetworkInfo) HostPortGroup(com.vmware.vim25.HostPortGroup) HostPortGroupSpec(com.vmware.vim25.HostPortGroupSpec)

Example 4 with HostPortGroup

use of com.vmware.vim25.HostPortGroup in project CloudStack-archive by CloudStack-extras.

the class HostMO method getPortGroupSpec.

public HostPortGroupSpec getPortGroupSpec(String portGroupName) throws Exception {
    HostNetworkInfo hostNetInfo = getHostNetworkInfo();
    HostPortGroup[] portGroups = hostNetInfo.getPortgroup();
    if (portGroups != null) {
        for (HostPortGroup portGroup : portGroups) {
            HostPortGroupSpec spec = portGroup.getSpec();
            if (spec.getName().equals(portGroupName))
                return spec;
        }
    }
    return null;
}
Also used : HostNetworkInfo(com.vmware.vim25.HostNetworkInfo) HostPortGroup(com.vmware.vim25.HostPortGroup) HostPortGroupSpec(com.vmware.vim25.HostPortGroupSpec)

Example 5 with HostPortGroup

use of com.vmware.vim25.HostPortGroup in project cloudstack by apache.

the class HostMO method getPortGroupSpec.

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;
        }
    }
    return null;
}
Also used : HostNetworkInfo(com.vmware.vim25.HostNetworkInfo) HostPortGroup(com.vmware.vim25.HostPortGroup) HostPortGroupSpec(com.vmware.vim25.HostPortGroupSpec)

Aggregations

HostPortGroup (com.vmware.vim25.HostPortGroup)7 HostPortGroupSpec (com.vmware.vim25.HostPortGroupSpec)7 HostNetworkInfo (com.vmware.vim25.HostNetworkInfo)6 HostNetworkSecurityPolicy (com.vmware.vim25.HostNetworkSecurityPolicy)1 InvalidParameterException (java.security.InvalidParameterException)1 ArrayList (java.util.ArrayList)1