Boot from volume#259
Conversation
|
hmm... I've looked at that JSON 10 times and don't see anything different between them. @smashwilson or @jamiehannaford : Any ideas as to why the |
|
I think it's happening because of a type mismatch. The first value is a deserialised JSON string that comes out of []interface {}{map[string]interface {}{"boot_index":"0", "delete_on_termination":"false", "destination_type":"volume", "source_type":"image", "uuid":"123456", "volume_size":"10"}}whereas the second value is different because []map[string]interface {}{map[string]interface {}{"destination_type":"volume", "source_type":"image", "boot_index":"0", "delete_on_termination":"false", "volume_size":"10", "uuid":"123456"}}If you can think of a way of casting one so that it's consistent with the other, it should be fine |
|
👍 what @jamiehannaford said. I consider that a bug in |
|
Good catch @jamiehannaford 👍 on making |
|
ok @smashwilson , I think this one's ready for review. |
There was a problem hiding this comment.
Hah. I just did this in my branch, too.
There was a problem hiding this comment.
Er, this is going to overwrite the res map that the key name was added to up above ☝️. You'll need to move this above the serverMap := res["server"].(map[string]interface{}) bit on line 82, in place of the drive.ToServerCreateMap() call - manual map manipulation has to come last.
There was a problem hiding this comment.
I'll get it one of these times. The question is will you still have any patience when that time comes.
There was a problem hiding this comment.
It was this time 😁 Looks good to me!
PR corresponding to #258