]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
API v2: mprove validation of post/put, rename few attributes
authorDan Wendlandt <dan@nicira.com>
Wed, 13 Jun 2012 17:41:32 +0000 (10:41 -0700)
committerDan Wendlandt <dan@nicira.com>
Wed, 13 Jun 2012 17:41:36 +0000 (10:41 -0700)
commit44f66c79d225b651335b2c4c416d1d7ce5751527
treed36c3409c9b63e1634faf8b816ed24c39a263a46
parent0230e96196baf4cfd4cb7f556539fe6758367176
API v2: mprove validation of post/put, rename few attributes

bug #1012438

Additional work for bp v2-api-melange-integration

- rename few attributes:
  op_state -> status
  additional_routes -> additional_host_routes
  prefix -> cidr

- expand request body validation to indicate whether fields can be
specified during create and or update.
- add test cases to validate defaults, and input validation.

- update db_base_plugin_v2 to generate gateway_ip for subnet and mac
for port when unspecified.

- validate that tenant-id is only specified in req by admin users

- automatically set tenant-id based on request.context.tenant_id if needed

- enable port tests in test_db_plugin.py

Change-Id: If7f5101e4974a6ef93ff8a1d945f8642dd21b16e
quantum/api/v2/base.py
quantum/api/v2/router.py
quantum/api/v2/views.py
quantum/db/db_base_plugin_v2.py
quantum/db/models_v2.py
quantum/quantum_plugin_base_v2.py
quantum/tests/unit/test_api_v2.py
quantum/tests/unit/test_db_plugin.py
tools/pip-requires