Juan Hernandez has posted comments on this change.

Change subject: aaa: Introducing format to id of User and Group API entities
......................................................................


Patch Set 3:

Lets assume this:

  internal_id=4d42ec8d-7eca-47da-9a54-9f48fc896072
  provider_id=example.com:4d42ec8d-7eca-47da-9a54-9f48fc896072

Before this change the URIs of the user will be:

  /users/4d42ec8d-7eca-47da-9a54-9f48fc896072
  
/domains/f8e3d9f3-e177-465e-913b-6076e8cee885/users/f8e3d9f3-e177-465e-913b-6076e8cee885

Note that the id is the same in both cases, and there is only one valid URI 
under /users.

After this change they will be:

  
/users/id%3D4d42ec8d-7eca-47da-9a54-9f48fc896072%3Aprovider_id%3Dexample.com%3A4d42ec8d-7eca-47da-9a54-9f48fc896072
  /users/provider_id%3Dexample.com%3A4d42ec8d-7eca-47da-9a54-9f48fc896072
  
/domains/f8e3d9f3-e177-465e-913b-6076e8cee885/users/provider_id%3Dexample.com%3A4d42ec8d-7eca-47da-9a54-9f48fc896072

Note that there are two valid URIs under /users. The first one, with the 
internal id is redundant and unnecessary.

In addition, the URL encoding makes the resource URI unfamiliar, without any 
benefit. Hex encoding is more similar to what we use in other resources, and 
several times faster.

Remove the internal id and the "provider_id=" prefix from the identifier and 
use hex encoding instead of URL encoding.

-- 
To view, visit http://gerrit.ovirt.org/26191
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iaecb5d43945769db82475edde1c7075c1a343c07
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to