I stumble on an issue when creating a resource that didn't had a
parent_type. Looking at the code it seems that if the resource does not
have a parent_type the call to db_conn.dbe_alloc in stateful_create  will 
always fail and return None. Then undo_create is called with None and 
just break with a nice 500.

Shouldn't the http_resource_create validate first that parent_type
exists before trying to allocate the resource ? And return a
comprehensive error of why it failed.

Also in the case of parent_type is 'config-root' the parent_type will be
removed from the obj_dict and so I expect the call to fail as well.

Jean-Philippe

_______________________________________________
Dev mailing list
[email protected]
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org

Reply via email to