Examples of VirtualSwitchType


Examples of com.cloud.hypervisor.vmware.mo.VirtualSwitchType

    String privateTrafficLabel = null;
    String publicTrafficLabel = null;
    String guestTrafficLabel = null;
    Map<String, String> vsmCredentials = null;

        VirtualSwitchType defaultVirtualSwitchType = VirtualSwitchType.StandardVirtualSwitch;

        String paramGuestVswitchType = null;
        String paramGuestVswitchName = null;
        String paramPublicVswitchType = null;
        String paramPublicVswitchName = null;
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualSwitchType

        Map<String, String> clusterDetails = _clusterDetailsDao.findDetails(host.getClusterId());
        // Get zone wide traffic labels from guest traffic and public traffic
        String guestTrafficLabel = _netmgr.getDefaultGuestTrafficLabel(host.getDataCenterId(), HypervisorType.VMware);
        String publicTrafficLabel = _netmgr.getDefaultPublicTrafficLabel(host.getDataCenterId(), HypervisorType.VMware);
        _readGlobalConfigParameters();
        VirtualSwitchType defaultVirtualSwitchType = getDefaultVirtualSwitchType();

        params.put("guestTrafficInfo", getTrafficInfo(TrafficType.Guest, guestTrafficLabel, clusterDetails, defaultVirtualSwitchType));
        params.put("publicTrafficInfo", getTrafficInfo(TrafficType.Public, publicTrafficLabel, clusterDetails, defaultVirtualSwitchType));

        return params;
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualSwitchType

        }
        return resource;
    }

    private void validateVswitchType(String inputVswitchType) {
        VirtualSwitchType vSwitchType = VirtualSwitchType.getType(inputVswitchType);
        if (vSwitchType == VirtualSwitchType.None) {
            s_logger.error("Unable to resolve " + inputVswitchType + " to a valid virtual switch type in VMware environment.");
            throw new InvalidParameterValueException("Invalid virtual switch type : " + inputVswitchType);
        }
    }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualSwitchType

    }

    private void plugPublicNic(VirtualMachineMO vmMo, final String vlanId, final String vifMacAddress) throws Exception {
        // TODO : probably need to set traffic shaping
        Pair<ManagedObjectReference, String> networkInfo = null;
        VirtualSwitchType vSwitchType = VirtualSwitchType.StandardVirtualSwitch;
        if (_publicTrafficInfo != null) {
            vSwitchType = _publicTrafficInfo.getVirtualSwitchType();
        }
        /** FIXME We have no clue which network this nic is on and that means that we can't figure out the BroadcastDomainType
         *  so we assume that it's VLAN for now
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualSwitchType

    }

    private Pair<ManagedObjectReference, String> prepareNetworkFromNicInfo(HostMO hostMo, NicTO nicTo, boolean configureVServiceInNexus, VirtualMachine.Type vmType) throws Exception {
        Pair<String, String> switchName;
        TrafficType trafficType;
        VirtualSwitchType switchType;

        switchName = getTargetSwitch(nicTo);
        trafficType = nicTo.getType();
        // Get switch type from resource property which is dictated by cluster property
        // If a virtual switch type is specified while adding cluster that will be used.
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualSwitchType

    }

    private void plugPublicNic(VirtualMachineMO vmMo, final String vlanId, final String vifMacAddress) throws Exception {
        // TODO : probably need to set traffic shaping
        Pair<ManagedObjectReference, String> networkInfo = null;
        VirtualSwitchType vSwitchType = VirtualSwitchType.StandardVirtualSwitch;
        if (_publicTrafficInfo != null) {
            vSwitchType = _publicTrafficInfo.getVirtualSwitchType();
        }
        /** FIXME We have no clue which network this nic is on and that means that we can't figure out the BroadcastDomainType
         *  so we assume that it's VLAN for now
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualSwitchType

    private Pair<ManagedObjectReference, String> prepareNetworkFromNicInfo(HostMO hostMo, NicTO nicTo, boolean configureVServiceInNexus, VirtualMachine.Type vmType) throws Exception {

        Ternary<String, String, String> switchDetails = getTargetSwitch(nicTo);
        nicTo.getType();
        VirtualSwitchType switchType = VirtualSwitchType.getType(switchDetails.second());
        String switchName = switchDetails.first();
        String vlanToken = switchDetails.third();

        String namePrefix = getNetworkNamePrefix(nicTo);
        Pair<ManagedObjectReference, String> networkInfo = null;
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualSwitchType

        if (!Arrays.asList(supportedTrafficTypes).contains(trafficType)) {
            throw new CloudException("Traffic type " + trafficType.toString() + " for nic " + nicTo.toString() + " is not supported.");
        }

        String switchName = null;
        VirtualSwitchType switchType = VirtualSwitchType.StandardVirtualSwitch;
        String vlanToken = Vlan.UNTAGGED;

        // Get switch details from the nicTO object
        if(nicTo.getName() != null && !nicTo.getName().isEmpty()) {
            String[] tokens = nicTo.getName().split(",");
            // Format of network traffic label is <VSWITCH>,<VLANID>,<VSWITCHTYPE>
            // If all 3 fields are mentioned then number of tokens would be 3.
            // If only <VSWITCH>,<VLANID> are mentioned then number of tokens would be 2.
            switchName = tokens[0];
            if(tokens.length == 2 || tokens.length == 3) {
                vlanToken = tokens[1];
                if (vlanToken.isEmpty()) {
                    vlanToken = Vlan.UNTAGGED;
                }
                if (tokens.length == 3) {
                    switchType = VirtualSwitchType.getType(tokens[2]);
                }
            }
        } else {
            if (trafficType == TrafficType.Guest && _guestTrafficInfo != null) {
                switchType = _guestTrafficInfo.getVirtualSwitchType();
                switchName = _guestTrafficInfo.getVirtualSwitchName();
            } else if (trafficType == TrafficType.Public && _publicTrafficInfo != null) {
                switchType = _publicTrafficInfo.getVirtualSwitchType();
                switchName = _publicTrafficInfo.getVirtualSwitchName();
            }
        }

            if (switchName == null
                   && (nicTo.getType() == Networks.TrafficType.Control || nicTo.getType() == Networks.TrafficType.Management || nicTo.getType() == Networks.TrafficType.Storage)) {
               switchName = _privateNetworkVSwitchName;
            }
        return new Ternary<String,String,String>(switchName, switchType.toString(), vlanToken);
    }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualSwitchType

    }

    private void plugPublicNic(VirtualMachineMO vmMo, final String vlanId, final String vifMacAddress) throws Exception {
        // TODO : probably need to set traffic shaping
        Pair<ManagedObjectReference, String> networkInfo = null;
        VirtualSwitchType vSwitchType = VirtualSwitchType.StandardVirtualSwitch;
        if (_publicTrafficInfo != null) {
            vSwitchType = _publicTrafficInfo.getVirtualSwitchType();
        }
        /** FIXME We have no clue which network this nic is on and that means that we can't figure out the BroadcastDomainType
         *  so we assume that it's VLAN for now
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualSwitchType

    private Pair<ManagedObjectReference, String> prepareNetworkFromNicInfo(HostMO hostMo, NicTO nicTo, boolean configureVServiceInNexus, VirtualMachine.Type vmType) throws Exception {

        Ternary<String, String, String> switchDetails = getTargetSwitch(nicTo);
        nicTo.getType();
        VirtualSwitchType switchType = VirtualSwitchType.getType(switchDetails.second());
        String switchName = switchDetails.first();
        String vlanToken = switchDetails.third();

        String namePrefix = getNetworkNamePrefix(nicTo);
        Pair<ManagedObjectReference, String> networkInfo = null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.