Rebuild command needs to exclude name from request
sigmavirus24 opened this issue · comments
I'm using the HEAD of master (presently 7e0867c) and trying to run
$ rack servers instance rebuild --id <server-id> --admin-pass t3stpa55word --image-id 09de0a66-3156-48b4-90a5-1cf25a905207 --log debug
But the client is receiving a 400. I noticed in the debug output that the request body looks like:
{
"rebuild": {
"adminPass": "t3stpa55word",
"imageRef": "09de0a66-3156-48b4-90a5-1cf25a905207",
"name": ""
}
}
Which I suspect is why the compute API is returning a 400 Bad Request
If I provide --name <name-of-server>
instead of --id <server-id>
then the request succeeds.
$ rack version
rack version 1.1.0-beta1-15-g7e0867c
commit: 7e0867ce8ed27549bf4ccf22822a277540fa4886
I suspect the fix needs to be somewhere around here but I'm not familiar enough with the library/language conventions to make the patch myself.
Ah, thank you. Yes, I see name
is added to the request body even when it isn't provided. Try the HEAD
of master
now. I've just pushed [what I think is] a fix.
I'll pull and test this out. Thanks @jrperritt
Confirmed it works. 👍