Merge trunk and apply some sphinx love.
This commit is contained in:
BIN
doc/source/_templates/.DS_Store
vendored
Normal file
BIN
doc/source/_templates/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -27,7 +27,13 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo',
|
|||||||
todo_include_todos = True
|
todo_include_todos = True
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
# Changing the path so that the Hudson build output contains GA code and the source
|
||||||
|
# docs do not contain the code so local, offline sphinx builds are "clean."
|
||||||
|
templates_path = []
|
||||||
|
if os.getenv('HUDSON_PUBLISH_DOCS'):
|
||||||
|
templates_path = ['_ga', '_templates']
|
||||||
|
else:
|
||||||
|
templates_path = ['_templates']
|
||||||
|
|
||||||
# The suffix of source filenames.
|
# The suffix of source filenames.
|
||||||
source_suffix = '.rst'
|
source_suffix = '.rst'
|
||||||
|
|||||||
@@ -33,14 +33,15 @@ DEFAULT_SECRET_KEY = 'admin'
|
|||||||
|
|
||||||
class UserInfo(object):
|
class UserInfo(object):
|
||||||
"""
|
"""
|
||||||
Information about a Nova user, as parsed through SAX
|
Information about a Nova user, as parsed through SAX.
|
||||||
fields include:
|
|
||||||
username
|
**Fields Include**
|
||||||
accesskey
|
|
||||||
secretkey
|
* username
|
||||||
|
* accesskey
|
||||||
|
* secretkey
|
||||||
|
* file (optional) containing zip of X509 cert & rc file
|
||||||
|
|
||||||
and an optional field containing a zip with X509 cert & rc
|
|
||||||
file
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, connection=None, username=None, endpoint=None):
|
def __init__(self, connection=None, username=None, endpoint=None):
|
||||||
@@ -68,9 +69,13 @@ class UserInfo(object):
|
|||||||
class UserRole(object):
|
class UserRole(object):
|
||||||
"""
|
"""
|
||||||
Information about a Nova user's role, as parsed through SAX.
|
Information about a Nova user's role, as parsed through SAX.
|
||||||
Fields include:
|
|
||||||
role
|
**Fields include**
|
||||||
|
|
||||||
|
* role
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, connection=None):
|
def __init__(self, connection=None):
|
||||||
self.connection = connection
|
self.connection = connection
|
||||||
self.role = None
|
self.role = None
|
||||||
@@ -90,12 +95,15 @@ class UserRole(object):
|
|||||||
|
|
||||||
class ProjectInfo(object):
|
class ProjectInfo(object):
|
||||||
"""
|
"""
|
||||||
Information about a Nova project, as parsed through SAX
|
Information about a Nova project, as parsed through SAX.
|
||||||
Fields include:
|
|
||||||
projectname
|
**Fields include**
|
||||||
description
|
|
||||||
projectManagerId
|
* projectname
|
||||||
memberIds
|
* description
|
||||||
|
* projectManagerId
|
||||||
|
* memberIds
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, connection=None):
|
def __init__(self, connection=None):
|
||||||
@@ -127,8 +135,11 @@ class ProjectInfo(object):
|
|||||||
class ProjectMember(object):
|
class ProjectMember(object):
|
||||||
"""
|
"""
|
||||||
Information about a Nova project member, as parsed through SAX.
|
Information about a Nova project member, as parsed through SAX.
|
||||||
Fields include:
|
|
||||||
memberId
|
**Fields include**
|
||||||
|
|
||||||
|
* memberId
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, connection=None):
|
def __init__(self, connection=None):
|
||||||
@@ -150,14 +161,18 @@ class ProjectMember(object):
|
|||||||
|
|
||||||
class HostInfo(object):
|
class HostInfo(object):
|
||||||
"""
|
"""
|
||||||
Information about a Nova Host, as parsed through SAX:
|
Information about a Nova Host, as parsed through SAX.
|
||||||
Disk stats
|
|
||||||
Running Instances
|
**Fields Include**
|
||||||
Memory stats
|
|
||||||
CPU stats
|
* Disk stats
|
||||||
Network address info
|
* Running Instances
|
||||||
Firewall info
|
* Memory stats
|
||||||
Bridge and devices
|
* CPU stats
|
||||||
|
* Network address info
|
||||||
|
* Firewall info
|
||||||
|
* Bridge and devices
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, connection=None):
|
def __init__(self, connection=None):
|
||||||
@@ -257,9 +272,12 @@ class NovaAdminClient(object):
|
|||||||
[('item', UserRole)])
|
[('item', UserRole)])
|
||||||
|
|
||||||
def get_user_roles(self, user, project=None):
|
def get_user_roles(self, user, project=None):
|
||||||
"""Returns a list of roles for the given user. Omitting project will
|
"""Returns a list of roles for the given user.
|
||||||
return any global roles that the user has. Specifying project will
|
|
||||||
return only project specific roles."""
|
Omitting project will return any global roles that the user has.
|
||||||
|
Specifying project will return only project specific roles.
|
||||||
|
|
||||||
|
"""
|
||||||
params = {'User': user}
|
params = {'User': user}
|
||||||
if project:
|
if project:
|
||||||
params['Project'] = project
|
params['Project'] = project
|
||||||
|
|||||||
@@ -213,10 +213,10 @@ def deferredToThread(f):
|
|||||||
|
|
||||||
def xhtml_escape(value):
|
def xhtml_escape(value):
|
||||||
"""Escapes a string so it is valid within XML or XHTML.
|
"""Escapes a string so it is valid within XML or XHTML.
|
||||||
|
|
||||||
Code is directly from the utf8 function in
|
Code is directly from the utf8 function in
|
||||||
http://github.com/facebook/tornado/blob/master/tornado/escape.py
|
http://github.com/facebook/tornado/blob/master/tornado/escape.py
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return saxutils.escape(value, {'"': """})
|
return saxutils.escape(value, {'"': """})
|
||||||
|
|
||||||
@@ -232,4 +232,3 @@ def utf8(value):
|
|||||||
return value.encode("utf-8")
|
return value.encode("utf-8")
|
||||||
assert isinstance(value, str)
|
assert isinstance(value, str)
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user