Currently when making a request to POST /1.0/instances and setting source.type=copy and source.source to the source instance snapshot within the payload, the resulting InstanceCreate operation will allocate the snapshot to resources.instances and resources.containers within the operation response body (see below example).
I believe this behaviour is caused by this line and introduced in this commit.
IMO this is a bit confusing and the operation can be improved and made more clear if the snapshot is added to the resources.instances_snapshots field instead (similar to how it's done here). We would just need to determine if the source is a snapshot first.
Issue description
Currently when making a request to
POST /1.0/instances
and settingsource.type=copy
andsource.source
to the source instance snapshot within the payload, the resultingInstanceCreate
operation will allocate the snapshot toresources.instances
andresources.containers
within the operation response body (see below example).I believe this behaviour is caused by this line and introduced in this commit.
IMO this is a bit confusing and the operation can be improved and made more clear if the snapshot is added to the
resources.instances_snapshots
field instead (similar to how it's done here). We would just need to determine if the source is a snapshot first.