Package org.openstack.client.common

Examples of org.openstack.client.common.OpenstackImageClient.root()


    String tokenId;

    try {
      Access access = client.getSession().getAuthenticationToken();
      tokenId = access.getToken().getId();
      glanceBaseUrl = client.root().getBaseUrl();
    } catch (OpenstackException e) {
      throw new OpsException("Error getting glance url", e);
    }

    // Upload to glance
View Full Code Here


    try {
      Map<String, Object> tagMap = Maps.newHashMap();
      for (Tag tag : tags.getTags()) {
        tagMap.put(tag.getKey(), tag.getValue());
      }
      glanceClient.root().images().image(imageId).updateMetadata(tagMap, replace);
    } catch (OpenstackException e) {
      throw new OpsException("Error updating image tags", e);
    }
  }
View Full Code Here

    OpenstackImageClient glanceClient = getOpenstackImageClient();

    Iterable<Image> images;
    try {
      images = glanceClient.root().images().list(true);
    } catch (OpenstackException e) {
      throw new OpsException("Error listing images", e);
    }

    for (Image image : images) {
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.