python-glanceclient/glanceclient/tests/unit/v2
Cyril Roelandt e2190c4feb do_image_import: fix argument retrieval
The argparse module automatically replaces '-' characters with '_'
characters when converting an option string to an attribute:

«For optional argument actions, the value of dest is normally inferred
from the option strings. ArgumentParser generates the value of dest by
taking the first long option string and stripping away the initial --
string. If no long option strings were supplied, dest will be derived
from the first short option string by stripping the initial - character.
Any internal - characters will be converted to _ characters to make sure
the string is a valid attribute name.»[1]

This means that the value of the "--remote-region" option of the
"image-import" command will be available as "args.remote_region";
"remote-region" would not be a valid attribute anyway.

We make sure to retrieve the proper value for the following
options: --remote-region, --remote-image-id and
--remote-service-interface.

[1] https://docs.python.org/3/library/argparse.html#dest

Change-Id: I1d8c69acd5d61fdc426469cd87d1ace81871e60f
Partial-Bug: #2012442
2023-04-18 03:21:03 +02:00
..
__init__.py Move unit tests to standard directory 2015-04-18 17:42:20 +00:00
base.py Add support for glance-download import method 2022-08-30 11:20:40 +00:00
fixtures.py Use "multihash" for data download validation 2018-09-07 14:50:24 -04:00
test_cache.py Add support for Cache API 2022-02-22 16:39:33 +00:00
test_client_requests.py Unhardcode the value of DEFAULT_PAGE_SIZE from the tests 2022-11-14 12:04:23 +01:00
test_images.py Remove unicode-related Python2-only code 2022-11-14 11:49:33 +01:00
test_info.py Add support for usage API 2022-01-31 13:27:54 -08:00
test_members.py Add member-get command 2021-08-02 09:08:50 +00:00
test_metadefs_namespaces.py Unhardcode the value of DEFAULT_PAGE_SIZE from the tests 2022-11-14 12:04:23 +01:00
test_metadefs_objects.py Update hacking for Python3 2020-04-02 15:48:09 +02:00
test_metadefs_properties.py Add request id to returned objects 2017-01-20 14:50:42 +05:30
test_metadefs_resource_types.py Add request id to returned objects 2017-01-20 14:50:42 +05:30
test_metadefs_tags.py Add request id to returned objects 2017-01-20 14:50:42 +05:30
test_schemas.py Fix warlock model creation 2016-07-06 18:18:42 -07:00
test_shell_v2.py do_image_import: fix argument retrieval 2023-04-18 03:21:03 +02:00
test_tags.py Add request id to returned objects 2017-01-20 14:50:42 +05:30
test_tasks.py Add request id to returned objects 2017-01-20 14:50:42 +05:30
test_versions.py Add versions list function 2015-11-10 10:28:32 +08:00