Package com.google.api.services.compute.model

Examples of com.google.api.services.compute.model.Disk


            final int indexVolume = i;
            Future<Resource> submit = resourceBuilderExecutor.submit(new Callable<Resource>() {
                @Override
                public Resource call() throws Exception {
                    String value = name + "-" + indexVolume;
                    Disk disk = new Disk();
                    disk.setSizeGb(gccTemplate.getVolumeSize().longValue());
                    disk.setName(value);
                    disk.setKind(((GccTemplate) stack.getTemplate()).getGccRawDiskType().getUrl(po.getProjectId(), gccTemplate.getGccZone()));
                    Compute.Disks.Insert insDisk = po.getCompute().disks().insert(po.getProjectId(), gccTemplate.getGccZone().getValue(), disk);
                    insDisk.execute();
                    GccDiskReadyPollerObject gccDiskReady = new GccDiskReadyPollerObject(po.getCompute(), stack, value);
                    gccDiskReadyPollerObjectPollingService.pollWithTimeout(gccDiskCheckerStatus, gccDiskReady, POLLING_INTERVAL, MAX_POLLING_ATTEMPTS);
                    return new Resource(resourceType(), value, stack);
View Full Code Here


    @Override
    public List<Resource> create(GccProvisionContextObject po, int index, List<Resource> resources) throws Exception {
        Stack stack = stackRepository.findById(po.getStackId());
        GccTemplate template = (GccTemplate) stack.getTemplate();
        String name = String.format("%s-%s", stack.getName(), index);
        Disk disk = new Disk();
        disk.setSizeGb(SIZE);
        disk.setName(name);
        disk.setKind(((GccTemplate) stack.getTemplate()).getGccRawDiskType().getUrl(po.getProjectId(), template.getGccZone()));
        Compute.Disks.Insert insDisk = po.getCompute().disks().insert(po.getProjectId(), template.getGccZone().getValue(), disk);
        insDisk.setSourceImage(GccImageType.DEBIAN_HACK.getAmbariUbuntu(po.getProjectId()));
        insDisk.execute();
        GccDiskReadyPollerObject gccDiskReady = new GccDiskReadyPollerObject(po.getCompute(), stack, name);
        gccDiskReadyPollerObjectPollingService.pollWithTimeout(gccDiskCheckerStatus, gccDiskReady, POLLING_INTERVAL, MAX_POLLING_ATTEMPTS);
View Full Code Here

TOP

Related Classes of com.google.api.services.compute.model.Disk

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.