summaryrefslogtreecommitdiff
path: root/doc/examples/recordset_crud.py
diff options
context:
space:
mode:
authorClenimar Filemon <clenimar.filemon@gmail.com>2016-05-06 21:06:04 -0300
committerClenimar Filemon <clenimar.filemon@gmail.com>2016-05-06 21:06:04 -0300
commit69f4597bf1232bf4c3a37f2516a48fd185a1d0cd (patch)
tree7e224dd95d392bc8198d0465da788f989b644f30 /doc/examples/recordset_crud.py
parent5ac063eba3354f013ad0ade963c6fb31fec3b66c (diff)
downloadpython-designateclient-69f4597bf1232bf4c3a37f2516a48fd185a1d0cd.tar.gz
Update doc examples to use keystoneauth
As keystoneclient's Session and auth plugins have been deprecated in favor of keystoneauth, the documentation examples must reflect that. This patch updates all examples in order to show keystoneauth Session usage instead of deprecated keystoneclient Session. Also, the python API bindings were updated too. Change-Id: I4b64fee4f526cc5b4a5e36cc8edb61164ceded51
Diffstat (limited to 'doc/examples/recordset_crud.py')
-rw-r--r--doc/examples/recordset_crud.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/examples/recordset_crud.py b/doc/examples/recordset_crud.py
index 35f554f..f00e41e 100644
--- a/doc/examples/recordset_crud.py
+++ b/doc/examples/recordset_crud.py
@@ -4,8 +4,8 @@ from designateclient.v2 import client
from designateclient import exceptions
from designateclient import shell
-from keystoneclient.auth.identity import generic
-from keystoneclient import session as keystone_session
+from keystoneauth1.identity import generic
+from keystoneauth1 import session as keystone_session
logging.basicConfig(level='DEBUG')
@@ -14,7 +14,9 @@ auth = generic.Password(
auth_url=shell.env('OS_AUTH_URL'),
username=shell.env('OS_USERNAME'),
password=shell.env('OS_PASSWORD'),
- tenant_name=shell.env('OS_TENANT_NAME'))
+ project_name=shell.env('OS_PROJECT_NAME'),
+ project_domain_id='default',
+ user_domain_id='default')
session = keystone_session.Session(auth=auth)