<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi, guys,<br>
<br>
When I port hypervisor extension into Nova API v3, I found some
actions doesn't follow REST principles.<br>
But I still have some doubt. So I send mail to here, hope I can get
some suggestion.<br>
<br>
Let me explain why I want to change those API.<br>
<br>
For search action: <a class="moz-txt-link-freetext" href="https://review.openstack.org/#/c/33774/">https://review.openstack.org/#/c/33774/</a><br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
The original search action works as:<br>
'/os-hypervisors/[filters]/search'<br>
It use part of URL as filters. So I change it as:<br>
'/os-hypervisors/search?query=[filters]'<br>
(I follow suggestion from
<a class="moz-txt-link-freetext" href="http://www.slideshare.net/apigee/restful-api-design-second-edition#btnNext">http://www.slideshare.net/apigee/restful-api-design-second-edition#btnNext</a>
at 77 pages)<br>
<br>
For servers action: <a class="moz-txt-link-freetext" href="https://review.openstack.org/#/c/33775/">https://review.openstack.org/#/c/33775/</a><br>
The original servers action works as:<br>
'/os-hypervisors/[filters]/servers'<br>
It use part of URL as filters too.<br>
So I change it as:<br>
'/os-hypervisors/[hypervisor id]/servers'<br>
And it will return all the servers that run on the specific
hypervisor.<br>
<br>
If we want to finish the same task as the old servers action we can
do as:<br>
hypervisors = GET /os-hypervisors/search?query=[filters]<br>
for hyper in hypervisors<br>
servers += GET /os-hypervisors/[hyper.id]/servers<br>
<br>
Welcome any comment!<br>
<br>
Thanks,<br>
Alex<br>
</body>
</html>