Package com.vmware.vim25

Examples of com.vmware.vim25.BoolPolicy


        assert(currentTrafficShapingPolicy != null);

        LongPolicy averageBandwidth = currentTrafficShapingPolicy.getAverageBandwidth();
        LongPolicy burstSize = currentTrafficShapingPolicy.getBurstSize();
        LongPolicy peakBandwidth = currentTrafficShapingPolicy.getPeakBandwidth();
        BoolPolicy isEnabled = currentTrafficShapingPolicy.getEnabled();

        if (!isEnabled.equals(shapingPolicy.getEnabled())) {
            return false;
        }

        if(averageBandwidth != null && !averageBandwidth.equals(shapingPolicy.getAverageBandwidth())) {
            if(s_logger.isInfoEnabled()) {
View Full Code Here


        DVSTrafficShapingPolicy shapingPolicy = new DVSTrafficShapingPolicy();
        if (networkRateMbps == null || networkRateMbps.intValue() <= 0) {
            return shapingPolicy;
        }
        shapingPolicy = new DVSTrafficShapingPolicy();
        BoolPolicy isEnabled = new BoolPolicy();
        LongPolicy averageBandwidth = new LongPolicy();
        LongPolicy peakBandwidth = new LongPolicy();
        LongPolicy burstSize = new LongPolicy();

        isEnabled.setValue(true);
        averageBandwidth.setValue((long) networkRateMbps.intValue() * 1024L * 1024L);
        // We chose 50% higher allocation than average bandwidth.
        // TODO(sateesh): Also let user specify the peak coefficient
        peakBandwidth.setValue((long) (averageBandwidth.getValue() * 1.5));
        // TODO(sateesh): Also let user specify the burst coefficient
View Full Code Here

        return vlanIdSpec;
    }

    public static DVSSecurityPolicy createDVSSecurityPolicy() {
        DVSSecurityPolicy secPolicy = new DVSSecurityPolicy();
        BoolPolicy allow = new BoolPolicy();
        allow.setValue(true);

        secPolicy.setForgedTransmits(allow);
        secPolicy.setAllowPromiscuous(allow);
        secPolicy.setMacChanges(allow);
        return secPolicy;
View Full Code Here

        assert(currentTrafficShapingPolicy != null);

        LongPolicy averageBandwidth = currentTrafficShapingPolicy.getAverageBandwidth();
        LongPolicy burstSize = currentTrafficShapingPolicy.getBurstSize();
        LongPolicy peakBandwidth = currentTrafficShapingPolicy.getPeakBandwidth();
        BoolPolicy isEnabled = currentTrafficShapingPolicy.getEnabled();

        if (!isEnabled.equals(shapingPolicy.getEnabled())) {
            return false;
        }

        if(averageBandwidth != null && !averageBandwidth.equals(shapingPolicy.getAverageBandwidth())) {
            if(s_logger.isInfoEnabled()) {
View Full Code Here

        DVSTrafficShapingPolicy shapingPolicy = new DVSTrafficShapingPolicy();
        if (networkRateMbps == null || networkRateMbps.intValue() <= 0) {
            return shapingPolicy;
        }
        shapingPolicy = new DVSTrafficShapingPolicy();
        BoolPolicy isEnabled = new BoolPolicy();
        LongPolicy averageBandwidth = new LongPolicy();
        LongPolicy peakBandwidth = new LongPolicy();
        LongPolicy burstSize = new LongPolicy();

        isEnabled.setValue(true);
        averageBandwidth.setValue(networkRateMbps.intValue() * 1024L * 1024L);
        // We chose 50% higher allocation than average bandwidth.
        // TODO(sateesh): Also let user specify the peak coefficient
        peakBandwidth.setValue((long) (averageBandwidth.getValue() * 1.5));
        // TODO(sateesh): Also let user specify the burst coefficient
View Full Code Here

        return vlanIdSpec;
    }

    public static DVSSecurityPolicy createDVSSecurityPolicy() {
        DVSSecurityPolicy secPolicy = new DVSSecurityPolicy();
        BoolPolicy allow = new BoolPolicy();
        allow.setValue(true);

        secPolicy.setForgedTransmits(allow);
        secPolicy.setAllowPromiscuous(allow);
        secPolicy.setMacChanges(allow);
        return secPolicy;
View Full Code Here

    assert(currentTrafficShapingPolicy != null);
   
    LongPolicy averageBandwidth = currentTrafficShapingPolicy.getAverageBandwidth();
    LongPolicy burstSize = currentTrafficShapingPolicy.getBurstSize();
    LongPolicy peakBandwidth = currentTrafficShapingPolicy.getPeakBandwidth();
    BoolPolicy isEnabled = currentTrafficShapingPolicy.getEnabled();
   
    if(!isEnabled.getValue())
      return false;
   
    if(averageBandwidth != null && !averageBandwidth.equals(shapingPolicy.getAverageBandwidth())) {
      if(s_logger.isInfoEnabled()) {
        s_logger.info("Average bandwidth setting in shaping policy doesn't match with existing setting.");
View Full Code Here

                    DVPortConfigInfo dvPortConfigInfo = vmDvPort
                            .getConfig();
                    VMwareDVSPortSetting settings = (VMwareDVSPortSetting) dvPortConfigInfo.getSetting();

                    VmwareDistributedVirtualSwitchVlanIdSpec vlanId = (VmwareDistributedVirtualSwitchVlanIdSpec) settings.getVlan();
                    BoolPolicy blocked = settings.getBlocked();
                    if (blocked.isValue() == Boolean.TRUE) {
                        s_logger.trace("Port is blocked, set a vlanid and unblock");
                        DVPortConfigSpec dvPortConfigSpec = new DVPortConfigSpec();
                        VMwareDVSPortSetting edittedSettings = new VMwareDVSPortSetting();
                        // Unblock
                        blocked.setValue(Boolean.FALSE);
                        blocked.setInherited(Boolean.FALSE);
                        edittedSettings.setBlocked(blocked);
                        // Set vlan
                        int i;
                        for (i = 1; i < 4095; i++) {
                            if (!usedVlans.contains(i))
View Full Code Here

    assert(currentTrafficShapingPolicy != null);
   
    LongPolicy averageBandwidth = currentTrafficShapingPolicy.getAverageBandwidth();
    LongPolicy burstSize = currentTrafficShapingPolicy.getBurstSize();
    LongPolicy peakBandwidth = currentTrafficShapingPolicy.getPeakBandwidth();
    BoolPolicy isEnabled = currentTrafficShapingPolicy.getEnabled();
   
    if(!isEnabled.getValue())
      return false;
   
    if(averageBandwidth != null && !averageBandwidth.equals(shapingPolicy.getAverageBandwidth())) {
      if(s_logger.isInfoEnabled()) {
        s_logger.info("Average bandwidth setting in shaping policy doesn't match with existing setting.");
View Full Code Here

        VirtualEthernetCard nic =  new VirtualE1000();
        VirtualEthernetCardNetworkBackingInfo nicBacking =
            new VirtualEthernetCardNetworkBackingInfo();
        nicBacking.setDeviceName(netName);

        Description info = new Description();
        info.setLabel(nicName);
        info.setSummary(netName);
        nic.setDeviceInfo(info);
   
        // type: "generated", "manual", "assigned" by VC
        nic.setAddressType("generated");
        nic.setBacking(nicBacking);
View Full Code Here

TOP

Related Classes of com.vmware.vim25.BoolPolicy

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.