<div dir="ltr">Interesting idea, and in general I'm for consistency. I can't speak directly to the network/port question, though it seems to me that if ports must be attached to networks then it makes sense for the URL to reflect that.<div><br></div><div>On the other hand, some could argue that the django URL routing is ... legacy ... and shouldn't me messed with :)</div><div><br></div><div>On the gripping hand, thinking about this could inform future angular routing planning...</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 2 September 2015 at 00:39, Rob Cresswell (rcresswe) <span dir="ltr"><<a href="mailto:rcresswe@cisco.com" target="_blank">rcresswe@cisco.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>Hi all,</div>
<div><br>
</div>
<div>I recently started looking into properly implementing breadcrumbs to make navigation clearer, especially around nested resources (Subnets Detail page, for example). The idea is to use the request.path to form a logical breadcrumb that isn’t dependent on
browser history ( <a href="https://review.openstack.org/#/c/129985/3/horizon/browsers/breadcrumb.py" target="_blank">https://review.openstack.org/#/c/129985/3/horizon/browsers/breadcrumb.py</a> ). Unfortunately, this breaks down quite quickly because we use odd patterns like
`<resources>/<resource_id>/detail`, and `<resources>/<resource_id>` doesn’t exist.</div>
<div><br>
</div>
<div>This made me realise how much of an inconsistent mess the URL patterns are. I’ve started cleaning them up, so we move from these patterns:</div>
<div><br>
</div>
<div>`/admin/networks/<network_id>/detail` - Detail page for a Network</div>
<div>`/admin/networks/<network_id>/addsubnet` - Create page for a Subnet</div>
<div><br>
</div>
<div>To patterns in line with usual CRUD usages, such as:</div>
<div><br>
</div>
<div>`/admin/networks/<network_id>` - Detail page for a Network</div>
<div>`/admin/networks/<network_id>/subnets/create` - Create page for a Subnet</div>
<div><br>
</div>
<div>This is mostly trivial, just removing extraneous words and adding consistency, with end goal being every panel following patterns like:</div>
<div><br>
</div>
<div>`/<resources>` - Index page</div>
<div>`/<resources>/<resource_id>` - Detail page for a single resource</div>
<div>`/<resources>/create` - Create new resource</div>
<div>`/<resources>/<resource_id>/update` - Update a resource </div>
<div><br>
</div>
<div>This gets a little complex around nested items. Should a Port for example, which has a unique ID, be reachable in Horizon by just its ID? Ports must always be attached to a network as I understand it. There are multiple ways to express this:</div>
<div><br>
</div>
<div>`/networks/ports/<port_id>` - Current implementation</div>
<div>`/networks/<network_id>/ports/<port_id>` - My preferred structure</div>
<div>`/ports/<port_id>` - Another option</div>
<div><br>
</div>
<div>Does anyone have any opinions on how to handle this structuring, or if it’s even necessary?</div>
<div><br>
</div>
<div>Regards,</div>
<div>Rob</div>
</div>
<br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>