Merge "update README.rst,add args "service_type" when getting endpoints."

This commit is contained in:
Jenkins 2012-04-26 19:17:08 +00:00 committed by Gerrit Code Review
commit cdfd1da4d0
2 changed files with 2 additions and 19 deletions

View File

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

View File

@ -234,29 +234,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()