User Guide: Fix auth script
Fix script, we need to use env.get to allow not-set environment value. Change-Id: I61a36bfc2b5fbf412edbbdef973bb09880aa9967 Closes-Bug: #1315763
This commit is contained in:
parent
d87badc476
commit
ec7be5004a
@ -57,8 +57,8 @@ nova = nvclient.Client(auth_url=env['OS_AUTH_URL'],
|
||||
<programlisting language="python">import novaclient.auth_plugin
|
||||
import novaclient.v1_1.client as nvclient
|
||||
from os import environ as env
|
||||
auth_system = os.get('OS_AUTH_SYSTEM')
|
||||
if auth_system and auth_system != "keystone":
|
||||
auth_system = env.get('OS_AUTH_SYSTEM', 'keystone')
|
||||
if auth_system != "keystone":
|
||||
auth_plugin = novaclient.auth_plugin.load_plugin(auth_system)
|
||||
else:
|
||||
auth_plugin = None
|
||||
|
Loading…
Reference in New Issue
Block a user