> + server.enqueue(addCommonHeaders(new
> MockResponse().setBody(stringFromResource("/access.json"))));
> + server.enqueue(addCommonHeaders(new
> MockResponse().setBody(stringFromResource("/image_list_with_block_device_mapping_object.json"))));
> +
> + try {
> + NovaApi novaApi = api(server.getUrl("/").toString(),
> "openstack-nova");
> + ImageApi imageApi = novaApi.getImageApiForZone("RegionOne");
> +
> + FluentIterable<? extends Image> images =
> imageApi.listInDetail().concat();
> +
> + Image img = images.get(0);
> + assertNotNull(img.getMetadata());
> + assertEquals(10, img.getMetadata().size());
> + assertNull(img.getMetadata().get("block_device_mapping"));
> + assertEquals(11, img.getComplexMetadata().size());
> + assertNotNull(img.getComplexMetadata().get("block_device_mapping"));
> + assertTrue(img.getComplexMetadata().get("block_device_mapping")
> instanceof Map);
Good call, I'll add that.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/626/files#r22011616