newImage.setContainerFormat("bare");
newImage.setName("os-java-glance-test");
newImage = glance.images().create(newImage).execute();
// Uploading image
ImageUpload uploadImage = new ImageUpload(newImage);
uploadImage.setInputStream(new ByteArrayInputStream(IMAGE_CONTENT.getBytes()));
glance.images().upload(newImage.getId(), uploadImage).execute();
// Downloading the image and displaying the image content
try {
byte[] imgContent = new byte[IMAGE_CONTENT.length()];