mirror of
https://github.com/ovh/python-ovh.git
synced 2026-01-16 23:00:21 +00:00
remove obsolete runabove example
Signed-off-by: Jean-Tiare Le Bigot <jean-tiare.le-bigot@corp.ovh.com>
This commit is contained in:
parent
7631aee6e0
commit
cc288e86f0
1 changed files with 0 additions and 36 deletions
36
README.rst
36
README.rst
|
|
@ -300,42 +300,6 @@ pretty cool library to pretty print tabular data in a clean and easy way.
|
|||
|
||||
>>> pip install tabulate
|
||||
|
||||
List Runabove's instance
|
||||
------------------------
|
||||
|
||||
This example assumes an existing Configuration_ with valid ``application_key``,
|
||||
``application_secret`` and ``consumer_key``.
|
||||
|
||||
.. code:: python
|
||||
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
import ovh
|
||||
from tabulate import tabulate
|
||||
|
||||
# visit https://api.runabove.com/createApp/ to create your application's credentials
|
||||
client = ovh.Client(endpoint='runabove-ca')
|
||||
|
||||
# get list of all instances
|
||||
instances = client.get('/instance')
|
||||
|
||||
# pretty print instances status
|
||||
table = []
|
||||
for instance in instances:
|
||||
table.append([
|
||||
instance['name'],
|
||||
instance['ip'],
|
||||
instance['region'],
|
||||
instance['status'],
|
||||
])
|
||||
print tabulate(table, headers=['Name', 'IP', 'Region', 'Status'])
|
||||
|
||||
Before running this example, make sure you have the
|
||||
`tabulate <https://pypi.python.org/pypi/tabulate>`_ library installed. It's a
|
||||
pretty cool library to pretty print tabular data in a clean and easy way.
|
||||
|
||||
>>> pip install tabulate
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue