Commit Graph

40454 Commits

Author SHA1 Message Date
Matt Riedemann 5657dc5006 Cleanup validation logic in _get_requested_networks
'networks' in the server request body is a list of dicts
that can take a fixed_ip, port id or network id. There are
semantic rules for the combinations of these which are checked
in the helper method _get_requested_networks. The network id
validation logic is a bit convoluted where it's placed though,
so this change cleans that up and moves it to it's own method.

Note the main difference in nesting logic. You can't request
a port and network on the same nic (dict entry in the networks
list). So the conditional logic is such that you either have a
port or a network in a single request. Before this change, the
network id validation was happening outside that conditional,
and checked a second time if port was requested before validating
the network id. Since we already have that condition, this
change moves the network id validation under the condition where
a port is not requested (so a network id must be).

There are no test changes since this is just cleaning up the code
and also shows that this doesn't change the overall results of
the validation.

Change-Id: I466f2273a4ce02279b942f7ada264a3da97dfe92
2016-05-16 10:01:12 -04:00
Jenkins 9a05d38f48 Merge "force_live_migration remove redundant check" 2016-05-15 08:49:37 +00:00
Jenkins a4f5ac3567 Merge "Follow-up for the API config option patch" 2016-05-14 02:47:02 +00:00
Jenkins 17367af1cf Merge "Remove fake_imagebackend.Raw and cleanup dependent tests" 2016-05-14 01:07:18 +00:00
Jenkins a551b9a161 Merge "Remove unused arguments to images.fetch and images.fetch_to_raw" 2016-05-14 01:06:02 +00:00
Jenkins 4e0e2e499f Merge "Improve the help text for the API options (4)" 2016-05-14 00:54:38 +00:00
Jenkins 76c3bf32df Merge "Improve the help text for the API options (3)" 2016-05-14 00:53:21 +00:00
Jenkins 04f0f7c549 Merge "Improve the help text for the API options (2)" 2016-05-14 00:42:32 +00:00
Jenkins 55007a0375 Merge "Improve the help text for the API options (1)" 2016-05-14 00:34:08 +00:00
EdLeafe af36b0d704 Follow-up for the API config option patch
There were a few comments and suggestions for improvements in the
wording for the recent series of patches that added improved help text
to the API config options. Rather than hold up those patches, this
follow-up patch cleans up those issues.

Blueprint centralize-config-options-newton

Change-Id: I512ea8c2be383e1abef7580e32deaa40e2c76c60
2016-05-13 23:04:03 +00:00
Sean Dague 94010b52ff api-ref: reorder parameters.yaml
This reorder's parameters.yaml to the correct sort order, and turns
the info message about incorrect ordering into a warning. After this
lands parameters.yaml changes will always require that the items stay
in the sorted order enforced by the extension.

Part of bp:api-ref-in-rst

Change-Id: Ib890d369a8b50a8cd920f7b19ef13f44b3e657df
2016-05-13 16:51:23 -04:00
Jenkins a4113da58b Merge "Add online migration to store keypairs with instances" 2016-05-13 20:17:04 +00:00
Jenkins 32dfd2b7b1 Merge "Make Keypair object favor the API database" 2016-05-13 20:10:41 +00:00
Jenkins d04a1fa2a6 Merge "Change 5 space indent to 4 spaces" 2016-05-13 20:00:50 +00:00
Jenkins 22c0eaca3a Merge "trivial: removed unused networks var from os-tenant-networks:create" 2016-05-13 19:58:32 +00:00
Jenkins aec2e248a5 Merge "report info if parameters are out of order" 2016-05-13 18:42:37 +00:00
Jenkins 5becbad88f Merge "api-ref: Example verification for os-volume_attachments.inc" 2016-05-13 18:40:06 +00:00
Jenkins 103eeb8247 Merge "api-ref: Parameter verification for os-volume_attachments.inc" 2016-05-13 18:38:30 +00:00
Jenkins 903cf595d4 Merge "api-ref: finish validation for os-server-external-events.inc" 2016-05-13 17:54:01 +00:00
Jenkins 2e5eb5c7fa Merge "api-ref: Method verification for servers-actions" 2016-05-13 17:48:26 +00:00
Dan Smith 119f2c513d Add online migration to store keypairs with instances
This migrates instances to have embedded keypairs.

