Package net.juniper.contrail.api.types

Examples of net.juniper.contrail.api.types.MacAddressesType


        _manager.getDatabase().getVirtualMachines().add(vmModel);

        VirtualMachineInterface vmi = vmiModel.getVMInterface();
        // allocate mac address
        if (nic.getMacAddress() == null) {
            MacAddressesType macs = vmi.getMacAddresses();
            if (macs == null) {
                s_logger.debug("no mac address is allocated for Nic " + nicVO.getUuid());
            } else {
                s_logger.info("VMI " + _manager.getVifNameByVmUuid(vm.getUuid(), nicVO.getDeviceId()) + " got mac address: " + macs.getMacAddress().get(0));
                nic.setMacAddress(macs.getMacAddress().get(0));
            }
        }

        if (nic.getIp4Address() == null) {
            s_logger.debug("Allocated IP address " + ipModel.getAddress());
View Full Code Here


            // Do not try to update VMI to routing-instance references. These are managed by schema-transformer.
            vmi.clearRoutingInstance();
        }
        _vmi = vmi;
        if (_macAddress != null) {
            MacAddressesType mac = new MacAddressesType();
            mac.addMacAddress(_macAddress);
            vmi.setMacAddresses(mac);
        }

        if (_serviceTag != null) {
            vmi.setProperties(new VirtualMachineInterfacePropertiesType(_serviceTag, null));
View Full Code Here

        _manager.getDatabase().getVirtualMachines().add(vmModel);  

        VirtualMachineInterface vmi = vmiModel.getVMInterface();
        // allocate mac address
        if (nic.getMacAddress() == null) {
            MacAddressesType macs = vmi.getMacAddresses();
            if (macs == null) {
                s_logger.debug("no mac address is allocated for Nic " + nicVO.getUuid());
            } else {
                s_logger.info("VMI " + _manager.getVifNameByVmUuid(vm.getUuid(), nicVO.getDeviceId()) + " got mac address: " +
                        macs.getMacAddress().get(0));
                nic.setMacAddress(macs.getMacAddress().get(0));
            }
        }

        if (nic.getIp4Address() == null) {
            s_logger.debug("Allocated IP address " + ipModel.getAddress());
View Full Code Here

            // Do not try to update VMI to routing-instance references. These are managed by schema-transformer.
            vmi.clearRoutingInstance();
        }
        _vmi = vmi;
        if (_macAddress != null) {
            MacAddressesType mac = new MacAddressesType();
            mac.addMacAddress(_macAddress);
            vmi.setMacAddresses(mac);
        }
       
        if (_serviceTag != null) {
            vmi.setProperties(new VirtualMachineInterfacePropertiesType(_serviceTag, null));
View Full Code Here

        vmInterface.setUuid(vmiUuid);
        vmInterface.setParent(vCenterProject);
        vmInterface.setName(vmiUuid);
        vmInterface.setVirtualNetwork(network);
        vmInterface.addVirtualMachine(vm);
        MacAddressesType macAddrType = new MacAddressesType();
        macAddrType.addMacAddress(macAddress);
        vmInterface.setMacAddresses(macAddrType);
        apiConnector.create(vmInterface);
        String vmInterfaceUuid = apiConnector.findByName(
                VirtualMachineInterface.class, vm, vmInterface.getName());
        s_logger.info("Create virtual machine interface:" + vmInterfaceName +
View Full Code Here

            char[] charArray = addr.toCharArray();
            charArray[2] = charArray[5] = charArray[5] = ':';
            charArray[8] = charArray[11] = charArray[14] = ':';
            addr = new String(charArray);

            MacAddressesType macs = new MacAddressesType();
            macs.addMacAddress(addr);
            s_logger.debug("Assigned auto property mac address : " + addr);
            ((VirtualMachineInterface)obj).setMacAddresses(macs);
        } else if (obj.getClass() == InstanceIp.class) {
            if (((InstanceIp)obj).getAddress() != null) {
               return;
View Full Code Here

TOP

Related Classes of net.juniper.contrail.api.types.MacAddressesType

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.