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
This commit is contained in:
Lucas H. Xu 2015-06-10 12:42:31 -04:00
parent 9553773fba
commit 58a5ec66cf
1 changed files with 12 additions and 0 deletions

View File

@ -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
=================