]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Add update tests for policies and rules
authorIhar Hrachyshka <ihrachys@redhat.com>
Mon, 27 Jul 2015 12:43:56 +0000 (14:43 +0200)
committerIhar Hrachyshka <ihrachys@redhat.com>
Mon, 27 Jul 2015 19:20:13 +0000 (21:20 +0200)
commite7ef7cace1da95e43401a086f314c3cb89d9fc9d
treeefc30a18c9124539f4987f33580d6a2b6b2a982b
parent12f7abd3982d3580abdb9055c650bdad50900cf4
Add update tests for policies and rules

This patch adds tests for 'update' for both policies and rules. This
completes the CRUD tests and leaves the association/disassociation for
a later patch. Note that deleting a rule isn't tested explicitly
because of a bug with the rule delete logic on the server side. Once
that code is fixed, the test should be added.

to_dict() for policies should also convert any rules inside rule lists
to dicts too, otherwise API layer receives rule object __repr__ strings
instead of actual dicts. This patch introduces a fix to the existing
to_dict() code to properly support policies.

This patch also modifies the base infra to create policies and rules for
admins and not for tenant.

Partially-Implements: blueprint quantum-qos-api
Change-Id: I13870680d7756be9dd020135bc8e91d1c12f728d
Co-Authored-By: Ihar Hrachyshka <ihrachys@redhat.com>
neutron/objects/base.py
neutron/objects/qos/policy.py
neutron/tests/api/base.py
neutron/tests/api/test_qos.py
neutron/tests/tempest/services/network/json/network_client.py
neutron/tests/unit/objects/qos/test_policy.py