Examples of CreateAnswer


Examples of com.cloud.agent.api.storage.CreateAnswer

                    VolumeTO vol = new VolumeTO(cmd.getVolumeId(),
                            diskchar.getType(),
                            pool.getType(), pool.getUuid(), cmd.getDiskCharacteristics().getName(),
                            pool.getPath(), cmd.getDiskCharacteristics().getName(), cmd.getDiskCharacteristics().getSize(),
                            null);
                    return new CreateAnswer(cmd, vol);
                } else {
                    VolumeTO vol = new VolumeTO(cmd.getVolumeId(),
                            diskchar.getType(),
                            pool.getType(), pool.getUuid(), cmd.getDiskCharacteristics().getName(),
                            pool.getPath(), cmd.getDiskCharacteristics().getName(), cmd.getDiskCharacteristics().getSize(), null);
                    return new CreateAnswer(cmd, vol);
                }

            } else {
                //create data volume
                String volumeUuid = "cloud.worker." + UUID.randomUUID().toString();
                VolumeTO vol = new VolumeTO(cmd.getVolumeId(),
                        diskchar.getType(),
                        pool.getType(), pool.getUuid(), cmd.getDiskCharacteristics().getName(),
                        pool.getPath(), volumeUuid, cmd.getDiskCharacteristics().getSize(), null);
                return new CreateAnswer(cmd, vol);
            }
        } catch (Exception ex) {
            return 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.