Resolved issues in python-novaclient code like
Function 'func_name' does not have a parameter 'param_name'
TrivialFix
Change-Id: I87cfd346ed8d7dd45bc4dc96bc89c576b5145711
Fix E124 failures and enable check for E124
E124 closing bracket does not match visual indentation
Change-Id: Iec6af44362dcf613cfaccbccbe53de82aba51a6a
other openstack clients like glance, cinder use --endpoint-type
(internal|admin|public). This allows users to use the same arguments
with the nova cli.
Partial-bug: #1367389
Change-Id: Ia55cad797ac0dca7fa60f55c1f2dfba0b64d0fd3
Fixed redeclared test_names for two test functions that pass now:
1) 'test_list_security_groups_all_tenants_on'
2) 'test_find_by_str_name'
Small spelling corrections
TrivialFix
Change-Id: Iacb0ce5697779f9342c22a22cb2f29a8e063b459
debugging tests is a lot easier when you can actually inject stderr
directly through even on successes. Add the pretty tox facility from
nova / tempest-lib into python-nova client as well for functional
tests.
Change-Id: I5c1f8244a5c743b590b74a8eb3eaf4a699555644
This is a functional test that boots a server via the cli, creates a
volume, and tries to attach it via the cli (which causes a failure due
to completion cache code). Note: the failure actually happens *after*
the attach command is dispatched, so the volume attach will still
work, the user is presented an error though.
Many TODOs remain for future patches. The test also tries to document
what was learned about the CLI redirection to cinder API, which was
introduced when Cinder was split out, but was tribal knowledge that
was lost in the mists of time.
Related-Bug: #1423695
Change-Id: Iaf474298be135843bff0114cf211bee19762f3ad
This reverts commit 4c8cefb98a425382204df2f38f24e6b5b71520dd.
The cache completion was causing a bug where 'nova volume-attach' would
then try to query Nova for volume information using a URL that was not
valid. This caused it to appear that the attach had failed.
Additionally the idea of making extra API queries for a bash completion
cache should be thought through more.
Conflicts:
novaclient/client.py
novaclient/shell.py
novaclient/v2/client.py
novaclient/v3/client.py
Closes-Bug: #1423695
Change-Id: I6676a11f9b5318a1cda2d03a5d4550bda549d5c2
Currently the commands of os-tenant-network API use net-*
which may confuse users sometime. This patch changes commands
to tenant-network-*, and marks net-* commands as DEPRECATED.
Closes-Bug: #1152862
Change-Id: I8c3a0be08763a6f626d7fc7cf84811ac61ccc526
Copy tests in from tempest/cli/simple_read_only/compute/test_nova.py in
preparation for removing that file.
Change-Id: I5a34cf1a39d4f73f94a27cce365434bd4a0eea0b
Nova delete command deletes an instance by name
or ID. Nova delete command is able to delete an
instance within the same the tenant by name or
ID. When admin credentials are sourced and try
to delete a non admin tenant instances, nova
delete command is able to delete an instance by
ID only, it is not able to delete an instance by
name.
Nova delete command deletes an instances by id
using following api call
/v2/{tenant_id}/servers/{server_id}
But to delete an instance by name, nova delete
command first find the resources by name using
following api call
/servers?name={server_name}
This api call is not able to retrive the list
of other tenant instances.
Adding all tenants parameter to this api call
will retrive the list of other tenant
instances. The following will be new api
call
/servers?all_tenants=1&name={server_name}
Closes-Bug: #1247030
Change-Id: I03e578d58214c835d9a411752bd618d77ced37ff
If 'auth_url' is missed in HTTPClient, authenticate method failed with
non-friendly error while trying to parse it.
Change-Id: Iaec95527293f3e1a34eb7f9ffa81097ba48107b3
nova help usage commands provides help that the command
can be used with either tenant name or tenant ID but using
tenant name gives wrong output.
So, updated the help for the command so that it is shown
that only tenant ID can be used.
Change-Id: I2ae1edd28d75fc7988fcd0da5b0fdd8081455b16
Closes-Bug: #1419726
If given filename is `-` for `--pub-key` option, reads public key
from stdin.
$ cat id_rsa.pub | nova keypair-add --pub-key - keyname
Change-Id: Ib6dfe5a7b08d588868a923defb9ddd15fc28e01f
Closes-Bug: #1333476
I observed a transient unit test failure [1] where occasionally the
ordering of the keys in the string result from json.dumps() didn't
match the ordering in the call_args_list, causing the test to fail.
This change adds a dict comparison of the POST data payload instead
of comparing the json.dumps(data) strings.
[1] http://logs.openstack.org/03/153203/3/check/
gate-python-novaclient-python34/f8a12bc/
Change-Id: I6b8bd4169b92870f657bf4e7f7fca02722749017
In the method named from_api in nova/block_device.py,
if source_type == 'image' and destination_type == 'local':
raise exception.InvalidBDMFormat(
details=_("Mapping image to local is not supported."))
While, in the method named _boot in novaclient/v2/servers.py
if image:
bdm_dict = {'uuid': image.id, 'source_type': 'image',
'destination_type': 'local', 'boot_index': 0,
'delete_on_termination': True}
block_device_mapping_v2.insert(0, bdm_dict)
Because of the above, if using --image and --block-device
params at the same time to create vm, nova would
raise InvalidBDMFormat exception
To resolve this problem, remove the codes in novaclient which
conflict with nova
Change-Id: I488322ba0160100a6d641fde68fa824d0581956a
Closes-Bug:#1418484
This fix changes the item that cached for completion from
"human_id" to "name".
A string for completion shoud not be changed in any way,
because changed keyword can not use as command line parameter.
But the "human_id" means "human readable id" that is
changed from "name" by method "to_slug". "to_slug" is meant to
create a valid path name from a string.
The tools/nova.bash_completion take the completion string from
the file ".novaclient/*/*-cache". The file is created when client
call "list" command. For example , "nova list","nova image-list",
and the others.
Currently, items that are written to the cache file is the "id"
and "human_id".
Closes-Bug: #1193049
Change-Id: I241ec8b7c8729274ee43db6e360141fd381b265e
Currently find_resource() searches resource with human_id before does
with name_attr. With this logic, find_resource() cannot identify
upper/lower case. In find_resource(), human_id always matches and
name_attr never used in find_resource() because human_id made from
small letters of name_attr string (see bug/1318503).
To identify upper/lower case, name_attr should be used before human_id.
This fix moves name_attr to ahead of human_id with unit-test cases.
Change-Id: I9b821d7111c11a97be38f19de06172daf410022d
Closes-Bug: #1318503
Add first pass at getting a post_test_hook working. Once the project
config side of this lands this script can be self gating.
Change-Id: I5b0f5508f8e0a2a13f71e4a6b7a29a0d1a59b951
Module novaclient.v1_1 is used as implementation of V1.1, V2 and V3.
Since future development(microversioning) will be done across V2,
implementation should be done in appropriate module(to prevent misleading).
Despite the fact that implementation for all versions are equal, discover
method for contrib path worked only for v1.1. This patch fixes this bug and
modifies shell tests to check all versions.
Change-Id: Ib6798f4dfe177586302141f522dc593560ce6a5b
quota-show and quota-defaults not work because 'SessionClient'
object has no attribute 'tenant_id'. Try to get project_id
from auth_ref when cs.client is SessionClient instance.
Change-Id: Ic125a99ba34e911485868454c3c7531a34eabdc9
Closes-Bug: #1407388
The docstrings refer to instance passwords as the admin password, root
password, or simply as "password". That makes documentation difficult to
understand. I've cleaned things up where appropriate.
I did not change the 'root-password' command in this patch, im planning
to do that in a separate patch.
Cleaning that up to have everything
refer to the instance password as "admin password" for clarity.
Change-Id: I421edcaf18bf8536d5e43f71db6e868868154be3
The get() command gets a volume based on an id. It does not have
anything to do with deleting a volume, and thus should not be documented
as such.
Change-Id: Id62fb07ddd9024ee02090201ce1b679d4968b168
Begin moving tempest nova CLI tests out of tempest and into this repo
using tempest-lib. This patch adds the framework to run the functional
tests, later patches will port the existing tempest tests.
Use standard OpenStack environment variables to get keystone auth
Change-Id: Ie957bd450bfed97b63788cfb488f92988fbbc889
Change default test path to unit tests, and support setting
$OS_TEST_PATH to specify a different path (such as functional).
Change-Id: I3c0d597b5e1c43a8cb04ac0fc936e9ad1cdcfbf8
In order to pave the way for functional testing, move existing unit
tests into a directory labeled unit. A subsequent patch will add a
directory for functional tests.
Change-Id: I0adb8b9f14451acb382c725d31f5387b4b6d82bb