summaryrefslogtreecommitdiffstats
path: root/nova/compute
diff options
context:
space:
mode:
authorSoren Hansen <soren.hansen@rackspace.com>2010-10-13 17:13:35 +0000
committerTarmac <>2010-10-13 17:13:35 +0000
commita4aa6725be683e7e1f35df1e54069b755d19551b (patch)
tree5dada03ad0927ddc10c5dd5bbf78fb05fd006243 /nova/compute
parentd68528b6135b407a7ce0897769d2d6bb92ec6be4 (diff)
parente2b7c99c6266b24dc8b53c47db3587aebd2381fe (diff)
Xen support.
Diffstat (limited to 'nova/compute')
-rw-r--r--nova/compute/manager.py18
1 files changed, 1 insertions, 17 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index f36e14aa2..c602d013d 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -149,26 +149,10 @@ class ComputeManager(manager.Manager):
@exception.wrap_exception
def get_console_output(self, context, instance_id):
"""Send the console output for an instance."""
- # TODO(vish): Move this into the driver layer
-
logging.debug("instance %s: getting console output", instance_id)
instance_ref = self.db.instance_get(context, instance_id)
- if FLAGS.connection_type == 'libvirt':
- fname = os.path.abspath(os.path.join(FLAGS.instances_path,
- instance_ref['internal_id'],
- 'console.log'))
- with open(fname, 'r') as f:
- output = f.read()
- else:
- output = 'FAKE CONSOLE OUTPUT'
-
- # TODO(termie): this stuff belongs in the API layer, no need to
- # munge the data we send to ourselves
- output = {"InstanceId": instance_id,
- "Timestamp": "2",
- "output": base64.b64encode(output)}
- return output
+ return self.driver.get_console_output(instance_ref)
@defer.inlineCallbacks
@exception.wrap_exception