8866 Commits

Author SHA1 Message Date
Jenkins
163857db26 Merge "Updated from global requirements" 2017-04-28 14:52:27 +00:00
OpenStack Proposal Bot
5ba7b8f83c Updated from global requirements
Change-Id: Ia4425b0578764273cea16cfd91a405436230bb13
2017-04-27 21:00:33 +00:00
Sean Dague
669a97776e Expose StandardLogging fixture for use
This will allow any tests to access self.stdlog.logger.output to see
what was logged.

Change-Id: I8855b10d57c067e06eccc887dea9a9e0e57dcb4c
2017-04-27 14:44:26 -04:00
Jenkins
c314b0cd59 Merge "Remove all discoverable policy rules" 2017-04-27 04:23:49 +00:00
Jenkins
351fa9658b Merge "Register osapi_compute when nova-api is wsgi" 2017-04-26 18:09:10 +00:00
John Garbutt
4a34b790d3 Remove all discoverable policy rules
We have signaled many times the use of API extensions to change the API
has been deprecated, including:
04f8612aa99e618767a85d2f674ecdfc01955ff7

This patch ensures we no longer check any of the discoverable rules when
compiling the list of extensions to list in the API. This stops users
from being able to use policy to hide certain API extensions. This was
never that useful, but now you can't turn any extensions off and we
report the API version number, it is basically useless.

Note the change in the policy cmd unit test is to ensure now there are
no rules that use the ANY rule, we correctly check we return an empty
list of rules that match.

blueprint remove-discoverable-policy-rules

Change-Id: I61d8063708731133177534888ba7f5f05a6bd901
2017-04-26 15:31:37 +01:00
Jenkins
658b7c207e Merge "Allow CONTENT_LENGTH to be present but empty" 2017-04-26 12:06:23 +00:00
Jenkins
52b22b09f0 Merge "Use plain routes list for '/os-aggregates' endpoint instead of stevedore" 2017-04-25 17:11:26 +00:00
Jenkins
76b91ba9fe Merge "Use plain routes list for '/os-keypairs' endpoint instead of stevedore" 2017-04-25 17:10:48 +00:00
Jenkins
0892fd6fa7 Merge "Use plain routes list for flavors-access endpoint instead of stevedore" 2017-04-25 17:10:13 +00:00
Jenkins
68fbaab7dc Merge "Use plain routes list for flavors-extraspecs endpoint instead of stevedore" 2017-04-25 17:09:39 +00:00
Jenkins
48c5362ef2 Merge "Use plain routes list for flavor endpoint instead of stevedore[1]" 2017-04-25 17:02:20 +00:00
Jenkins
b6fcb8daf2 Merge "Use plain routes list for '/servers' endpoint instead of stevedore" 2017-04-25 16:58:25 +00:00
Jenkins
d4bc124964 Merge "encryptors: Switch to os-brick encryptor classes" 2017-04-25 16:40:22 +00:00
Chris Dent
35067971e3 Register osapi_compute when nova-api is wsgi
When the nova-api services starts from its own standalone binary it
registers itself in the services table. The original wsgi script in
nova/wsgi/nova-api.py did not, leading to the bug referenced below.

The new wsgi script at nova.api.openstack.compute.wsgi, modelled on
a similar thing used for the placement API, provides the necessary
service registration.

If a ServiceTooOld exception happens while trying to register the
service then a very simple (currently very stubby) application is
loaded instead of the compute api. This application returns a 500
and a message.

Some caveats/todos:

* wsgi apps managed under mod-wsgi (and presumably other containers)
  are not imported/compiled/run until the first request is made. In
  this case that means the service handling does not happen until
  that first request, somewhat defeating the purpose if the api is a
  bit idle.

Change-Id: I7c4acfaa6c50ac0e4d6de69eb62ec5bbad72ff85
Closes-Bug: #1661360
2017-04-25 15:40:37 +00:00
He Jie Xu
5b0a344dcd Use plain routes list for '/os-aggregates' endpoint instead of stevedore
This patch adds '/os-aggregates' related routes by a plain list, instead
of using stevedore. After all the Nova API endpoints moves to
the plain routes list, the usage of stevedore for API loading will be
removed from Nova.

Also note that the original 'ProjectMapper' use the 'routes.Mapper.resource'
to create a set of routes for a resource which comform to the Atom
publishing protocol. It includes some of URL mappings we didn't document
before. This patch will remove those URL mappings. For the detail,
please reference:
http://lists.openstack.org/pipermail/openstack-dev/2017-March/114736.html

Partial-implement-blueprint api-no-more-extensions-pike

