summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLucas H. Xu <xuh@bu.edu>2015-06-10 12:42:31 -0400
committerLucas H. Xu <xuh@bu.edu>2015-06-12 11:38:02 -0400
commit58a5ec66cfa224c5446ce83d627cb93b2327e356 (patch)
tree765672e5a3afe646ea637f3bd75eab08ebf01027 /doc
parent9553773fba6c4856581883ceece6861e34a87f2f (diff)
downloadpython-neutronclient-58a5ec66cfa224c5446ce83d627cb93b2327e356.tar.gz
Add alternative login description in neutronclient docs
A way to test it is to follow the description and create a neutron client using the alternative way Make changes based on Akihiro comments Add extra colon in line 19 Change-Id: I2f7a5a3e8f7386d24d258303b3056615da8612ad
Diffstat (limited to 'doc')
-rw-r--r--doc/source/index.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 612a41e..9e032df 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -15,6 +15,18 @@ In order to use the python neutron client directly, you must first obtain an aut
>>> network_id = networks['networks'][0]['id']
>>> neutron.delete_network(network_id)
+Alternatively, if you have a username and password, authentication is done
+against the public endpoint. You must also specify a tenant that is associated
+with the user::
+
+ >>> from neutronclient.v2_0 import client
+ >>> username='adminUser'
+ >>> password='secretword'
+ >>> tenant_name='openstackDemo'
+ >>> auth_url='http://192.168.206.130:5000/v2.0'
+ >>> neutron = client.Client(username=username, password=password,
+ ... tenant_name=tenant_name, auth_url=auth_url)
+ >>>nets = neutron.list_networks()
Command-line Tool
=================