diff options
| author | Ed Leafe <ed@leafe.com> | 2011-01-11 12:19:29 -0600 |
|---|---|---|
| committer | Ed Leafe <ed@leafe.com> | 2011-01-11 12:19:29 -0600 |
| commit | 5b5fa0eb4b9ffd597b6e49b2cef5a2ad9028d55f (patch) | |
| tree | 9599772ed7a24b09ddd3c04e7909e3e6bc5f4b74 /nova/compute | |
| parent | d91a06b4fea7e45fd2e9abe35803cd9deb5d8e92 (diff) | |
| parent | b8de5221368c4055fc593c6d0d7164f2be956924 (diff) | |
| download | nova-5b5fa0eb4b9ffd597b6e49b2cef5a2ad9028d55f.tar.gz nova-5b5fa0eb4b9ffd597b6e49b2cef5a2ad9028d55f.tar.xz nova-5b5fa0eb4b9ffd597b6e49b2cef5a2ad9028d55f.zip | |
merged trunk changes
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/manager.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 3d22ee432..9872cc65b 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -37,6 +37,8 @@ terminating it. import datetime import random import string +import logging +import socket import functools from nova import exception @@ -56,6 +58,9 @@ flags.DEFINE_string('stub_network', False, 'Stub network related code') flags.DEFINE_integer('password_length', 12, 'Length of generated admin passwords') +flags.DEFINE_string('console_host', socket.gethostname(), + 'Console proxy host to use to connect to instances on' + 'this host.') LOG = logging.getLogger('nova.compute.manager') @@ -126,6 +131,15 @@ class ComputeManager(manager.Manager): state = power_state.NOSTATE self.db.instance_set_state(context, instance_id, state) + def get_console_topic(self, context, **_kwargs): + """Retrieves the console host for a project on this host + Currently this is just set in the flags for each compute + host.""" + #TODO(mdragon): perhaps make this variable by console_type? + return self.db.queue_get_for(context, + FLAGS.console_topic, + FLAGS.console_host) + def get_network_topic(self, context, **_kwargs): """Retrieves the network host for a project on this host""" # TODO(vish): This method should be memoized. This will make @@ -140,6 +154,9 @@ class ComputeManager(manager.Manager): FLAGS.network_topic, host) + def get_console_pool_info(self, context, console_type): + return self.driver.get_console_pool_info(console_type) + @exception.wrap_exception def refresh_security_group_rules(self, context, security_group_id, **_kwargs): |
