diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-02-08 09:46:41 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-02-08 09:46:41 +0000 |
| commit | 4a73c4fc6c3f096710f48ee2c825eb45bbc53426 (patch) | |
| tree | 6344beb876bbaca5d089f7e548fe0634b969baf3 /nova/virt | |
| parent | 4ce6645f08fffa194f76e5d4105bfb77b6c8cd14 (diff) | |
| parent | 71410724cd1516608ee58c37077bf9080da38de2 (diff) | |
Merge "Remove ajaxterm from Nova"
Diffstat (limited to 'nova/virt')
| -rw-r--r-- | nova/virt/driver.py | 4 | ||||
| -rw-r--r-- | nova/virt/fake.py | 5 | ||||
| -rw-r--r-- | nova/virt/libvirt/connection.py | 26 | ||||
| -rw-r--r-- | nova/virt/libvirt/utils.py | 12 | ||||
| -rw-r--r-- | nova/virt/vmwareapi/vmops.py | 4 | ||||
| -rw-r--r-- | nova/virt/vmwareapi_conn.py | 4 | ||||
| -rw-r--r-- | nova/virt/xenapi/vmops.py | 5 | ||||
| -rw-r--r-- | nova/virt/xenapi_conn.py | 6 |
8 files changed, 1 insertions, 65 deletions
diff --git a/nova/virt/driver.py b/nova/virt/driver.py index d87a7286a..34ce9613b 100644 --- a/nova/virt/driver.py +++ b/nova/virt/driver.py @@ -191,10 +191,6 @@ class ComputeDriver(object): # TODO(Vek): Need to pass context in for access to auth_token raise NotImplementedError() - def get_ajax_console(self, instance): - # TODO(Vek): Need to pass context in for access to auth_token - raise NotImplementedError() - def get_vnc_console(self, instance): # TODO(Vek): Need to pass context in for access to auth_token raise NotImplementedError() diff --git a/nova/virt/fake.py b/nova/virt/fake.py index ff8da4724..ef3d392ba 100644 --- a/nova/virt/fake.py +++ b/nova/virt/fake.py @@ -219,11 +219,6 @@ class FakeConnection(driver.ComputeDriver): def get_console_output(self, instance): return 'FAKE CONSOLE OUTPUT\nANOTHER\nLAST LINE' - def get_ajax_console(self, instance): - return {'token': 'FAKETOKEN', - 'host': 'fakeajaxconsole.com', - 'port': 6969} - def get_vnc_console(self, instance): return {'internal_access_path': 'FAKE', 'host': 'fakevncconsole.com', diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py index 5400a4fbd..2bd9ac329 100644 --- a/nova/virt/libvirt/connection.py +++ b/nova/virt/libvirt/connection.py @@ -102,9 +102,6 @@ libvirt_opts = [ cfg.BoolOpt('use_cow_images', default=True, help='Whether to use cow images'), - cfg.StrOpt('ajaxterm_portrange', - default='10000-12000', - help='Range of ports that ajaxterm should try to bind'), cfg.StrOpt('cpuinfo_xml_template', default=utils.abspath('virt/cpuinfo.xml.template'), help='CpuInfo XML Template (Used only live migration now)'), @@ -777,29 +774,6 @@ class LibvirtConnection(driver.ComputeDriver): return libvirt_utils.load_file(fpath) - @exception.wrap_exception() - def get_ajax_console(self, instance): - def get_pty_for_instance(instance_name): - virt_dom = self._lookup_by_name(instance_name) - xml = virt_dom.XMLDesc(0) - dom = minidom.parseString(xml) - - for serial in dom.getElementsByTagName('serial'): - if serial.getAttribute('type') == 'pty': - source = serial.getElementsByTagName('source')[0] - return source.getAttribute('path') - - start_port, end_port = FLAGS.ajaxterm_portrange.split("-") - port = libvirt_utils.get_open_port(int(start_port), int(end_port)) - token = str(uuid.uuid4()) - host = instance['host'] - - ajaxterm_cmd = 'sudo netcat - %s' \ - % get_pty_for_instance(instance['name']) - - libvirt_utils.run_ajaxterm(ajaxterm_cmd, token, port) - return {'token': token, 'host': host, 'port': port} - @staticmethod def get_host_ip_addr(): return FLAGS.my_ip diff --git a/nova/virt/libvirt/utils.py b/nova/virt/libvirt/utils.py index f96128124..7b0e85f38 100644 --- a/nova/virt/libvirt/utils.py +++ b/nova/virt/libvirt/utils.py @@ -237,18 +237,6 @@ def get_open_port(start_port, end_port): raise Exception(_('Unable to find an open port')) -def run_ajaxterm(cmd, token, port): - """Run ajaxterm - - :param cmd: Command to connect to - :param token: Token to require for authentication - :param port: Port to run on - """ - cmd = ['%s/tools/ajaxterm/ajaxterm.py' % utils.novadir(), - '--command', cmd, '-t', token, '-p', port] - execute(*cmd) - - def get_fs_info(path): """Get free/used/total space info for a filesystem diff --git a/nova/virt/vmwareapi/vmops.py b/nova/virt/vmwareapi/vmops.py index af867dc6a..39d24479f 100644 --- a/nova/virt/vmwareapi/vmops.py +++ b/nova/virt/vmwareapi/vmops.py @@ -719,10 +719,6 @@ class VMWareVMOps(object): else: return "" - def get_ajax_console(self, instance): - """Return link to instance's ajax console.""" - return 'http://fakeajaxconsole/fake_url' - def _set_machine_id(self, client_factory, instance, network_info): """ Set the machine id of the VM for guest tools to pick up and reconfigure diff --git a/nova/virt/vmwareapi_conn.py b/nova/virt/vmwareapi_conn.py index 909969fac..7275b363e 100644 --- a/nova/virt/vmwareapi_conn.py +++ b/nova/virt/vmwareapi_conn.py @@ -174,10 +174,6 @@ class VMWareESXConnection(driver.ComputeDriver): """Return snapshot of console.""" return self._vmops.get_console_output(instance) - def get_ajax_console(self, instance): - """Return link to instance's ajax console.""" - return self._vmops.get_ajax_console(instance) - def get_volume_connector(self, _instance): """Return volume connector information""" # TODO(vish): When volume attaching is supported, return the diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py index c2960b86a..30d77369b 100644 --- a/nova/virt/xenapi/vmops.py +++ b/nova/virt/xenapi/vmops.py @@ -1425,11 +1425,6 @@ class VMOps(object): # TODO: implement this to fix pylint! return 'FAKE CONSOLE OUTPUT of instance' - def get_ajax_console(self, instance): - """Return link to instance's ajax console.""" - # TODO: implement this! - return 'http://fakeajaxconsole/fake_url' - def get_vnc_console(self, instance): """Return connection info for a vnc console.""" vm_ref = self._get_vm_opaque_ref(instance) diff --git a/nova/virt/xenapi_conn.py b/nova/virt/xenapi_conn.py index e034cb3ca..bbbc62df7 100644 --- a/nova/virt/xenapi_conn.py +++ b/nova/virt/xenapi_conn.py @@ -337,12 +337,8 @@ class XenAPIConnection(driver.ComputeDriver): """Return snapshot of console""" return self._vmops.get_console_output(instance) - def get_ajax_console(self, instance): - """Return link to instance's ajax console""" - return self._vmops.get_ajax_console(instance) - def get_vnc_console(self, instance): - """Return link to instance's ajax console""" + """Return link to instance's VNC console""" return self._vmops.get_vnc_console(instance) def get_volume_connector(self, _instance): |
