update README.rst,add args "service_type" when getting endpoints.
Change-Id: Ib7e05f8eaff84e26869ec1a098ea98edd213018b
This commit is contained in:
parent
d6d7386fad
commit
ed3a2bb722
1
AUTHORS
1
AUTHORS
@ -49,6 +49,7 @@ Russell Bryant <rbryant@redhat.com>
|
||||
Sandy Walsh <sandy@darksecretsoftware.com>
|
||||
Unmesh Gurjar <unmesh.gurjar@vertex.co.in>
|
||||
William Wolf <throughnothing@gmail.com>
|
||||
Yaguang Tang <heut2008@gmail.com>
|
||||
Zhongyue Luo <lzyeval@gmail.com>
|
||||
Scott Moser <smoser@ubuntu.com>
|
||||
Paul Voccio <paul@substation9.com>
|
||||
|
20
README.rst
20
README.rst
@ -233,29 +233,11 @@ Python API
|
||||
|
||||
__ http://packages.python.org/python-novaclient/
|
||||
|
||||
By way of a quick-start::
|
||||
|
||||
>>> import novaclient
|
||||
>>> nt = novaclient.OpenStack(USERNAME, PASSWORD, PROJECT_ID [, AUTH_URL])
|
||||
>>> nt.flavors.list()
|
||||
[...]
|
||||
>>> nt.servers.list()
|
||||
[...]
|
||||
>>> s = nt.servers.create(image=2, flavor=1, name='myserver')
|
||||
|
||||
... time passes ...
|
||||
|
||||
>>> s.reboot()
|
||||
|
||||
... time passes ...
|
||||
|
||||
>>> s.delete()
|
||||
|
||||
Quick-start using keystone::
|
||||
|
||||
# use v2.0 auth with http://example.com:5000/v2.0/")
|
||||
>>> from novaclient.v1_1 import client
|
||||
>>> nt = client.Client(USER, PASS, TENANT, AUTH_URL)
|
||||
>>> nt = client.Client(USER, PASS, TENANT, AUTH_URL, service_type="compute")
|
||||
>>> nt.flavors.list()
|
||||
[...]
|
||||
>>> nt.servers.list()
|
||||
|
Loading…
x
Reference in New Issue
Block a user