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

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


  }

  private Iterable<Image> listImages(String projectId) throws OpsException {
    List<Image> ret = Lists.newArrayList();

    ImageList imageList;
    try {
      log.debug("Listing images in project " + projectId);
      imageList = compute.images().list(projectId).execute();
    } catch (IOException e) {
      throw new OpsException("Error listing images", e);
    }
    if (imageList.getItems() != null) {
      ret.addAll(imageList.getItems());
    }

    return ret;
  }
View Full Code Here


        try {
            Storage storage = gccStackUtil.buildStorage((GccCredential) stack.getCredential(), stack);
            Compute compute = gccStackUtil.buildCompute((GccCredential) stack.getCredential(), stack.getName());
            GccTemplate template = (GccTemplate) stack.getTemplate();
            GccCredential credential = (GccCredential) stack.getCredential();
            ImageList list = compute.images().list(credential.getProjectId()).execute();
            Long time = new Date().getTime();
            if (!containsSpecificImage(list)) {
                try {
                    Bucket bucket = new Bucket();
                    bucket.setName(credential.getProjectId() + time);
View Full Code Here

TOP

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

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.