Related to blueprint cells-keypairs-api-db

Change-Id: I73378ace8cdde230b2204747230df37529284b16
2016-05-13 09:37:04 -07:00
Dan Smith f3a6a46fa3 Make Keypair object favor the API database
This makes the keypair object load first from the API database,
falling back to the main database as necessary. Creates happen in the
API database only now.

Since the Instance object uses this object to patch up its keypairs
field on the fly, this adds a localonly parameter to the get method so
that we don't end up with compute nodes calling back up to the API
database in the lazy-load case. Only Instances that were created before
the previous patch will be missing keypair data, and so we're
guaranteed to have their keypairs in the main database (if at all).

Related to blueprint cells-keypairs-api-db

Change-Id: I700cf8633f694c933f17dd133fa6c84c2beac4c0
2016-05-13 09:37:04 -07:00
Jenkins 4a06a8c864 Merge "Method verification of os-floating-ips-bulk.inc" 2016-05-13 15:07:08 +00:00
Jenkins a4bd8f01f6 Merge "Fix migration query with unicode status" 2016-05-13 15:05:33 +00:00
Takashi NATSUME 79f030f18f api-ref: Example verification for os-volume_attachments.inc
Change-Id: I1f5ba0453b0dc964f48471e4aecaaaa800699da1
Implements: blueprint api-ref-in-rst
2016-05-13 14:38:53 +00:00
Takashi NATSUME 05b0da8062 api-ref: Parameter verification for os-volume_attachments.inc
Change-Id: I3789a4ad36e30728024f2aa122403b0e53b1e741
Implements: blueprint api-ref-in-rst
2016-05-13 14:38:13 +00:00
Matthew Booth 93a475cd54 Remove fake_imagebackend.Raw and cleanup dependent tests
fake_imagebackend had a Raw class which was used by only a small
number of tests. This change refactors the tests to avoid the
requirement for this class by using mock.

Change-Id: Iffdc0c66f1ec4428b98fffc807af636dd491a080
2016-05-13 15:27:21 +01:00
Matthew Booth 059021550a Remove unused arguments to images.fetch and images.fetch_to_raw
Functions were passing in user_id and project_id to these functions,
but they were not being used. This change allows a subsequent patch to
drop an instance object as a function argument which has no purpose
other than to provide these unused values.

Change-Id: I844b97523b28b327e76e01ef7f16b57a415418ec
2016-05-13 15:27:21 +01:00
Jenkins 69d538849d Merge "api-ref: Method verification for os-volume_attachments.inc" 2016-05-13 14:10:03 +00:00
Jenkins de1c7886ae Merge "api-ref: os-volumes.inc method verification" 2016-05-13 14:09:19 +00:00
Jenkins 31265ea527 Merge "config options: move s3 related options" 2016-05-13 14:08:50 +00:00
Sean Dague 36c688f694 api-ref: finish validation for os-server-external-events.inc
This completes the validation for the admin event interface, including
detailing the codes we currently return in the parameter list.

Because os-service was incorrectly using the 'status' key, when I
renamed status => event_status I needed to also create a
service_status to make things compile. It's accurate enough to move
forward.

Because this is really a Neutron only API, this is moved towards the
bottom of the API list, to make it clear this isn't really designed to
be used by end user apps.

Part of bp:api-ref-in-rst

Change-Id: I3ed46eec1c33a63b7a89d6d6b5eeda574effdc56
2016-05-13 13:35:24 +00:00
Jenkins 74b115a473 Merge "api-ref: parameter validation for os-security-group-rules" 2016-05-13 13:16:00 +00:00
Sean Dague 1f67ab3114 report info if parameters are out of order
This puts in the infrastructure for enforcing the section and
parameter name ordering in parameters.yaml file. It does so through
loading the lookup table as an ordered dict, and doing compare
operations to it during initial load.

