]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
objects.base: fixed object.delete()
authorIhar Hrachyshka <ihrachys@redhat.com>
Thu, 9 Jul 2015 12:12:56 +0000 (14:12 +0200)
committerIhar Hrachyshka <ihrachys@redhat.com>
Fri, 10 Jul 2015 18:01:52 +0000 (18:01 +0000)
commit954e9de8b3b697b39e087f2d03b49f0856c44c32
treeca4f645698d11f55e6dbfd2668d906ae055513c6
parent31e09028e3b3c85954a9aebf32c412bd897afdbb
objects.base: fixed object.delete()

It was using wrong call to delete an object from a session.

Also, expanded test_create() test to check all basic operations:
get_by_id, create, update, and delete.

To facilitate update() check, introduced a new field for objects called
fields_to_update that stores names of fields that are not expected to be
updated in an object. This allows us to keep the above mentioned test
untangled from specific object type.

Also made get_by_id() behave correctly (returning None) if the object
does not exist.

Change-Id: I1aecb2e7c4d8cb8f239072d1cb9df3db29dcedde
neutron/db/api.py
neutron/objects/base.py
neutron/objects/qos/policy.py
neutron/objects/qos/rule.py
neutron/tests/unit/objects/test_base.py