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/virt | |
| parent | d91a06b4fea7e45fd2e9abe35803cd9deb5d8e92 (diff) | |
| parent | b8de5221368c4055fc593c6d0d7164f2be956924 (diff) | |
merged trunk changes
Diffstat (limited to 'nova/virt')
| -rw-r--r-- | nova/virt/fake.py | 5 | ||||
| -rw-r--r-- | nova/virt/hyperv.py | 2 | ||||
| -rw-r--r-- | nova/virt/libvirt_conn.py | 8 | ||||
| -rw-r--r-- | nova/virt/xenapi_conn.py | 7 |
4 files changed, 21 insertions, 1 deletions
diff --git a/nova/virt/fake.py b/nova/virt/fake.py index 2d4b0a3d7..038857e81 100644 --- a/nova/virt/fake.py +++ b/nova/virt/fake.py @@ -302,6 +302,11 @@ class FakeConnection(object): def get_console_output(self, instance): return 'FAKE CONSOLE OUTPUT' + def get_console_pool_info(self, console_type): + return {'address': '127.0.0.1', + 'username': 'fakeuser', + 'password': 'fakepassword'} + class FakeInstance(object): diff --git a/nova/virt/hyperv.py b/nova/virt/hyperv.py index d71387ac0..30dc1c79b 100644 --- a/nova/virt/hyperv.py +++ b/nova/virt/hyperv.py @@ -92,7 +92,7 @@ REQ_POWER_STATE = { 'Reboot': 10, 'Reset': 11, 'Paused': 32768, - 'Suspended': 32769 + 'Suspended': 32769, } diff --git a/nova/virt/libvirt_conn.py b/nova/virt/libvirt_conn.py index 3a4b6d469..19f79e19f 100644 --- a/nova/virt/libvirt_conn.py +++ b/nova/virt/libvirt_conn.py @@ -707,6 +707,14 @@ class LibvirtConnection(object): domain = self._conn.lookupByName(instance_name) return domain.interfaceStats(interface) + def get_console_pool_info(self, console_type): + #TODO(mdragon): console proxy should be implemented for libvirt, + # in case someone wants to use it with kvm or + # such. For now return fake data. + return {'address': '127.0.0.1', + 'username': 'fakeuser', + 'password': 'fakepassword'} + def refresh_security_group_rules(self, security_group_id): self.firewall_driver.refresh_security_group_rules(security_group_id) diff --git a/nova/virt/xenapi_conn.py b/nova/virt/xenapi_conn.py index bee7a5110..8189e40db 100644 --- a/nova/virt/xenapi_conn.py +++ b/nova/virt/xenapi_conn.py @@ -52,6 +52,7 @@ reactor thread if the VM.get_by_name_label or VM.get_record calls block. """ import sys +import urlparse import xmlrpclib from eventlet import event @@ -194,6 +195,12 @@ class XenAPIConnection(object): """Detach volume storage to VM instance""" return self._volumeops.detach_volume(instance_name, mountpoint) + def get_console_pool_info(self, console_type): + xs_url = urlparse.urlparse(FLAGS.xenapi_connection_url) + return {'address': xs_url.netloc, + 'username': FLAGS.xenapi_connection_username, + 'password': FLAGS.xenapi_connection_password} + class XenAPISession(object): """The session to invoke XenAPI SDK calls""" |
