Skip to content
Snippets Groups Projects
Commit d975f482 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

RAPI: Add initial support for instance creation request version


The way the resource /2/instances expects its request data (e.g.
instance name, disks, NICs) to be formatted in a dict is not
very extensible. HV and BE parameters are interleaved with all
other values. In commit 495cfdf0 a new parameter “mode” was added
which can be misunderstood as the instance creation mode, but is
actually a mode for the network interface.

Short of bumping the whole RAPI version (currently 2), which would
involve many, many other changes and potentially break clients,
we can not change the request format easily as it needs to stay
backwards and future-compatible as far as possible. This is not an
internal API, but one used by several external applications.

By introducing a data format version per request, we can still
support the old request format, and thereby not break existing users,
while we can add a more flexible request format which will, for
example, support multiple NICs and move HV/BE parameters to separate
containers, avoiding conflicts.

Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 682f7601
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment