Projects >> CloudStack-archive >>b61468d65c4231b6629e9b4f271912f328c7567d

Chunk
Conflicting content
                int devId = (int) volume.getDeviceId();

                if (pool.getType() == StoragePoolType.RBD) {
<<<<<<< HEAD
                    /*
                            For RBD pools we use the secret mechanism in libvirt.
                            We store the secret under the UUID of the pool, that's why
                            we pass the pool's UUID as the authSecret
                    */
                    disk.defNetworkBasedDisk(physicalDisk.getPath().replace("rbd:", ""), pool.getSourceHost(), pool.getSourcePort(),
                                             pool.getAuthUserName(), pool.getUuid(),
                                             devId, diskBusType, diskProtocol.RBD);
                } else if (volume.getType() == Volume.Type.DATADISK) {
                    disk.defFileBasedDisk(physicalDisk.getPath(), devId, DiskDef.diskBus.VIRTIO, DiskDef.diskFmtType.QCOW2);
                } else {
                    disk.defFileBasedDisk(physicalDisk.getPath(), devId, diskBusType, DiskDef.diskFmtType.QCOW2);
=======
                                        /*
                                                For RBD pools we use the secret mechanism in libvirt.
                                                We store the secret under the UUID of the pool, that's why
                                                we pass the pool's UUID as the authSecret
                                        */
                                        disk.defNetworkBasedDisk(physicalDisk.getPath().replace("rbd:", ""), pool.getSourceHost(), pool.getSourcePort(),
                                                                 pool.getAuthUserName(), pool.getUuid(),
                                                                 devId, diskBusType, diskProtocol.RBD);
                } else if (pool.getType() == StoragePoolType.CLVM) {
                    disk.defBlockBasedDisk(physicalDisk.getPath(), devId,
                    diskBusType);
                } else {
                    if (volume.getType() == Volume.Type.DATADISK) {
                         disk.defFileBasedDisk(physicalDisk.getPath(), devId,
                         DiskDef.diskBus.VIRTIO,
                         DiskDef.diskFmtType.QCOW2);
                    } else {
                         disk.defFileBasedDisk(physicalDisk.getPath(), devId,
                         diskBusType, DiskDef.diskFmtType.QCOW2);
                    }

>>>>>>> 6e33102df7b566fd33bdb8a4665a335f9a846955
                }

            }
Solution content
                int devId = (int) volume.getDeviceId();

                if (pool.getType() == StoragePoolType.RBD) {
                    /*
                            For RBD pools we use the secret mechanism in libvirt.
                            We store the secret under the UUID of the pool, that's why
                            we pass the pool's UUID as the authSecret
                    */
                    disk.defNetworkBasedDisk(physicalDisk.getPath().replace("rbd:", ""), pool.getSourceHost(), pool.getSourcePort(),
                                             pool.getAuthUserName(), pool.getUuid(),
                                             devId, diskBusType, diskProtocol.RBD);
                } else if (pool.getType() == StoragePoolType.CLVM) {
                    disk.defBlockBasedDisk(physicalDisk.getPath(), devId,
                    diskBusType);
                } else {
                    if (volume.getType() == Volume.Type.DATADISK) {
                         disk.defFileBasedDisk(physicalDisk.getPath(), devId,
                         DiskDef.diskBus.VIRTIO,
                         DiskDef.diskFmtType.QCOW2);
                } else {
                    disk.defFileBasedDisk(physicalDisk.getPath(), devId, diskBusType, DiskDef.diskFmtType.QCOW2);
                }

            }
File
LibvirtComputingResource.java
Developer's decision
Combination
Kind of conflict
Comment
If statement
Method invocation
Chunk
Conflicting content
        patchSystemVm(bootArgs, datadiskPath, vmName);
    }

<<<<<<< HEAD
    private String createVlanBr(String vlanId, String nic)
            throws InternalErrorException {
        String brName = setVnetBrName(vlanId);
        createVnet(vlanId, nic);
        return brName;
    }

    private InterfaceDef createVif(NicTO nic, InterfaceDef.nicModel model) throws InternalErrorException, LibvirtException {
        InterfaceDef intf = new InterfaceDef();

        String vlanId = null;
        if (nic.getBroadcastType() == BroadcastDomainType.Vlan) {
            URI broadcastUri = nic.getBroadcastUri();
            vlanId = broadcastUri.getHost();
        }

        if (nic.getType() == TrafficType.Guest) {
            if (nic.getBroadcastType() == BroadcastDomainType.Vlan
                    && !vlanId.equalsIgnoreCase("untagged")) {
                String brName = createVlanBr(vlanId, _pifs.first());
                intf.defBridgeNet(brName, null, nic.getMac(), model);
            } else {
                intf.defBridgeNet(_guestBridgeName, null, nic.getMac(), model);
            }
        } else if (nic.getType() == TrafficType.Control) {
            /* Make sure the network is still there */
            createControlNetwork();
            intf.defBridgeNet(_linkLocalBridgeName, null, nic.getMac(), model);
        } else if (nic.getType() == TrafficType.Public) {
            if (nic.getBroadcastType() == BroadcastDomainType.Vlan
                    && !vlanId.equalsIgnoreCase("untagged")) {
                String brName = createVlanBr(vlanId, _pifs.second());
                intf.defBridgeNet(brName, null, nic.getMac(), model);
            } else {
                intf.defBridgeNet(_publicBridgeName, null, nic.getMac(), model);
            }
        } else if (nic.getType() == TrafficType.Management) {
            intf.defBridgeNet(_privBridgeName, null, nic.getMac(), model);
        } else if (nic.getType() == TrafficType.Storage) {
            String storageBrName = nic.getName() == null ? _privBridgeName
                    : nic.getName();
            intf.defBridgeNet(storageBrName, null, nic.getMac(), model);
        }

        return intf;
    }

=======
>>>>>>> 6e33102df7b566fd33bdb8a4665a335f9a846955
    private void createVif(LibvirtVMDef vm, NicTO nic)
            throws InternalErrorException, LibvirtException {
        vm.getDevices().addDevice(
Solution content
        patchSystemVm(bootArgs, datadiskPath, vmName);
    }

    private void createVif(LibvirtVMDef vm, NicTO nic)
            throws InternalErrorException, LibvirtException {
        vm.getDevices().addDevice(
File
LibvirtComputingResource.java
Developer's decision
Version 2
Kind of conflict
Method declaration