[openstack-dev] [nova] API priorities in Newton
Ken'ichi Ohmichi
ken1ohmichi at gmail.com
Thu Mar 31 16:35:22 UTC 2016
2016-03-30 12:26 GMT-07:00 Sean Dague <sean at dague.net>:
>
> One other issue that we've been blocking on for a while has been
> Capabilities discovery. Some API proposed adds like live resize have
> been conceptually blocked behind this one. Once upon a time there was a
> theory that JSON Home was a thing, and would slice our bread and julien
> our fries, and solve all this. But it's a big thing to get right, and
> JSON Home has an unclear future. And, we could server our users pretty
> well with a much simpler take on capabilities. For instance
>
> GET /servers/{id}/capabilities
>
> {
> "capabilities" : {
> "resize": True,
> "live-resize": True,
> "live-migrate": False
> ...
> }
> }
Yeah, JSOM-Home is not an option for this kind of capabilities discovery.
Swagger is that instead. Clients can know available capabilities by
getting swagger definition via REST API.
Ex:
GET /swaggers
{
...
"/action": {
"parameters": [
{"name": "resize", "in": "body", ...},
{"name": "os-start", "in": "body", ...},
{"name": "os-stop", "in": "body", ...},
...
}
}
}
Thanks
More information about the OpenStack-dev
mailing list