-
Notifications
You must be signed in to change notification settings - Fork 98
Description
Exception occurs if image size in bytes larger that int32 max value
Exception:
Newtonsoft.Json.JsonReaderException: JSON integer 8589934592 is too large or small for an Int32. Path 'images[0].OS-EXT-IMG-SIZE:size', line 1, position 571.
at Newtonsoft.Json.JsonTextReader.ParseNumber(ReadType readType)
Json response:
{"images": [{"status": "ACTIVE", "updated": "2016-06-08T15:28:20Z", "links": [{"href": "", "rel": "self"}, {"href": "", "rel": "bookmark"}, {"href": "", "type": "application/vnd.openstack.image", "rel": "alternate"}], "id": "1ecde54f-fcb7-4588-b728-e58a52bca93a", "OS-EXT-IMG-SIZE:size": 8589934592, "name": "COS", "created": "2016-06-08T15:27:44Z", "minDisk": 10, "progress": 100, "minRam": 256, "metadata": {"architecture": "x86_64"}}, {"status": "ACTIVE", "updated": "2016-06-08T12:20:11Z", "links": [{"href": "", "rel": "self"}, {"href": "", "rel": "bookmark"}, {"href": "", "type": "application/vnd.openstack.image", "rel": "alternate"}], "id": "0d8d7092-004c-4650-aab7-f39057df174e", "OS-EXT-IMG-SIZE:size": 283979999, "name": "CentOS-6-x86_64-GenericCloud-20141129_01", "created": "2016-06-08T08:13:52Z", "minDisk": 20, "progress": 100, "minRam": 1024, "metadata": {"murano_image_info": "{"type": "linux", "title": "CentOS"}", "description": null}}]}
code that throw exception
try{
var res = cs.ListImagesAsync();
res.Wait(10000);
foreach (Image i in res.Result){
Console.WriteLine(i.Name,": ",i.Id);
}
}catch(Exception e1){
Console.WriteLine(e1.InnerException);
}