Image API v2: make volume_type optional
It is perfectly valid for a Cinder volume to have a volume_type of "none", so don't make the Image API v2 require that one be set. Change-Id: I1a6da8d791fa0ae67cac46eec81bcbcb420729c3 Closes-Bug: #1559344
This commit is contained in:
		@@ -325,7 +325,10 @@ class CreateImage(command.ShowOne):
 | 
			
		||||
                parsed_args.disk_format,
 | 
			
		||||
            )
 | 
			
		||||
            info = body['os-volume_upload_image']
 | 
			
		||||
            info['volume_type'] = info['volume_type']['name']
 | 
			
		||||
            try:
 | 
			
		||||
                info['volume_type'] = info['volume_type']['name']
 | 
			
		||||
            except TypeError:
 | 
			
		||||
                info['volume_type'] = None
 | 
			
		||||
        else:
 | 
			
		||||
            image = image_client.images.create(**kwargs)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user