Change-Id: Ia41c096a579eb1a7c5b99bd6e9267ab4b7f81776
2017-04-25 22:38:37 +08:00
He Jie Xu
63b1f3013d Use plain routes list for '/os-keypairs' endpoint instead of stevedore
This patch adds '/os-keypairs' related routes by a plain list, instead
of using stevedore. After all the Nova API endpoints moves to
the plain routes list, the usage of stevedore for API loading will be
removed from Nova.

Also note that the original 'ProjectMapper' use the 'routes.Mapper.resource'
to create a set of routes for a resource which comform to the Atom
publishing protocol. It includes some of URL mappings we didn't document
before. This patch will remove those URL mappings. For the detail,
please reference:
http://lists.openstack.org/pipermail/openstack-dev/2017-March/114736.html

Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: I9b18e7acce37ba935f4302cc89c3aeccc4f50915
2017-04-25 22:38:37 +08:00
ghanshyam
0e93e7f740 Use plain routes list for flavors-access endpoint instead of stevedore
This patch adds flavors-access related routes by a plain list, instead
of using stevedore. After all the Nova API endpoints moves to
the plain routes list, the usage of stevedore for API loading will be
removed from Nova.

Partial-implement-blueprint api-no-more-extensions-pike

Change-Id: I284516a396e99a5a1c2113ad4ef3e4618628caa9
2017-04-25 22:38:37 +08:00
ghanshyam
9b8ec84bd6 Use plain routes list for flavors-extraspecs endpoint instead of stevedore
This patch adds flavors-extraspecs related routes by a plain list, instead
of using stevedore. After all the Nova API endpoints moves to
the plain routes list, the usage of stevedore for API loading will be
removed from Nova.

Partial-implement-blueprint api-no-more-extensions-pike

Change-Id: I7578ef265458365b44b366c4021d0566c39ea936
2017-04-25 22:38:37 +08:00
ghanshyam
e169a149e5 Use plain routes list for flavor endpoint instead of stevedore[1]
This patch adds flavor related routes by a plain list, instead
of using stevedore. After all the Nova API endpoints moves to
the plain routes list, the usage of stevedore for API loading will be
removed from Nova.
flavor access and extraspecs router will be added in part2.

Also note that the original 'ProjectMapper' use the 'routes.Mapper.resource'
to create a set of routes for a resource which comform to the Atom
publishing protocol. It includes some of URL mappings we didn't document
before. This patch will remove those URL mappings. For the detail,
please reference:
http://lists.openstack.org/pipermail/openstack-dev/2017-March/114736.html

Partial-implement-blueprint api-no-more-extensions-pike

Change-Id: I1c3db4e94ccc27925d800876dcf470614f563cd1
2017-04-25 22:38:37 +08:00
He Jie Xu
6e63ce7bf6 Use plain routes list for '/servers' endpoint instead of stevedore
This patch add '/servers' related routes by a plain list, instead
of using stevedore. After all the Nova API endpoints moves to
the plain routes list, the usage of stevedore for loading the API
will be removed from Nova.

To remove the servers extension from stevedore, all the extensions
which depend on servers needs to be removed together. Those
extensions are about the servers API response extension and the action
extension.

Also note that the original 'ProjectMapper' use the 'routes.Mapper.resource'
to create a set of routes for a resource which comform to the Atom
publishing protocol. It includes some of URL mappings we didn't document
before. This patch will remove those URL mappings, also remove the
corresponding URL mappings for 'os-volumes_boot' endpoint. For the detail,
please reference:
http://lists.openstack.org/pipermail/openstack-dev/2017-March/114736.html

Partial-implement-blueprint api-no-more-extensions-pike

Change-Id: I76c384c10bd804fc2049aef305044149bb55d0dc
2017-04-25 22:38:33 +08:00
Lee Yarwood
f631e8f7f4 encryptors: Switch to os-brick encryptor classes
This change drops the encryptor classes and supporting code from the
codebase in favor of the classes provided by os-brick. This is made
possible by the following os-brick change that introduced new encryption
provider constants during Ocata :

Ic155bd29d46059832cce970bf60375e7e472eca6

Thanks to the following bugfix also released as part of 1.11.0 for Ocata
the constants present in os-brick also support the use of the deprecated
legacy class paths from Nova, for example
nova.volume.encryptors.luks.LuksEncryptor, while using the os-brick
provided classes :

I3ec6e3fe919bc03d158da04a18fb8b651002ed52

Implements: blueprint switch-to-os-brick-encryptor-classes
Change-Id: I37ffc90c0bd57029fced251b5cfd7cd4318a0292
Depends-On: Iae12605dc7d0607e78020a24b5b8801606c2f169
2017-04-25 13:51:41 +00:00
Jenkins
fc35273591 Merge "fix typos" 2017-04-25 01:05:05 +00:00
OpenStack Proposal Bot
2599b424da Updated from global requirements
Change-Id: Iae12605dc7d0607e78020a24b5b8801606c2f169
2017-04-23 20:48:37 +00:00
Andy McCrae
49a409031b Allow CONTENT_LENGTH to be present but empty
The CONTENT_LENGTH environ can be present, but empty, which returns
None, and causes a ValueError when attempting to use .int().

