8649 Commits

Author SHA1 Message Date
OpenStack Proposal Bot
b5ed791df7 Updated from global requirements
Change-Id: Ibef2ba02a56142c88770887556297940e02eeb0e
2016-12-07 13:36:23 +00:00
Jenkins
ae9bac25f6 Merge "conf: Remove deprecated service manager opts" 2016-12-07 13:23:25 +00:00
Jenkins
9760992899 Merge "Add a CellDatabases test fixture" 2016-12-07 13:09:36 +00:00
Sergey Nikitin
d543f50af0 Revert "reduce pep8 requirements to just hacking"
This reverts commit 1e287ae14bac519310221d187e7d1563c2310823

Constraints mechanism doesn't work for 'hacking' lib:
I11eb0d762869ad8920795fb710f1b2eeb9354f12

We have to install all of test-requirements to get
'hacking' at the right version.

Closes-Bug: #1648054

Change-Id: I512192e8a9ab3a53a52e6cc4d4b8a222951af7fb
2016-12-07 16:48:52 +04:00
bhagyashris
22eb396a13 Return 400 when name is more than 200 characters
APIs listed below are returning 500 error if you pass name more than
200 characters.
1. create resource_providers
2. update resource_providers

Added maxLength check in schema to ensure name should not be more than
200 characters.

Closes-Bug: #1642485
Change-Id: Ia22ae86702dabe18bc577b17164a81c363da6d41
2016-12-07 12:29:10 +05:30
Jenkins
0d4198ef74 Merge "Fix a typo in a comment in microversion history" 2016-12-06 21:40:43 +00:00
Chris Dent
165aa586d3 Fix a typo in a comment in microversion history
We use '_' in placement URLs.

This change was promised as a follow up to
Ia8b534d20c064eb3a767f95ca22814925acfaa77

Change-Id: Idc52bcf396dc8ad420d3183f9bee48e07656292d
2016-12-06 19:11:07 +00:00
melanie witt
80d7680473 Add a CellDatabases test fixture
As we progress with the Cells v2 scheduling interaction work, we need
to be able to have switching between multiple databases work in our
functional tests. The existing Database fixture doesn't work in this
case because each connection switch via target_cell results in a new,
empty sqlite database, and main_context_manager is global in the DB
API and always points at the same sqlite database.

This adds a fixture that creates a new sqlite database per cell
database, runs migrations, and keeps track of the databases using
identifiers provided when cell databases are added to the fixture.
It patches get_context_manager, create_context_manager, and target_cell
to return the matching database connection according to identifier,
simulating switching between multiple databases in a single test.

Change-Id: I00748cbbb682813987a2ad8c69948f71223daee7
2016-12-06 10:08:35 -08:00
Jenkins
68f7154382 Merge "Fix placement API version history 1.1 title" 2016-12-06 16:37:56 +00:00
melanie witt
96f8efe2d2 Pass context as kwarg instead of positional arg to get_engine
There are a couple of places in nova/db/api/sqlalchemy.py where the
context argument is passed as a positional arg instead of a kwarg,
causing it to be erroneously mapped to the use_slave kwarg:

  def get_engine(use_slave=False, context=None):

This corrects to calls to pass context=context instead.

Change-Id: I8fb7f04a54d9f7f645df8287cdda0ae665a22368
2016-12-06 16:35:22 +00:00
Jenkins
763e4502d8 Merge "placement: REST API for resource classes" 2016-12-06 16:32:43 +00:00
Jenkins
f85c38550a Merge "Require cellsv2 setup before migrating to Ocata" 2016-12-06 03:32:56 +00:00
Jenkins
c9d6b55ed5 Merge "conf: remove deprecated exception option" 2016-12-06 02:07:11 +00:00
Dan Smith
4c6dbc4194 Require cellsv2 setup before migrating to Ocata
We have code going into Ocata that needs to be sure that cell and
host mappings are in place. Since this was required homework in
Newton, we can land a migration to intentionally fail if this was
not completed.

This is, however, a little difficult to require because a first-time
deployment will be initialized schema-wise with none of these records,
which is also sane. So, we look to see if any flavors are defined as
a sentinel to indicate that this is an upgrade of an existing
deployment instead of a first-time event. Not perfect, but since this
is really just a helper for the user, it seems like a reasonable
risk.

Depends-On: If1af9c478e8ea2420f2523a9bb8b70fafddc86b7
Change-Id: I72fb724dc13e1a5f4e97c58915b538ba761c582d
2016-12-05 19:51:36 -05:00
Jenkins
741bd45da6 Merge "Updated from global requirements" 2016-12-05 17:41:11 +00:00
Matt Riedemann
c0a4f4151b Fix placement API version history 1.1 title
This needs to use dashes otherwise it doesn't render
properly in the docs. Also adds an informative title
for the 1.1 microversion since that seems to be a pattern
we're going with now in 1.2.

