[openstack-dev] class extending tables.DeleteAction not having delete method called

Julie Pichon jpichon at redhat.com
Thu Jun 13 15:10:48 UTC 2013


Hi Kevin,

"Kevin Benton" <blak111 at gmail.com> wrote:
> I'm having some trouble with the tables.DeleteAction class when I'm trying
> to add another set of items to a router's detail page.
> 
> I found someone emailed the list previously with the exact same problem,
> but he never followed up with code or posted a solution. That thread can be
> seen here: https://lists.launchpad.net/openstack/msg18537.html
> 
> Basically, I have the items added to a routers detail page in a separate
> table. Elements show up just fine, and I can even add more of them without
> issues.
> 
> The only problem is with deleting. The links are generated okay, but when
> the request is submitted to the server, it never seems to make it to the
> "delete" method in the class I have defined so nothing happens. No
> exceptions, no log entries, etc.
> 
> To demonstrate this in a simple setup, I setup the following branch off of
> grizzly/stable that displays this behavior with minimal code changes.
> You should be able to check it out, create a router, then click on a router
> to get the router details page to see two candy bars listed. If you try to
> delete one, you will just get the same page back with no change. The delete
> method is just configured to log a message right now, but you can change it
> to whatever you want because it never gets called.
> 
> https://github.com/blak111/horizon/commit/2a96987a95a9727cd834c7dd31a65e6d8c1efb09

Thank you for the code sample, that really helps.

It looks like the id in your get_candybars_data() list needs to be a string for the delete action to work. It's not well (at all?) documented though, so I think it would be fair to submit a bug to update the documentation about this.

Regards,

Julie

> Any pointers on how to get the delete request to properly call that method
> would be great.
> 
> Thanks
> 
> --
> Kevin Benton



More information about the OpenStack-dev mailing list