This patch removes the setting of CONTENT_LENGTH to an integer, but
instead ensures that if CONTENT_LENGTH is not empty it is an integer, to
prevent a situation where a bogus "CONTENT_LENGTH" header is specified.

Additionally, as the CONTENT_TYPE environ can similarly be present but
empty, we should .get() it in a similar fashion to ensure it isn't
present but None when CONTENT_LENGTH is specified.

Change-Id: I66b6f9afbea8bf037997a59ba0b976f83c9825fb
Closes-Bug: #1681843
2017-04-21 16:21:29 +01:00
Jenkins
e97f920d54 Merge "PowerVM Driver: spawn/delete #1: no-ops" 2017-04-20 16:10:22 +00:00
OpenStack Proposal Bot
fda85f3db9 Updated from global requirements
Change-Id: I1e19585ad7011b8de04a3cd9d6d37158102d604e
2017-04-19 17:54:40 +00:00
fuzk
e6b5dcae39 fix typos
Change-Id: I780269ec20600dd07f03dbb1d7f1289fe68daf3e
2017-04-19 03:36:04 -07:00
Matt Riedemann
391514f02c Remove unused os-pci API
The os-pci API was never part of the v2.0 API and was added
to the v3 API, but when the v3 API turned into the v2.1 API
which is backward compatible with the v2.0 API, the os-pci
API was removed from v2.1. The original intent was to enable
it in a microversion but that never happened.

We should just delete this API since it has a number of issues
anyway:

1. It's not documented (which makes sense since it's not enabled).
2. The PciHypervisorController just takes the compute_nodes.pci_stats
   dict and dumps it to json out of the REST API with no control over
   the keys in the response. That means if we ever change the fields
   in the PciDevicePool object, we implicitly introduce a backward
   incompatible change in the REST API.
3. We don't want to be reporting host stats out of the API [1].
4. To make the os-hypervisors extension work in a multi-cell environment
   we'd have to add uuids to the PciDevices model and change the API to
   return and take in uuids to identify the devices for GET requests.
5. And last but not least, no one has asked for this in over two years.

As a result of removing this API we can also remove the join on the
pci_devices table when showing details about an instance or listing
instances, which were added years ago because of the PciServerController:

Id3c8a0b187e399ce2acecd4aaa37ac95e731d46c

Id3e60c3c56c2eb4209e8aca8a2c26881ca86b435

[1] https://docs.openstack.org/developer/nova/policies.html?#metrics-gathering

Closes-Bug: #1426241
Closes-Bug: #1673869

Change-Id: I9099744264eeec175672d10d04da69648dec1a9d
2017-04-18 23:47:40 -04:00
Jenkins
36aa8b3782 Merge "Remove usage of parameter enforce_type" 2017-04-18 12:59:33 +00:00
Jenkins
27ad4a1a1f Merge "Deprecate CONF.api.allow_instance_snapshots" 2017-04-18 12:54:52 +00:00
Jenkins
ee127d5ec7 Merge "Remove aggregate uuid generation on load from DB" 2017-04-18 12:51:45 +00:00
Jenkins
d73a24b361 Merge "Spelling error "paramenter"" 2017-04-18 03:54:33 +00:00
Jenkins
1226bb98c4 Merge "Use deepcopy when process filters in db api" 2017-04-18 03:49:43 +00:00
Kevin_Zheng
eb92fa371a Use deepcopy when process filters in db api
In db API when we process filters, we didn't
use deepcopy. In cases of "tags" and "not-tags"
we used pop to get the first tag, filtered out
results, and then joined with other tags for
later filtering. When we did pop(), the original
value was deleted, the key "tags"/"not-tags" remains.

In the cell scenario, both single cell(we will
query cell0 and the other cell) and multicell,
as we have to query all the cells in a loop and
the tags list in the filter will keep popping,
this will lead to either a HTTP 500 error(popping
from an empty list) or incorrect result(when
number of tags in the list is larger than cell
number, no HTTP 500 will show, but the filter
results for each cell will be different as
each loop will pop one tag).

closes-bug: #1682693

