novaclient.shell fails with OS_AUTH_TYPE=v3kerberos
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| python-novaclient |
New
|
Undecided
|
Unassigned | ||
Bug Description
When OS_AUTH_TYPE is set to v3kerberos or --os-auth-
ERROR (AttributeError): 'Namespace' object has no attribute 'os_user_id'
This is because keystoneauth1 module does not add options unnecessary with kerberos to argparse
The patch below allowed me to use v3kerberos with python-novaclient 10.1.0
--- python-
+++ python-
@@ -513,24 +513,27 @@
- os_username = args.os_username
- os_user_id = args.os_user_id
+ os_username = getattr(args, 'os_username', None)
+ os_user_id = getattr(args, 'os_user_id', None)
args, 'os_project_name', getattr(args, 'os_tenant_name', None))
args, 'os_project_id', getattr(args, 'os_tenant_id', None))
+ os_auth_type = getattr(args, 'os_auth_type', 'password')
if "v2.0" not in os_auth_url:
# NOTE(andreykuri
# be more user-friendly, i.e provide default values for domains
- if (not args.os_
- not args.os_
- setattr(args, "os_project_
- if not args.os_
- setattr(args, "os_user_
+ if hasattr(args, 'os_project_
+ if (not args.os_
+ not args.os_
+ setattr(args, "os_project_
+ if hasattr(args, 'os_user_
+ if not args.os_
+ setattr(args, "os_user_
@@ -579,7 +582,7 @@
# for os_username or os_password but for compatibility it is not.
if must_auth and not skip_auth:
- if not os_username and not os_user_id:
+ if os_auth_type != 'v3kerberos' and not os_username and not os_user_id:
