diff options
| author | Soren Hansen <soren.hansen@rackspace.com> | 2010-09-20 11:46:18 +0200 |
|---|---|---|
| committer | Soren Hansen <soren.hansen@rackspace.com> | 2010-09-20 11:46:18 +0200 |
| commit | a3d003d7ec92f3ae23a667954a790c71efdbfdbe (patch) | |
| tree | bb5d3f313107a017459b4d4caf4f52527ffa128c /nova/compute | |
| parent | 75a1815aa2724d64d1f487996265ba9136017029 (diff) | |
Move the code that extracts the console output into the virt drivers. Move the code that formats it up into the API layer. Add support for Xen console.
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/manager.py | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index ae7099812..9f5674be2 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -144,26 +144,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['str_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 |
