Fixed autodoc can't import/find class error
The right module name should be `novaclient.v1_1.servers' instead of `novaclient'. Similar fix on `images', `flavors' and `exceptions'. Removed `ipgroups' and `backup_schedules' since they do not exist any more. Closes-Bug: #1056478 Change-Id: Id35f9c275fb36f3651a0bb2b0eb03c43f0aaeec1
This commit is contained in:
parent
ffc479752a
commit
f3d6f1d22c
@ -9,39 +9,14 @@ The :mod:`novaclient` Python API
|
||||
Usage
|
||||
-----
|
||||
|
||||
First create an instance of :class:`OpenStack` with your credentials::
|
||||
First create a client instance with your credentials::
|
||||
|
||||
>>> from novaclient import OpenStack
|
||||
>>> nova = OpenStack(USERNAME, PASSWORD, AUTH_URL)
|
||||
>>> from novaclient.client import Client
|
||||
>>> nova = Client(VERSION, USERNAME, PASSWORD, PROJECT_ID, AUTH_URL)
|
||||
|
||||
Then call methods on the :class:`OpenStack` object:
|
||||
Here ``VERSION`` can be: ``1.1``, ``2`` and ``3``.
|
||||
|
||||
.. class:: OpenStack
|
||||
|
||||
.. attribute:: backup_schedules
|
||||
|
||||
A :class:`BackupScheduleManager` -- manage automatic backup images.
|
||||
|
||||
.. attribute:: flavors
|
||||
|
||||
A :class:`FlavorManager` -- query available "flavors" (hardware
|
||||
configurations).
|
||||
|
||||
.. attribute:: images
|
||||
|
||||
An :class:`ImageManager` -- query and create server disk images.
|
||||
|
||||
.. attribute:: ipgroups
|
||||
|
||||
A :class:`IPGroupManager` -- manage shared public IP addresses.
|
||||
|
||||
.. attribute:: servers
|
||||
|
||||
A :class:`ServerManager` -- start, stop, and manage virtual machines.
|
||||
|
||||
.. automethod:: authenticate
|
||||
|
||||
For example::
|
||||
Then call methods on its managers::
|
||||
|
||||
>>> nova.servers.list()
|
||||
[<Server: buildslave-ubuntu-9.10>]
|
||||
@ -59,6 +34,9 @@ For example::
|
||||
>>> nova.servers.create("my-server", flavor=fl)
|
||||
<Server: my-server>
|
||||
|
||||
Reference
|
||||
---------
|
||||
|
||||
For more information, see the reference:
|
||||
|
||||
.. toctree::
|
||||
|
@ -18,6 +18,14 @@ import sys
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.append(os.path.abspath('.'))
|
||||
import os
|
||||
import sys
|
||||
|
||||
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
ROOT = os.path.abspath(os.path.join(BASE_DIR, "..", ".."))
|
||||
|
||||
sys.path.insert(0, ROOT)
|
||||
sys.path.insert(0, BASE_DIR)
|
||||
|
||||
# -- General configuration ----------------------------------------------------
|
||||
|
||||
@ -130,7 +138,7 @@ html_theme = 'default'
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
# html_static_path = ['_static']
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
|
@ -1,60 +0,0 @@
|
||||
Backup schedules
|
||||
================
|
||||
|
||||
.. currentmodule:: novaclient
|
||||
|
||||
Rackspace allows scheduling of weekly and/or daily backups for virtual
|
||||
servers. You can access these backup schedules either off the API object as
|
||||
:attr:`OpenStack.backup_schedules`, or directly off a particular
|
||||
:class:`Server` instance as :attr:`Server.backup_schedule`.
|
||||
|
||||
Classes
|
||||
-------
|
||||
|
||||
.. autoclass:: BackupScheduleManager
|
||||
:members: create, delete, update, get
|
||||
|
||||
.. autoclass:: BackupSchedule
|
||||
:members: update, delete
|
||||
|
||||
.. attribute:: enabled
|
||||
|
||||
Is this backup enabled? (boolean)
|
||||
|
||||
.. attribute:: weekly
|
||||
|
||||
The day of week upon which to perform a weekly backup.
|
||||
|
||||
.. attribute:: daily
|
||||
|
||||
The daily time period during which to perform a daily backup.
|
||||
|
||||
Constants
|
||||
---------
|
||||
|
||||
Constants for selecting weekly backup days:
|
||||
|
||||
.. data:: BACKUP_WEEKLY_DISABLED
|
||||
.. data:: BACKUP_WEEKLY_SUNDAY
|
||||
.. data:: BACKUP_WEEKLY_MONDAY
|
||||
.. data:: BACKUP_WEEKLY_TUESDAY
|
||||
.. data:: BACKUP_WEEKLY_WEDNESDA
|
||||
.. data:: BACKUP_WEEKLY_THURSDAY
|
||||
.. data:: BACKUP_WEEKLY_FRIDAY
|
||||
.. data:: BACKUP_WEEKLY_SATURDAY
|
||||
|
||||
Constants for selecting hourly backup windows:
|
||||
|
||||
.. data:: BACKUP_DAILY_DISABLED
|
||||
.. data:: BACKUP_DAILY_H_0000_0200
|
||||
.. data:: BACKUP_DAILY_H_0200_0400
|
||||
.. data:: BACKUP_DAILY_H_0400_0600
|
||||
.. data:: BACKUP_DAILY_H_0600_0800
|
||||
.. data:: BACKUP_DAILY_H_0800_1000
|
||||
.. data:: BACKUP_DAILY_H_1000_1200
|
||||
.. data:: BACKUP_DAILY_H_1200_1400
|
||||
.. data:: BACKUP_DAILY_H_1400_1600
|
||||
.. data:: BACKUP_DAILY_H_1600_1800
|
||||
.. data:: BACKUP_DAILY_H_1800_2000
|
||||
.. data:: BACKUP_DAILY_H_2000_2200
|
||||
.. data:: BACKUP_DAILY_H_2200_0000
|
@ -1,14 +1,8 @@
|
||||
Exceptions
|
||||
==========
|
||||
|
||||
.. currentmodule:: novaclient
|
||||
|
||||
Exceptions
|
||||
----------
|
||||
|
||||
Exceptions that the API might throw:
|
||||
|
||||
.. automodule:: novaclient
|
||||
:members: OpenStackException, BadRequest, Unauthorized, Forbidden,
|
||||
NotFound, OverLimit
|
||||
|
||||
.. automodule:: novaclient.exceptions
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
:noindex:
|
||||
|
@ -10,7 +10,7 @@ From Rackspace's API documentation:
|
||||
Classes
|
||||
-------
|
||||
|
||||
.. currentmodule:: novaclient
|
||||
.. currentmodule:: novaclient.v1_1.flavors
|
||||
|
||||
.. autoclass:: FlavorManager
|
||||
:members: get, list, find, findall
|
||||
|
@ -1,7 +1,7 @@
|
||||
Images
|
||||
======
|
||||
|
||||
.. currentmodule:: novaclient
|
||||
.. currentmodule:: novaclient.v1_1.images
|
||||
|
||||
An "image" is a snapshot from which you can create new server instances.
|
||||
|
||||
@ -18,7 +18,7 @@ Classes
|
||||
-------
|
||||
|
||||
.. autoclass:: ImageManager
|
||||
:members: get, list, find, findall, create, delete
|
||||
:members: get, list, find, findall, delete
|
||||
|
||||
.. autoclass:: Image
|
||||
:members: delete
|
||||
|
@ -1,12 +1,10 @@
|
||||
API Reference
|
||||
=============
|
||||
Version 1.1, Version 2 API Reference
|
||||
=======================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
backup_schedules
|
||||
|
||||
exceptions
|
||||
flavors
|
||||
images
|
||||
ipgroups
|
||||
servers
|
||||
servers
|
||||
|
@ -1,46 +0,0 @@
|
||||
Shared IP addresses
|
||||
===================
|
||||
|
||||
From the Rackspace API guide:
|
||||
|
||||
Public IP addresses can be shared across multiple servers for use in
|
||||
various high availability scenarios. When an IP address is shared to
|
||||
another server, the cloud network restrictions are modified to allow each
|
||||
server to listen to and respond on that IP address (you may optionally
|
||||
specify that the target server network configuration be modified). Shared
|
||||
IP addresses can be used with many standard heartbeat facilities (e.g.
|
||||
``keepalived``) that monitor for failure and manage IP failover.
|
||||
|
||||
A shared IP group is a collection of servers that can share IPs with other
|
||||
members of the group. Any server in a group can share one or more public
|
||||
IPs with any other server in the group. With the exception of the first
|
||||
server in a shared IP group, servers must be launched into shared IP
|
||||
groups. A server may only be a member of one shared IP group.
|
||||
|
||||
.. seealso::
|
||||
|
||||
Use :meth:`Server.share_ip` and `Server.unshare_ip` to share and unshare
|
||||
IPs in a group.
|
||||
|
||||
Classes
|
||||
-------
|
||||
|
||||
.. currentmodule:: novaclient
|
||||
|
||||
.. autoclass:: IPGroupManager
|
||||
:members: get, list, find, findall, create, delete
|
||||
|
||||
.. autoclass:: IPGroup
|
||||
:members: delete
|
||||
|
||||
.. attribute:: id
|
||||
|
||||
Shared group ID.
|
||||
|
||||
.. attribute:: name
|
||||
|
||||
Name of the group.
|
||||
|
||||
.. attribute:: servers
|
||||
|
||||
A list of server IDs in this group.
|
@ -6,68 +6,8 @@ A virtual machine instance.
|
||||
Classes
|
||||
-------
|
||||
|
||||
.. currentmodule:: novaclient
|
||||
|
||||
.. autoclass:: ServerManager
|
||||
:members: get, list, find, findall, create, update, delete, share_ip,
|
||||
unshare_ip, reboot, rebuild, resize, confirm_resize,
|
||||
revert_resize
|
||||
|
||||
.. autoclass:: Server
|
||||
:members: update, delete, share_ip, unshare_ip, reboot, rebuild, resize,
|
||||
confirm_resize, revert_resize
|
||||
|
||||
.. attribute:: id
|
||||
|
||||
This server's ID.
|
||||
|
||||
.. attribute:: name
|
||||
|
||||
The name you gave the server when you booted it.
|
||||
|
||||
.. attribute:: imageId
|
||||
|
||||
The :class:`Image` this server was booted with.
|
||||
|
||||
.. attribute:: flavorId
|
||||
|
||||
This server's current :class:`Flavor`.
|
||||
|
||||
.. attribute:: hostId
|
||||
|
||||
Rackspace doesn't document this value. It appears to be SHA1 hash.
|
||||
|
||||
.. attribute:: status
|
||||
|
||||
The server's status (``BOOTING``, ``ACTIVE``, etc).
|
||||
|
||||
.. attribute:: progress
|
||||
|
||||
When booting, resizing, updating, etc., this will be set to a
|
||||
value between 0 and 100 giving a rough estimate of the progress
|
||||
of the current operation.
|
||||
|
||||
.. attribute:: addresses
|
||||
|
||||
The public and private IP addresses of this server. This'll be a dict
|
||||
of the form::
|
||||
|
||||
{
|
||||
"public" : ["67.23.10.138"],
|
||||
"private" : ["10.176.42.19"]
|
||||
}
|
||||
|
||||
You *can* get more than one public/private IP provisioned, but not
|
||||
directly from the API; you'll need to open a support ticket.
|
||||
|
||||
.. attribute:: metadata
|
||||
|
||||
The metadata dict you gave when creating the server.
|
||||
|
||||
Constants
|
||||
---------
|
||||
|
||||
Reboot types:
|
||||
|
||||
.. data:: REBOOT_SOFT
|
||||
.. data:: REBOOT_HARD
|
||||
.. automodule:: novaclient.v1_1.servers
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
:noindex:
|
||||
|
Loading…
x
Reference in New Issue
Block a user