Keystone V3 requires that the options os_user_domain_id/os_user_domain_name
and os_project_domain_id/os_project_domain_name be set. These options do not
have default values and novaclient will fail if they are not set by user.
This patch adds default values for os_project_domain_id and
os_user_domain_id in case of Keystone V3 env.
This is consistent with what the OpenStack CLI does.
Also, two functional tests are added to check authentication via
Keystone V2 and V3.
Partial-Bug: #1522402
Change-Id: Ieb41a7fbf24107f7250ef34218604fba96531195
The keystone CLI has been deprecated for a long time
in favor of python-openstackclient and
Icbe15814bc4faf33f513f9654440068795eae807 finally removes
the CLI from python-keystoneclient. This will be in the 3.0
release of python-keystoneclient.
tempest-lib is using the keystone CLI and the novaclient
functional tests are using tempest-lib (which is also
deprecated now).
This change removes the usage of the keystone CLI from
python-keystoneclient via tempest-lib and replaces it
with simply using the keystone v2 python bindings from
the client.
Change-Id: I557acefbf363304ce24ac81566bb651cbfe09176
Remove additional 'timeout' element from trigger crash dump test and
rename _wait_for_nmi to _assert_nmi so that we get at least one
'assert' for each test.
Change-Id: I70372a8c725827ee9b5285ed92ca06b35eb0edbc
Closes-bug: 1554306
Getting the access list of a public flavor bails out with a dramatic
error message, suggesting that something is broken. This changes the
message to an unagitated "Access list not available for public
flavors."
Change-Id: I432496c24b23de8fa58de93f2cbed8bed1d540b1
The original tests expect the server console contains a message
"Uhhuh. NMI received for unknown reason"
but the expectation is wrong because this message is fallback one
when disabling crash dump, that means the test expects the crash
dump is disable. That is not the purpose of this NMI feature.
In addition, this message is output on x86 cpu architecture only
because the message is implemented in
https://github.com/torvalds/linux/blob/master/arch/x86/kernel/nmi.c#L304
So if we use the other cpu architectures on the test, this test will
fail.
Let's remove the expectation from the tests.
Change-Id: I62fe2e00433fd216def25d99a2f20d17b988fb84
Closes-Bug: #1553597
It's a resource-consuming task to implement full-flow (up to getting
and reading a dump file) functional test for trigger-crash-dump.
We need to upload Ubuntu image for booting an instance based on it,
and to install kdump with its further configuring on this instance.
Here, the "light" version of functional test is proposed.
It's based on knowledge that trigger-crash-dump uses a NMI injection,
and when the 'trigger-crash-dump' operation is executed,
instance's kernel receives the MNI signal, and an appropriate
message will appear in the instance's log.
Wait_for_server_os_boot() method has been added to ClientTestBase
to check if instance's operating system is completely booted.
The _create_server() method has been removed since the change
which puts this method to the base test class has been merged.
Change-Id: I2313c5d37a7cf87a8d75e37c93aab136cf028ec1
2.19 - Allow the user to set and get the server description. The user will
be able to set the description when creating, rebuilding, or updating
a server, and get the description as part of the server details.
Methods `rebuild` and `create` of novaclient.v2.servers.ServerManager were
not wrapped with `api_versions.wraps` decorator to reduce code and docsting
duplication. Version checks added inside these methods.
Change-Id: I75b804c6edd0cdf02c2cd002d0b5968fec8da545
Currently the tests just attach instances to the first network returned
by "net-list". That might however not be the right thing in some
environments. This change allows to override the default network via the
environment variable "OS_NOVACLIENT_NETWORK". If not specified the
test will fallback to the old behaviour and just use the first network.
Closes-Bug: #1510975
Change-Id: Ie682111127584a33d8e96377d812d3a6352c760d
Bug_description:
Today, in order to specify networking arguments, the nova client
only accept uuid's. It would be nice if we could extend the
client option to allow names to be accepted too.
Solution:
This patch supports provisioning of VM by mentioning network name.
_boot method currently validates for network ID to boot a VM.
Updates:
* new parameter 'net-name' is added
* when 'net-name' is specified network ID is retrieved
* network ID is used for further processing of vm boot request
* if multiple networks with the same name exist then
NoUniqueMatch exception is raised
* help text is updated
DocImpact
Closes-Bug: #1496180
Co-Authored-By: Pavel Kholkin <pkholkin@mirantis.com>
Change-Id: Ifb14a76749901ee106cdb807e38820a2c25e1320
Shell was not extended in original patch[1], which turned on v2.12, since
there was not any support of vif in shell yet.
Since shell entry point for legacy vif was merged[2], we need to add support
for v2.12 in shell too.
[1] - I18cf23847d3b2b01f5a6ffae2ebc4bede54babce
[2] - Ib3078125beb7beaa08a3408486db54e0d10763e6
Change-Id: Ie38d099b2babfd8424c7d15bd3dfe8bd75e51136
The added tests check functionality of os-services actions
except 'service-delete' (it's hard to recover after test running)
Also 'forced_down' attribute exposed by microversion 2.11
is checked here
Change-Id: I6652bac4ce49d5174592f19b1b4d91ac5bd51500
The added tests check granting access actions for public and
non-public flavors
The test for microversion 2.7 checks that the appropriate
error is returned when attempting to grant an access
to a public flavor for the given tenant
The base TenantTest class has been added to avoid code
duplication in test_keypairs and test_flavor_access tests
Also, test_keypairs code has been modified in accordance with
TenantTestBase class usage
Change-Id: Icf21d8aceaa191aee8b8ffc7c52e97ebe9509b3d
It would be nice to check not only unit test on py3 env, but functional
tests too.
Also, this patch fixes usage of xrange in functional tests.
Change-Id: I15ef204022583a40a02b3f2a48771347ddc95f3e
The usage of assertEqual(True/False, ***) should be changed
to a meaningful format of assertTrue/False(***).
Change-Id: I66110e5fc1afdf9dd6824b1f7bcb7b2c091a272d
Closes-Bug: #1512207
Nova now supports API microversion 2.13 to
allow return project_id and user_id for
os-server-groups API. Sync this to the
client side.
Change-Id: Ia09ab4bd5c693ed95b0f5dd9bc709b7597f7034e
Closes-Bug: #1526143
There is virtual-interface-list API support in nova but no
command line interface in novaclient, this patch adds it.
Closes-Bug: 1522424
Change-Id: Ib3078125beb7beaa08a3408486db54e0d10763e6
add functional test for v2.8 API (webmks console type
enablement).
Also, fixed an issue related to v2.8 microversion
enablement for the console API.
Change-Id: I7660a189cc3051dd7dbc802ad2d40a4995b44960
setUp method of base class for functional tests creates an instance of
novaclient.client.Client with const version. This logic is wrong since we
have tests for microversions.
Change-Id: Ibd3ee5c730ae1fb3c19f512728f2a0a3693763e8
2.10 - Added user_id parameter to os-keypairs plugin, as well as a new
property in the request body, for the create operation. Administrators will
be able to list, get details and delete keypairs owned by users other than
themselves and to create new keypairs on behalf of their users.
Change-Id: I13ca3f8a4dd9cf11bec79966bb8a2ab48847be22
There is a lot of H404/405 violations in novaclient, and it is better
to fix those to have a better doc string for class/methods.
This patch fixes these violations for files under novaclient/tests/
folder.
As there are lot of violations and cannot be fixed in single patches,
So separating those in multiple patches for easy review.
Partial-Bug: #1521899
Change-Id: I6e712ece14c745013bfba0bee9d77e7875dd2263
2.9 - Add a new locked attribute to the detailed view of servers. locked
will be true if anyone is currently holding a lock on the server, false
otherwise.
This microversion doesn't require any change in novaclient's code.
Just added functional tests and changed version
Change-Id: I7f33757e6f03f172e5a13ade0aa5e8d3a10dbf01
The added tests check basic set of extended server attributes
and additional attributes exposed by microversion 2.3
To avoid leak resources, cleanup part has been refactored
Change-Id: I0c8f096134838b90e17720f2a28e649998a02e3b
Commit 050a0d5b304a013e23cd5909abf6e11b7dda5f18 changed the defaults
in devstack to use the keystone v3 api. This broke the novaclient
functional test job because novaclient doesn't yet support v3
and relies on having "v2.0" in the auth_url.
This appends or replaces the version in the clouds.yaml auth_url
to v2.0 to enable the functional test job to work until v3 support
is added to novaclient.
Closes-Bug: #1506103
Change-Id: I75c5efd039b71c8855acf21c5516ccbeeaaeadb3
When running functional tests in a slow virtual environment,
the given timeout of 10 seconds to list thr available instances
is not enough. Increase the timeout to not run into
a "timed out (HTTP 408)".
Change-Id: Ie2345e6858bcc97095863d5d388bacf9c29b7682
Commit 5153dcda807c554769081626c10c43d16adea671 removed bdm v2-only
request parameters to pass nova api v2.1 schema validation, but also
removed the ability to boot with legacy bdm specifying volume_id only.
This adds volume_id back to the request for legacy bdm when
no other parameters are specified.
Closes-Bug: #1501435
Change-Id: Ie8c56c28492793990ef7ed6dc54768cef9e28a98
It would be nice to ensure that fundamental use-cases of novaclient work
for both legacy(V2.1) and for microversions(latest or specified microversion).
Change-Id: Icae73dd221c9787fd08facc8642c5b564e82393a
Most of functional tests are written for V2.0/V2.1 API version, but
launched on "latest" compute api version('--os-compute-api-version'
flag is not ovveriden + default value of it is "latest").
This patch adds "COMPUTE_API_VERSION" parameter for base TestCase,
which sets --os-compute-api-version flag while running "nova" shell.
Change-Id: I5d711438addaba5282a15fd2b9dde1800f7d7b91