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
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
We use '_' in placement URLs.
This change was promised as a follow up to
Ia8b534d20c064eb3a767f95ca22814925acfaa77
Change-Id: Idc52bcf396dc8ad420d3183f9bee48e07656292d
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Cover a 409 that should happen when trying to delete a resource
provider for which there are allocations.
Change-Id: Id07c8dbc334aff94fd079de867f8db6256bc6973