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
 | 
			
		||||
 | 
			
		||||
# 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.
 | 
			
		||||
source_suffix = '.rst'
 | 
			
		||||
 
 | 
			
		||||
@@ -33,14 +33,15 @@ DEFAULT_SECRET_KEY = 'admin'
 | 
			
		||||
 | 
			
		||||
class UserInfo(object):
 | 
			
		||||
    """
 | 
			
		||||
    Information about a Nova user, as parsed through SAX
 | 
			
		||||
    fields include:
 | 
			
		||||
        username
 | 
			
		||||
        accesskey
 | 
			
		||||
        secretkey
 | 
			
		||||
    Information about a Nova user, as parsed through SAX.
 | 
			
		||||
 | 
			
		||||
    **Fields Include**
 | 
			
		||||
 | 
			
		||||
    * 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):
 | 
			
		||||
@@ -68,9 +69,13 @@ class UserInfo(object):
 | 
			
		||||
class UserRole(object):
 | 
			
		||||
    """
 | 
			
		||||
    Information about a Nova user's role, as parsed through SAX.
 | 
			
		||||
    Fields include:
 | 
			
		||||
        role
 | 
			
		||||
 | 
			
		||||
    **Fields include**
 | 
			
		||||
 | 
			
		||||
    * role
 | 
			
		||||
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
    def __init__(self, connection=None):
 | 
			
		||||
        self.connection = connection
 | 
			
		||||
        self.role = None
 | 
			
		||||
@@ -90,12 +95,15 @@ class UserRole(object):
 | 
			
		||||
 | 
			
		||||
class ProjectInfo(object):
 | 
			
		||||
    """
 | 
			
		||||
    Information about a Nova project, as parsed through SAX
 | 
			
		||||
    Fields include:
 | 
			
		||||
        projectname
 | 
			
		||||
        description
 | 
			
		||||
        projectManagerId
 | 
			
		||||
        memberIds
 | 
			
		||||
    Information about a Nova project, as parsed through SAX.
 | 
			
		||||
 | 
			
		||||
    **Fields include**
 | 
			
		||||
 | 
			
		||||
    * projectname
 | 
			
		||||
    * description
 | 
			
		||||
    * projectManagerId
 | 
			
		||||
    * memberIds
 | 
			
		||||
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
    def __init__(self, connection=None):
 | 
			
		||||
@@ -127,8 +135,11 @@ class ProjectInfo(object):
 | 
			
		||||
class ProjectMember(object):
 | 
			
		||||
    """
 | 
			
		||||
    Information about a Nova project member, as parsed through SAX.
 | 
			
		||||
    Fields include:
 | 
			
		||||
        memberId
 | 
			
		||||
 | 
			
		||||
    **Fields include**
 | 
			
		||||
 | 
			
		||||
    * memberId
 | 
			
		||||
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
    def __init__(self, connection=None):
 | 
			
		||||
@@ -150,14 +161,18 @@ class ProjectMember(object):
 | 
			
		||||
 | 
			
		||||
class HostInfo(object):
 | 
			
		||||
    """
 | 
			
		||||
    Information about a Nova Host, as parsed through SAX:
 | 
			
		||||
        Disk stats
 | 
			
		||||
        Running Instances
 | 
			
		||||
        Memory stats
 | 
			
		||||
        CPU stats
 | 
			
		||||
        Network address info
 | 
			
		||||
        Firewall info
 | 
			
		||||
        Bridge and devices
 | 
			
		||||
    Information about a Nova Host, as parsed through SAX.
 | 
			
		||||
 | 
			
		||||
    **Fields Include**
 | 
			
		||||
 | 
			
		||||
    * Disk stats
 | 
			
		||||
    * Running Instances
 | 
			
		||||
    * Memory stats
 | 
			
		||||
    * CPU stats
 | 
			
		||||
    * Network address info
 | 
			
		||||
    * Firewall info
 | 
			
		||||
    * Bridge and devices
 | 
			
		||||
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
    def __init__(self, connection=None):
 | 
			
		||||
@@ -257,9 +272,12 @@ class NovaAdminClient(object):
 | 
			
		||||
                                     [('item', UserRole)])
 | 
			
		||||
 | 
			
		||||
    def get_user_roles(self, user, project=None):
 | 
			
		||||
        """Returns a list of roles for the given user. Omitting project will
 | 
			
		||||
        return any global roles that the user has. Specifying project will
 | 
			
		||||
        return only project specific roles."""
 | 
			
		||||
        """Returns a list of roles for the given user.
 | 
			
		||||
        
 | 
			
		||||
        Omitting project will return any global roles that the user has.
 | 
			
		||||
        Specifying project will return only project specific roles.
 | 
			
		||||
        
 | 
			
		||||
        """
 | 
			
		||||
        params = {'User': user}
 | 
			
		||||
        if project:
 | 
			
		||||
            params['Project'] = project
 | 
			
		||||
 
 | 
			
		||||
@@ -213,10 +213,10 @@ def deferredToThread(f):
 | 
			
		||||
 | 
			
		||||
def xhtml_escape(value):
 | 
			
		||||
    """Escapes a string so it is valid within XML or XHTML.
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    Code is directly from the utf8 function in
 | 
			
		||||
    http://github.com/facebook/tornado/blob/master/tornado/escape.py
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    """
 | 
			
		||||
    return saxutils.escape(value, {'"': """})
 | 
			
		||||
 | 
			
		||||
@@ -232,4 +232,3 @@ def utf8(value):
 | 
			
		||||
        return value.encode("utf-8")
 | 
			
		||||
    assert isinstance(value, str)
 | 
			
		||||
    return value
 | 
			
		||||
    
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user