Search in sources :

Example 11 with VmwareDistributedVirtualSwitchVlanSpec

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

the class HypervisorHostHelperTest method testCreateDVPortVlanSpecValidVlanId.

@Test
public void testCreateDVPortVlanSpecValidVlanId() {
    VmwareDistributedVirtualSwitchVlanSpec spec = HypervisorHostHelper.createDVPortVlanSpec(100, "400");
    assertTrue(spec instanceof VmwareDistributedVirtualSwitchVlanIdSpec);
    assertTrue(((VmwareDistributedVirtualSwitchVlanIdSpec) spec).getVlanId() == 100);
}
Also used : VmwareDistributedVirtualSwitchVlanSpec(com.vmware.vim25.VmwareDistributedVirtualSwitchVlanSpec) VmwareDistributedVirtualSwitchVlanIdSpec(com.vmware.vim25.VmwareDistributedVirtualSwitchVlanIdSpec) Test(org.junit.Test)

Aggregations

VmwareDistributedVirtualSwitchVlanSpec (com.vmware.vim25.VmwareDistributedVirtualSwitchVlanSpec)8 VmwareDistributedVirtualSwitchVlanIdSpec (com.vmware.vim25.VmwareDistributedVirtualSwitchVlanIdSpec)5 Test (org.junit.Test)5 VMwareDVSPortSetting (com.vmware.vim25.VMwareDVSPortSetting)4 VmwareDistributedVirtualSwitchTrunkVlanSpec (com.vmware.vim25.VmwareDistributedVirtualSwitchTrunkVlanSpec)4 VmwareDistributedVirtualSwitchPvlanSpec (com.vmware.vim25.VmwareDistributedVirtualSwitchPvlanSpec)3 CloudException (com.cloud.exception.CloudException)2 CloudRuntimeException (com.cloud.utils.exception.CloudRuntimeException)2 DVPortgroupConfigInfo (com.vmware.vim25.DVPortgroupConfigInfo)2 DVPortgroupConfigSpec (com.vmware.vim25.DVPortgroupConfigSpec)2 ManagedObjectReference (com.vmware.vim25.ManagedObjectReference)2 IOException (java.io.IOException)2 URISyntaxException (java.net.URISyntaxException)2 InvalidParameterException (java.security.InvalidParameterException)2 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)2 TransformerException (javax.xml.transform.TransformerException)2 SAXException (org.xml.sax.SAXException)2 NumericRange (com.vmware.vim25.NumericRange)1