Change-Id: I9fbb7d7f4fee024fa2afb14b190c3ad403b7ed61
2016-12-05 16:13:49 +00:00
Jay Pipes
5320a85d13 placement: REST API for resource classes
This patch adds support for a REST API for CRUD operations on custom
resource classes:

    GET /resource_classes: return all resource classes
    POST /resource_classes: create a new custom resource class
    PUT /resource_classes/{name}: update name of custom resource class
    DELETE /resource_classes/{name}: deletes a custom resource class
    GET /resource_classes/{name}: get a single resource class

Change-Id: I99e7bcfe27938e5e4d50ac3005690ac1255d4c5e
blueprint: custom-resource-classes
2016-12-05 16:13:49 +00:00
ChangBo Guo(gcb)
e82057b28e conf: Remove deprecated service manager opts
The following service manager config options were deprecated in
13.0.0 and remove them now:

- metadata_manager
- console_manager
- consoleauth_manager
- cert_manager
- scheduler_manager
- conductor.manager

Implements: bp centralize-config-options-ocata

Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
Change-Id: Ia50d18c350dbc4ca88da9543e1236e3398ea28ee
2016-12-05 23:28:49 +08:00
OpenStack Proposal Bot
16d09a9fa8 Updated from global requirements
Change-Id: Id3962e728234970b4c8e43b569e55a6aa507a3cc
2016-12-05 09:57:19 +00:00
Jenkins
b3b58e47ba Merge "Always use python2.7 for docs target" 2016-12-02 16:27:03 +00:00
Jenkins
1f09dea34d Merge "conf: Trivial fix of indentation in 'api'" 2016-12-02 15:26:07 +00:00
Jenkins
afd72d0819 Merge "conf: Move api options to a group" 2016-12-02 15:25:13 +00:00
Jenkins
53d52671ac Merge "conf: remove deprecated cert_topic option" 2016-12-02 13:46:21 +00:00
Jenkins
4b55198c03 Merge "libvirt: Cleanup test_create_configdrive" 2016-12-02 00:48:17 +00:00
Jenkins
dc7726ce3b Merge "conf: fix formatting in wsgi" 2016-12-02 00:44:52 +00:00
Jenkins
6b11d0def5 Merge "conf: Removed TODO note and updated desc" 2016-12-02 00:31:05 +00:00
melanie witt
c84fa51982 Always use python2.7 for docs target
The docs testenv doesn't work with python 3.x on our codebase.
If someone is on a platform that defaults to python => python3,
building docs will fail for them.

Closes-Bug: #1646629

Change-Id: I56f3933e89e6fe9e181517325e2d7af5110c5656
2016-12-01 22:05:54 +00:00
Jenkins
d764ef968a Merge "[scheduler][tests]: Fix incorrect aggr mock values" 2016-12-01 17:53:39 +00:00
Matthew Booth
9d43efbe7a libvirt: Cleanup test_create_configdrive
This test made a tortured trip into _create_image_helper without using
much of its functionality. We pull this out and have it call
_create_configdrive directly.

This leaves _create_image_helper with only a single caller:
test_create_image_with_flavor_swap. This test is almost identical in
purpose to the much better test_create_image_with_swap and
test_create_image_with_legacy_swap_resizing. We refactor
test_create_image_with_swap to use ddt to cover all 3 cases, and
remove _create_image_helper.

This introduces the first use of ddt in Nova tests. It is already in
global-requirements. It was approved for use in Nova tests during the
Ocata contributor meetup:

  https://etherpad.openstack.org/p/ocata-nova-summit-meetup

Change-Id: I9d26ae3c26bab20ae60c2db011194ac0b2ead555
2016-12-01 16:58:05 +00:00
bhagyashris
e79fb5d631 Handle maximum limit in schema for int and float type parameters
Create/update inventory APIs returns 500 error if you pass value
greater than db.MAX_INT (2147483647) for total, reserved, min_unit,
max_unit, step_size int type parameters and db.SQL_SP_FLOAT_MAX
(3.40282e+38) for allocation_ratio.

Added maximum limit check in schema to ensure value is not greater than
maximum limit permitted by db for all mentioned parameters.

Closes-Bug: #1642484
Change-Id: I5b8c3c175ca617ae7bb82b81b0fe608ae1755b72
2016-12-01 12:21:03 +05:30
Jenkins
e730b523ed Merge "Mention API V2 should no longer be used" 2016-11-30 03:17:39 +00:00
Stephen Finucane
e02fb79e63 conf: Trivial fix of indentation in 'api'
Change-Id: I65a57a99768afed7d5b9c5b2dba2c21dfdd35608
Implements: bp centralize-config-options-ocata
2016-11-29 15:46:28 +00:00
hussainchachuliya
213b29a070 hacking: Use uuidutils or uuidsentinel to generate UUID
Added hacking check to ensure that UUID is being generated from
oslo_utils.uuidutils or uuidsentinel(in case of test cases)
instead of uuid4().

