Examples of defNetworkBasedDisk()


Examples of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.defNetworkBasedDisk()

                    /*
                            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);
View Full Code Here

Examples of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.defNetworkBasedDisk()

                            + " is not attached before");
                }
            } else {
                diskdef = new DiskDef();
                if (attachingPool.getType() == StoragePoolType.RBD) {
                    diskdef.defNetworkBasedDisk(attachingDisk.getPath(),
                            attachingPool.getSourceHost(), attachingPool.getSourcePort(),
                            attachingPool.getAuthUserName(), attachingPool.getUuid(), devId,
                            DiskDef.diskBus.VIRTIO, diskProtocol.RBD);
                } else if (attachingDisk.getFormat() == PhysicalDiskFormat.QCOW2) {
                    diskdef.defFileBasedDisk(attachingDisk.getPath(), devId,
View Full Code Here

Examples of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.defNetworkBasedDisk()

                    /*
                            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);
View Full Code Here

Examples of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.defNetworkBasedDisk()

                    String poolUuid = getAttrValue("secret", "uuid", disk);
                    String host = getAttrValue("host", "name", disk);
                    int port = Integer.parseInt(getAttrValue("host", "port", disk));
                    String diskLabel = getAttrValue("target", "dev", disk);
                    String bus = getAttrValue("target", "bus", disk);
                    def.defNetworkBasedDisk(diskPath, host, port, authUserName, poolUuid, diskLabel,
                                            DiskDef.diskBus.valueOf(bus.toUpperCase()), DiskDef.diskProtocol.valueOf(protocol.toUpperCase()));
                } else {
                    String diskFmtType = getAttrValue("driver", "type", disk);
                    String diskFile = getAttrValue("source", "file", disk);
                    String diskDev = getAttrValue("source", "dev", disk);
View Full Code Here

Examples of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.defNetworkBasedDisk()

                    throw new InternalErrorException("disk: " + attachingDisk.getPath() + " is not attached before");
                }
            } else {
                diskdef = new DiskDef();
                if (attachingPool.getType() == StoragePoolType.RBD) {
                    diskdef.defNetworkBasedDisk(attachingDisk.getPath(),
                            attachingPool.getSourceHost(), attachingPool.getSourcePort(),
                            attachingPool.getAuthUserName(), attachingPool.getUuid(), devId,
                            DiskDef.diskBus.VIRTIO, diskProtocol.RBD);
                } else if (attachingDisk.getFormat() == PhysicalDiskFormat.QCOW2) {
                    diskdef.defFileBasedDisk(attachingDisk.getPath(), devId,
View Full Code Here

Examples of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.defNetworkBasedDisk()

                    /*
                            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 || physicalDisk.getFormat() == PhysicalDiskFormat.RAW) {
                    disk.defBlockBasedDisk(physicalDisk.getPath(), devId,
                            diskBusType);
View Full Code Here

Examples of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.defNetworkBasedDisk()

                            + " is not attached before");
                }
            } else {
                diskdef = new DiskDef();
                if (attachingPool.getType() == StoragePoolType.RBD) {
                    diskdef.defNetworkBasedDisk(attachingDisk.getPath(),
                            attachingPool.getSourceHost(), attachingPool.getSourcePort(),
                            attachingPool.getAuthUserName(), attachingPool.getUuid(), devId,
                            DiskDef.diskBus.VIRTIO, diskProtocol.RBD);
                } else if (attachingDisk.getFormat() == PhysicalDiskFormat.QCOW2) {
                    diskdef.defFileBasedDisk(attachingDisk.getPath(), devId,
View Full Code Here

Examples of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.defNetworkBasedDisk()

                    /*
                            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);
View Full Code Here

Examples of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.defNetworkBasedDisk()

                    DiskDef.diskFmtType fmt = null;
                    if (diskFmtType != null) {
                        fmt = DiskDef.diskFmtType.valueOf(diskFmtType.toUpperCase());
                    }

                    def.defNetworkBasedDisk(diskPath, host, port, authUserName, poolUuid, diskLabel,
                        DiskDef.diskBus.valueOf(bus.toUpperCase()),
                        DiskDef.diskProtocol.valueOf(protocol.toUpperCase()), fmt);
                    def.setCacheMode(DiskDef.diskCacheMode.valueOf(diskCacheMode.toUpperCase()));
                } else {
                    String diskFmtType = getAttrValue("driver", "type", disk);
View Full Code Here

Examples of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.defNetworkBasedDisk()

                    /*
                            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, DiskDef.diskFmtType.RAW);
                } else if (pool.getType() == StoragePoolType.Gluster) {
                    String mountpoint = pool.getLocalPath();
                    String path = physicalDisk.getPath();
                    String glusterVolume = pool.getSourceDir().replace("/", "");
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.