Commit Graph

10 Commits

Author SHA1 Message Date
Stephen Finucane 6fe31d9754 nova-net: Remove 'networks' quota
With the impending removal of nova-network, there's nothing that should
be using this. Remove it.

Change-Id: I352b71b5976d008c2b8fab8a6d6939c0e0b305be
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-11-22 16:49:31 +00:00
Ghanshyam Mann b26bc7fd7a Multiple API cleanup changes
This microversion implements below API cleanups:

1. 400 for unknown param for query param and for request body.

2. Making server representation always consistent among all APIs
   returning the complete server representation.

3. Change the default return value of ``swap`` field from the empty string
   to 0 (integer) in flavor APIs.

4. Return ``servers`` field always in the response of GET
   hypervisors API even there are no servers on hypervisor

Details: https://specs.openstack.org/openstack/nova-specs/specs/train/approved/api-consistency-cleanup.html

Partial-Implements: blueprint api-consistency-cleanup

Change-Id: I9d257a003d315b84b937dcef91f3cb41f3e24b53
2019-08-12 08:52:38 -05:00
ghanshyam 9610b6e252 Use hard coded values in schema than reference
API request schema should be using hard coded values
than reference of other nova code.

If refference code is changed for any reason and without
knowledge of that is being used in schema then, it can
change the schema unintentionally which leads to API backward
incompatible change.

It is always better to use raw and hard coded values in schema
to avoid unintentional API changes.

This commit removes the db value reference from few schema.

Change-Id: Ie1431b7f08172292d77d72fd8d0471a2c1b392b0
2018-07-11 01:34:46 +00:00
Chris Dent def4b17934 Use nova.db.api directly
nova/db/__init__.py was importing * from nova.db.api. This meant that
any time any code anywhere within the nova.db package was imported
then nova.db.api was too, leading to a cascade of imports that may
not have been desired. Also, in general, code in __init__.py is a pain.

Therefore, this change adjusts code that so that either:

* nova.db.api is used directly
* nova.db.api is imported as 'db'

In either case, the functionality remains the same.

The primary goal of this change was to make it possible to import the
model files without having to import the db api. Moving the model files
to a different place in the directory hierarchy was considered, but
given that "code in __init__.py is a pain" this mode was chosen.

This looks like a very large change, but it is essentially adjusting
package names, many in mocks.

Change-Id: Ic1fd7c87ceda05eeb96735da2a415ef37060bb1a
2018-07-10 14:56:27 +00:00
Matt Riedemann 126c3d4c78 Deprecate file injection
This microversion makes the following changes:

1. Deprecates personality files from POST /servers and the rebuild
   server action APIs.
2. Adds the ability to pass new user_data to the rebuild server
   action API.
3. Personality / file injection related limits and quota resources
   are removed from the limits, os-quota-sets and os-quota-class-sets
   APIs.

Implements blueprint deprecate-file-injection

Change-Id: Ia89eeb6725459c35369e8f790f68ad9180bd3aba
2017-12-12 09:22:21 -05:00
Matt Riedemann 9ddbaa15cb Fix 'force' parameter in os-quota-sets PUT schema
A regression was introduced in the 2.36 API microversion where the
'force' parameter was missing from the 'PUT /os-quota-sets/{tenant_id}'
API request schema so users could not force quota updates with
microversion 2.36 or later. The bug is now fixed so that the 'force'
parameter can once again be specified during quota updates. There is
no new microversion for this change since it is an admin-only API.

Change-Id: I947e927802f755ccb25a91efd82cac895779d19e
Closes-Bug: #1733886
2017-12-07 08:59:29 -05:00
ghanshyam a39f6bf18c Implement query param schema for quota set APIs
quota set APIs accept query param to filter the
quota.
This commit adds json schema to validating the valid
query parameters.

There is no change in API behaviour and additionalProperty
is kept True for backward compatibility.

Partially implements blueprint json-schema-validation-for-query-param

Change-Id: Ifaff9fb3a85ab8366b79b990f23ce03ec2bb0591
2017-11-19 03:23:31 +03:00
He Jie Xu 767b3db411 Add networks to quota's update json-schema when network quota enabled
The enable of network quota is configurable. But the json-schema of quota
update won't be updated accroding configuration. This leads to user can't
update network quota from API.

This patch add network quota when it's enabled.

Change-Id: I922525bfe55c42d2bf187c3bcd30536c8adf1c4f
Closes-Bug: #1606740
2016-08-22 13:56:48 +08:00
He Jie Xu 603859eb45 Filter network related quotas out of quotas API
As all the network related proxy APIs were deprecated, the related quotas
should be filtered out of quotas API also.

This patch doesn't bump the max api version, due to the patch separation.
The max api version will bump in the last patch.

This patch also moves the network quota registeration in method, that is
good for test.

Partially implements blueprint deprecate-api-proxies

Change-Id: I7311ad726f5ca50f5648a539b03c00e712235834
2016-07-26 14:14:44 +08:00
He Jie Xu 3e032fd45b Remove 'v3' directory for v2.1 json-schemas
This is step 4 of the remove v3 process. It moves the v2.1
json-schemas out of v3 directory, and also corrects all the
references.

Change-Id: Ibf88c38df951ed755b7431846cca7496f861c1dd
Partial-Bug: #1462901
2015-08-13 09:58:48 +08:00