summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
Diffstat (limited to 'nova')
-rw-r--r--nova/auth/fakeldap.py10
-rw-r--r--nova/compute/manager.py24
-rw-r--r--nova/virt/connection.py11
3 files changed, 35 insertions, 10 deletions
diff --git a/nova/auth/fakeldap.py b/nova/auth/fakeldap.py
index 1a49b73fe..176a00f06 100644
--- a/nova/auth/fakeldap.py
+++ b/nova/auth/fakeldap.py
@@ -15,12 +15,14 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
+
"""
-Fake LDAP server for test harnesses.
+Fake LDAP server for test harness, backs to ReDIS.
This class does very little error checking, and knows nothing about ldap
-class definitions. It implements the minimum emulation of the python ldap
+class definitions. It implements the minimum emulation of the python ldap
library to work with nova.
+
"""
import json
@@ -77,8 +79,8 @@ def initialize(_uri):
def _match_query(query, attrs):
"""Match an ldap query to an attribute dictionary.
- &, |, and ! are supported in the query. No syntax checking is performed,
- so malformed querys will not work correctly.
+ The characters &, |, and ! are supported in the query. No syntax checking
+ is performed, so malformed querys will not work correctly.
"""
# cut off the parentheses
inner = query[1:-1]
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index 574feec7c..3346d1299 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -17,7 +17,20 @@
# under the License.
"""
-Handles all code relating to instances (guest vms)
+Handles all processes relating to instances (guest vms).
+
+The :py:class:`ComputeManager` class is a :py:class:`nova.manager.Manager` that
+handles RPC calls relating to creating instances. It is responsible for
+building a disk image, launching it via the underlying virtualization driver,
+responding to calls to check it state, attaching persistent as well as termination.
+
+**Related Flags**
+
+:instances_path: Where instances are kept on disk
+:compute_driver: Name of class that is used to handle virtualization, loaded
+ by :func:`nova.utils.import_object`
+:volume_manager: Name of class that handles persistent storage, loaded by
+ :func:`nova.utils.import_object`
"""
import datetime
@@ -40,12 +53,12 @@ flags.DEFINE_string('compute_driver', 'nova.virt.connection.get_connection',
class ComputeManager(manager.Manager):
- """
- Manages the running instances.
- """
+ """Manages the running instances from creation to destruction."""
+
def __init__(self, compute_driver=None, *args, **kwargs):
"""Load configuration options and connect to the hypervisor."""
# TODO(vish): sync driver creation logic with the rest of the system
+ # and redocument the module docstring
if not compute_driver:
compute_driver = FLAGS.compute_driver
self.driver = utils.import_object(compute_driver)
@@ -54,7 +67,7 @@ class ComputeManager(manager.Manager):
super(ComputeManager, self).__init__(*args, **kwargs)
def _update_state(self, context, instance_id):
- """Update the state of an instance from the driver info"""
+ """Update the state of an instance from the driver info."""
# FIXME(ja): include other fields from state?
instance_ref = self.db.instance_get(context, instance_id)
try:
@@ -67,6 +80,7 @@ class ComputeManager(manager.Manager):
@defer.inlineCallbacks
@exception.wrap_exception
def refresh_security_group(self, context, security_group_id, **_kwargs):
+ """This call passes stright through to the virtualization driver."""
yield self.driver.refresh_security_group(security_group_id)
@defer.inlineCallbacks
diff --git a/nova/virt/connection.py b/nova/virt/connection.py
index 34e37adf7..ceb7f1e4b 100644
--- a/nova/virt/connection.py
+++ b/nova/virt/connection.py
@@ -17,7 +17,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-"""Abstraction of the underlying virtualization API"""
+"""Abstraction of the underlying virtualization API."""
import logging
import sys
@@ -39,6 +39,15 @@ def get_connection(read_only=False):
Any object returned here must conform to the interface documented by
FakeConnection.
+
+ Related flags
+ -------------
+ :connection_type: A string literal that falls through a if/elif structure
+ to determine what virtualization mechanism to use.
+ Values may be:
+ * fake
+ * libvirt
+ * xenapi
"""
# TODO(termie): maybe lazy load after initial check for permissions
# TODO(termie): check whether we can be disconnected