Skip to content

Commit

Permalink
fix(provider/openstack): fix several issues in glance v2 support (#2787)
Browse files Browse the repository at this point in the history
* location value can be empty
* convert image properties to Map<String, String>
  • Loading branch information
posox authored and lwander committed Jul 26, 2018
1 parent 6c38ffc commit dae28e6
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -26,14 +26,16 @@ class OpenstackImageV2Provider implements OpenstackImageProvider, OpenstackReque
}

static OpenstackImage buildImage(Image image, String region) {
def properties = new HashMap()
image.properties.each { properties[it.key] = it.value.toString() }
OpenstackImage.builder()
.id(image.id)
.status(image.status?.value())
.size(image.size)
.location(image.locations.get(0)?.toString())
.location(image.locations?.get(0)?.toString())
.createdAt(image.createdAt?.time)
.updatedAt(image.updatedAt?.time)
.properties(image.properties)
.properties(properties)
.name(image.name)
.region(region)
.build()
Expand Down

0 comments on commit dae28e6

Please sign in to comment.