Change-Id: Ia2738dd0c7d1842b68c83d0a9e75e26b2f8d492a
2017-04-17 14:40:13 -04:00
ChangBo Guo(gcb)
599990844c Remove usage of parameter enforce_type
Oslo.config deprecated parameter enforce_type and change its
default value to True in Ifa552de0a994e40388cbc9f7dbaa55700ca276b0.
Nova peridic py35 job failure due to the DeprecationWarning: "Using the
'enforce_type' argument is deprecated in version '4.0' and will be
removed in version '5.0': The argument enforce_type has changed its
default value to True and then will be removed completely."[1]
So need clean up usage of enforce_type.

Note this patch also change enforce_type from False to default value
True in test__get_node_console_with_reset_wait_timeout. We should test
as runtime, we can use float type to test when config option
serial_console_state_timeout is float.

[1] http://logs.openstack.org/periodic/periodic-nova-py35-with-oslo-master/6eeea0f/testr_results.html.gz

Related--Bug: #1517839

Change-Id: I94915a5c6abbbb739c597025272dc0e25d3ba2ec
2017-04-17 20:23:19 +08:00
fpxie
a9a92c2355 Spelling error "paramenter"
replace "paramenter" with "parameter"

Change-Id: Id7ef609c01ca7517c09553e082edee522e05bea2
Closes-Bug: #1683272
2017-04-17 16:40:50 +08:00
Jenkins
7e2ce4972e Merge "Optimize the link address" 2017-04-15 23:07:06 +00:00
OpenStack Proposal Bot
52aad67282 Updated from global requirements
Change-Id: I38233203fd65209f6aaf87d3c365edbb2b335582
2017-04-13 16:27:09 +00:00
Jenkins
2b80923e42 Merge "Fix joins in instance_get_all_by_host" 2017-04-12 11:49:24 +00:00
Matt Riedemann
93de4fd2b8 Deprecate CONF.api.allow_instance_snapshots
The introduction of this option predates Gerrit [1]. It is
not used consistently, since it's not used for createBackup
or shelve APIs which also create snapshots. And it's not
discoverable.

We need to deprecate this option and anyone that cares to
disable snapshots needs to do it via policy.

[1] 9633e9877c

Change-Id: I321c04376d86ddb1bb3c8f1fa938a7b424e658d0
2017-04-11 14:42:32 -04:00
Jenkins
0728acac10 Merge "placement: Add Traits API to placement service" 2017-04-11 18:27:20 +00:00
Jenkins
b930a0e592 Merge "remove flake8-import-order" 2017-04-11 17:11:35 +00:00
He Jie Xu
465d17ba10 placement: Add Traits API to placement service
This patch adds support for a REST API for CRUD operations on traits.

  GET /traits: Returns all resource classes.
  PUT /traits/{name}: To insert a single custom trait.
  GET /traits/{name}: To check if a trait name exists.
  DELETE /traits/{name}: To delete the specified trait.
  GET /resource_providers/{uuid}/traits: a list of traits associated
  with a specific resource provider
  PUT /resource_providers/{uuid}/traits: Set all the traits for a
  specific resource provider
  DELETE /resource_providers/{uuid}/traits: Remove any existing trait
  associations for a specific resource provider

Partial implement blueprint resource-provider-traits

Change-Id: Ia027895cbb4f1c71fd9470d8f9281d2bebb6d8a2
2017-04-11 10:31:37 +08:00
Matt Riedemann
55868cbaf5 Remove aggregate uuid generation on load from DB
As the comments in the code suggest, we can remove this
code now. There was a blocking database migration which
enforced that the online data migrations to generate
uuids for aggregates has been completed:

4d0915568a1011ddee7317ddfb237be0803e7790

So this code is safe to remove now. As a result, we
also remove the online data migration routine which
relies on the object code.

Change-Id: I2050b5bdf906d2d2f8a87c79ca0804e0fc955755
2017-04-10 18:16:01 -04:00
Eric Fried
578ba7e15d PowerVM Driver: spawn/delete #1: no-ops
Initial change set introducing the PowerVM compute driver.  This change
set supplies the basic ComputeDriver methods to allow the n-cpu process
to start successfully; and no-op spawn & delete methods.

Subsequent change sets will build up to the functional spawn & delete
support found in https://review.openstack.org/#/c/391288

Change-Id: Ic45bb064f4315ea9e63698a7c0e541c5b0de5051
Partially-Implements: blueprint powervm-nova-compute-driver
2017-04-10 14:59:40 -05:00
Jenkins
2ad983a22c Merge "Remove domains *-log-* from compile_catalog" 2017-04-10 17:11:33 +00:00
Jenkins
7af03bbbc6 Merge "Remove dead db api code" 2017-04-10 16:09:42 +00:00
Jenkins
aeda1c6ffa Merge "[placement] Allow PUT and POST without bodies" 2017-04-10 15:21:53 +00:00
Jenkins
ee8f233e67 Merge "Use cursive for signature verification" 2017-04-10 14:31:17 +00:00