[openstack-dev] [Horizon] Handling of 202 response code
Saravanan KR
skramaja at redhat.com
Wed Nov 4 08:25:30 UTC 2015
Hello,
How are the HTTP status code 202 response (from nova) is handled in
Horizon to know the asynchronous operation is completed?
Background:
I am working on Bug #1506429 [1] where invoking 'Detach Interface'
initiates the detaching and refreshes the page. But the interface which
is detached, is not removed from the 'IP Address' list in the instance
panel view. It is removed if you do a manual page refresh (in browser).
Why:
In Horizon, 'Detach Interface' Action triggers the Nova API [2] which
returns status code as 202 (Request Accepted and processing
asynchronously). Without checking for the asynchronous result, the
request has been responded in horizon as 'Detached' and refreshes the
page. Since the interface detach is in progress and not completed, it is
again listed.
There may be multiple solutions:
1) Waiting for the synchronous and then respond
2) Do not trigger page refresh and respond with Operation in progress
3) If there is a mechanism to know delete in progress, do not list the
interface
To decide on the solution, it is important to know how 202 responses
should be handled. Can anyone can help with understanding?
Regards,
Saravanan KR
[1] https://bugs.launchpad.net/horizon/+bug/1506429
[2]
http://developer.openstack.org/api-ref-compute-v2.1.html#deleteAttachedInterface
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20151104/ff05b9b4/attachment.html>
More information about the OpenStack-dev
mailing list