Clarify API extension description of Nova API
On Nova API, we can see two names for each API extension. The one is
"Name", the other is "Alias". The "Name" is represented with camelcase
and the "Alias" is done with characters and hyphens:
$ nova list-extensions
+--------------+-----------------------+------------------+---------+
| Name | Summary | Alias | Updated |
+--------------+-----------------------+------------------+---------+
| AdminActions | Enable admin-only ... | os-admin-actions | ... |
| Agents | Agents support. | os-agents | ... |
| ConsoleOutput| Console log output... | os-console-output| ... |
| Consoles | Interactive Console.. | os-consoles | ... |
In Tempest, we can select API extensions what we test and it should be
based on "Alias", because on Nova side we have been a lot stricter about
format/uniqueness for the alias which is seen as the canonical name.
This patch clarifies it.
Change-Id: I3e753c81182af83e01ad3a1f2eb9782c8abb6f50
diff --git a/tempest/cmd/verify_tempest_config.py b/tempest/cmd/verify_tempest_config.py
index 7b2e60b..3bf05e1 100755
--- a/tempest/cmd/verify_tempest_config.py
+++ b/tempest/cmd/verify_tempest_config.py
@@ -160,11 +160,10 @@
extensions_client = get_extension_client(os, service)
__, resp = extensions_client.list_extensions()
if isinstance(resp, dict):
- # Neutron's extension 'name' field has is not a single word (it has
- # spaces in the string) Since that can't be used for list option the
- # api_extension option in the network-feature-enabled group uses alias
- # instead of name.
- if service == 'neutron':
+ # For both Nova and Neutron we use the alias name rather than the
+ # 'name' field because the alias is considered to be the canonical
+ # name.
+ if service in ['nova', 'nova_v3', 'neutron']:
extensions = map(lambda x: x['alias'], resp['extensions'])
elif service == 'swift':
# Remove Swift general information from extensions list