[openstack-dev] [nova] Create an instance with a custom uuid
Jay Pipes
jaypipes at gmail.com
Tue Sep 30 19:15:37 UTC 2014
On 09/30/2014 06:53 AM, Pasquale Porreca wrote:
> Going back to my original question, I would like to know:
>
> 1) Is it acceptable to have the UUID passed from client side?
FWIW, Glance has supported supplying the newly-created image's ID in its
API for a long time, and it's never been an issue. On the database side,
you still need to do a primary key lookup to ensure you aren't violating
any constraints, regardless of whether you are doing:
obj.id = uuid.uuid4()
on the controller side or whether you are doing:
req_payload = {
"id": uuid.uuid4(),
"name": "blah"
}
client.do_post(jsonutils.dumps(req_payload)..)
on the client side.
I don't really see much of an issue with allowing a user to pass an
opaque identifier for objects on creation.
-jay
More information about the OpenStack-dev
mailing list