The ordered dict loading is far more expensive than straight stream
loading, so a cache mechanism for file => loaded yaml is also
added. This reduces the sphinx build time to less than it was
previously, even though we are doing more processing of the data.

Once the parameters.yaml file is made compliant, we can move these
from .info to .warn and enforce the file stays alphabetized.

Part of bp:api-ref-in-rst

Change-Id: Id30464d6326aec3ed7d82c178261d686e2509d33
2016-05-13 08:38:31 -04:00
Jenkins a7f09fe706 Merge "api-ref: ips.inc parameter verification" 2016-05-13 11:07:22 +00:00
Jenkins 39639bfd84 Merge "Method verification for server-action-deferred-delete" 2016-05-13 11:03:43 +00:00
Jenkins 755c2cb0c7 Merge "virt: reserved number of mempages on compute host" 2016-05-13 10:56:38 +00:00
Sujitha 3b0f95ec77 Method verification of os-floating-ips-bulk.inc
Corrects the error status responses for os-floating-ips-bulk

Part of bp:api-ref-in-rst

Change-Id: Id677c111e0504f38b4ccc675be5552d1c02e2da6
2016-05-13 10:46:27 +00:00
Anusha Unnam 032395caca api-ref: os-volumes.inc method verification
Verified the API document with source for methods available
and response codes used.

Part of bp:api-ref-in-rst

Change-Id: Ic3c0dc56a905985a62d719c9d05db1cf4d1c1000
2016-05-13 11:28:18 +01:00
Markus Zoeller d3a1fd56ca config options: move s3 related options
Move the s3 related options to "nova/conf/". A follow up patch will
deprecate those as they aren't used anymore since the EC2 API got
removed in Mitaka.

bp centralize-config-options-newton

Change-Id: If3994be79aa92fc0179e87c123eedb8a958f4aa9
2016-05-13 09:16:49 +00:00
Matthew Booth 11babbbb93 Fix migration query with unicode status
Running 'nova migration-list --status xxxx' from the command line
results in the status being passed to the db query as unicode.

Resolves-bug: #1581382
Change-Id: I6033a84d0255a86295a5d5261641a2a235c436c9
2016-05-13 09:51:59 +01:00
Jenkins be22885793 Merge "Updated from global requirements" 2016-05-13 03:06:46 +00:00
bria4010 7db39b1049 Change 5 space indent to 4 spaces
The Glance gate pep8 job believes that there's a violation of E126
(continuation line over-indented for hanging indent).  This patch
reduces the indent by 1 space so the pep8 job will be happy.

Change-Id: Idc946cb14c4b1dddc6a425ffbb6b4b3f1609a4ec
2016-05-12 21:02:04 -04:00
Jenkins 80fa358e86 Merge "api-ref: complete verification for extensions resource" 2016-05-13 00:56:21 +00:00
OpenStack Proposal Bot 12385e1879 Updated from global requirements
Change-Id: I54ef494539257c893fd134ec27b2a9469c957c7c
2016-05-13 00:43:58 +00:00
Jenkins 857fc59b5b Merge "Add a functional test for instance fault message with retry" 2016-05-13 00:41:34 +00:00
Jenkins 6d7e02ddb6 Merge "Add Keypairs to the API database" 2016-05-13 00:25:13 +00:00
Jenkins 2230f78525 Merge "Remove 413 as expected error code" 2016-05-12 23:05:40 +00:00
Jenkins 3f1a4a6a03 Merge "Compute API: omit disk/container formats when creating images of snapshots" 2016-05-12 22:10:09 +00:00
Jenkins 098e88996c Merge "Remove mox from tests/unit/network/test_api.py" 2016-05-12 22:08:38 +00:00