Change-Id: I73ee63fbd4f451d3aa5dc1a2a734d68c308b4440
2016-11-29 11:49:24 +05:30
hussainchachuliya
48aa351051 Replace uuid4() with uuidsentinel
As of now, in most of the test cases, uuidsentinel is used for
generating a UUID except at some places where uuid4() is used.
In order to maintain consistency, we propose to use uuidsentinel
module for generating UUIDs throughout the test cases.

There are some cases where unique UUIDs are required. For such
cases, generate_uuid() from oslo_utils.uuidutils is used.

Change-Id: I61914796aa94b453669add2e71b3d5d704633176
2016-11-29 11:49:24 +05:30
Maciej Szankin
71fcffe8cb conf: Move api options to a group
Change-Id: Ida4ee57d6e1822e35e3198f6d3a89410e211d57d
Implements: bp centralize-config-options-ocata
2016-11-25 16:32:31 -06:00
Jenkins
62a1a54940 Merge "Placement api: Add informative message to 404 response." 2016-11-25 21:12:56 +00:00
Pavel Kholkin
c6ac14e0d4 [scheduler][tests]: Fix incorrect aggr mock values
Currently the value return from 'utils.aggregate_metadata_get_by_host'
is a type of collections.defaultdict(set). That said all the values
are 'set' not 'String'. Unfortunately, most of test cases related to
aggregate filters are using it with in incorrect way. This patch fixes
it and adds an extra test case to verify it.

Co-Authored-By: Fei Long Wang <flwang@catalyst.net.nz>

Change-Id: I12f033a66ed31cd624bda47be944bab6c841dbf5
2016-11-25 19:54:15 +03:00
Flavio Percoco
3f02422f16 Show team and repo badges on README
This patch adds the team's and repository's badges to the README file.
The motivation behind this is to communicate the project status and
features at first glance.

For more information about this effort, please read this email thread:

http://lists.openstack.org/pipermail/openstack-dev/2016-October/105562.html

To see an example of how this would look like check:

b'https://gist.github.com/596c8169411dd2535fd181ba4e2cb8ca\n'

Change-Id: I2b02fc2968993947bec7e3b0e878b0ea149a9b31
2016-11-25 13:55:29 +01:00
Jenkins
9f82809fc1 Merge "Use pick_context_manager throughout DB APIs" 2016-11-24 08:09:56 +00:00
Jenkins
55a0e3b5b6 Merge "Implement get and set aggregates in the placement API" 2016-11-24 06:58:58 +00:00
Jenkins
b3fb10e40c Merge "[placement] increase gabbi coverage of handlers.resource_provider" 2016-11-23 23:12:09 +00:00
Jenkins
f987e0e9e1 Merge "[placement] increase gabbi coverage of handlers.inventory" 2016-11-23 23:11:18 +00:00
Jenkins
c6ba9851ce Merge "[placement] increase gabbi coverage of handlers.allocation" 2016-11-23 23:08:45 +00:00
Pushkar Umaranikar
8ee75b570a Placement api: Add informative message to 404 response.
Add informative messages to the 404 error response from
inventory.py and usage.py

This change also includes adding/altering existing Gabbi tests
for 404 response and add resonse_strings validation checks for
that.

Change-Id: Ica46a5479dec06b035f8b43d6738e9d124f6ae37
Related-Bug: #1634115
2016-11-23 22:51:07 +00:00
Maciej Szankin
2bd8925d02 conf: remove deprecated cert_topic option
Change-Id: Iade8ed5b8697e715fbecadd62076c3560af2bba9
Implements: blueprint centralize-config-options-ocata
2016-11-23 10:53:36 -06:00
Jenkins
90403e6539 Merge "Remove deprecated nova-all binary" 2016-11-23 15:39:45 +00:00
Maciej Szankin
8b1a3a37ea conf: remove deprecated exception option
Change-Id: Ia27d4040f317e5e70ac53341eccc80c868fe99e5
Implements: blueprint centralize-config-options-ocata
2016-11-23 15:25:03 +00:00
Jenkins
49d408e0e1 Merge "Remove redundant VersionedObject Fields" 2016-11-23 07:16:49 +00:00
Matt Riedemann
7b49231c88 Remove redundant VersionedObject Fields
This removes the NonNegativeInteger NonNegativeFloat and
IPV4AndV6Address Fields, since they already are defined in ovo.

implements bp json-schema-for-versioned-object

Depends-On: I083c854d0e1d18806169a1454e8127eda9e8ffb8

Change-Id: I61b7b6fa53013aff200e55b7031d5ba23669e1f4
2016-11-22 15:47:53 -05:00
Chris Dent
4b5aa8743d [placement] increase gabbi coverage of handlers.resource_provider
Cover a 409 that should happen when trying to delete a resource
provider for which there are allocations.

Change-Id: Id07c8dbc334aff94fd079de867f8db6256bc6973
2016-11-22 15:34:51 +00:00