Code Review
/
doctor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
add image code
[doctor.git]
/
tests
/
identity_auth.py
diff --git
a/tests/identity_auth.py
b/tests/identity_auth.py
index
4726ca3
..
0031cae
100644
(file)
--- a/
tests/identity_auth.py
+++ b/
tests/identity_auth.py
@@
-11,6
+11,7
@@
import os
from keystoneauth1.identity import v2
from keystoneauth1.identity import v3
from keystoneauth1.identity import v2
from keystoneauth1.identity import v3
+from keystoneauth1 import session
def get_identity_auth():
def get_identity_auth():
@@
-32,3
+33,10
@@
def get_identity_auth():
username=username,
password=password,
tenant_name=project_name)
username=username,
password=password,
tenant_name=project_name)
+
+
+def get_session(auth=None):
+ """Get a user credentials auth session."""
+ if auth is None:
+ auth = get_identity_auth()
+ return session.Session(auth=auth)