summaryrefslogtreecommitdiff
path: root/nova/console
diff options
context:
space:
mode:
authorMonsyne Dragon <mdragon@rackspace.com>2011-01-10 14:59:32 -0600
committerMonsyne Dragon <mdragon@rackspace.com>2011-01-10 14:59:32 -0600
commit94f3782eb27fd63c64845f9ab59039d07ac7ba8c (patch)
tree5e6d76a7ad28f17d3e1da8d64025e1b251e5f0f4 /nova/console
parent583788478b91d8c5d5dadd58884eddd87cdc4986 (diff)
downloadnova-94f3782eb27fd63c64845f9ab59039d07ac7ba8c.tar.gz
remove uneeded superclass
Diffstat (limited to 'nova/console')
-rw-r--r--nova/console/driver.py60
-rw-r--r--nova/console/fake.py3
-rw-r--r--nova/console/xvp.py7
3 files changed, 6 insertions, 64 deletions
diff --git a/nova/console/driver.py b/nova/console/driver.py
deleted file mode 100644
index c4cf5e5e97..0000000000
--- a/nova/console/driver.py
+++ /dev/null
@@ -1,60 +0,0 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright (c) 2010 Openstack, LLC.
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-"""
-ConsoleProxy base class that all ConsoleProxies should inherit from
-"""
-
-import os
-
-from nova import exception
-
-
-class ConsoleProxy(object):
- """The base class for all ConsoleProxy driver classes."""
-
- @property
- def console_type(self):
- raise NotImplementedError("Must specify type in subclass")
-
- def setup_console(self, context, console):
- """Sets up actual proxies"""
- raise NotImplementedError("Must implement setup in subclass")
-
- def teardown_console(self, context, console):
- """Tears down actual proxies"""
- raise NotImplementedError("Must implement teardown in subclass")
-
- def init_host(self):
- """Start up any config'ed consoles on start"""
- pass
-
- def generate_password(self, length=8):
- """Returns random console password"""
- return os.urandom(length * 2).encode('base64')[:length]
-
- def get_port(self, context):
- """get available port for consoles that need one"""
- return None
-
- def fix_pool_password(self, password):
- """Trim password to length, and any other massaging"""
- return password
-
- def fix_console_password(self, password):
- """Trim password to length, and any other massaging"""
- return password
diff --git a/nova/console/fake.py b/nova/console/fake.py
index 46782bdb33..7a90d52210 100644
--- a/nova/console/fake.py
+++ b/nova/console/fake.py
@@ -20,10 +20,9 @@ Fake ConsoleProxy driver for tests.
"""
from nova import exception
-from nova.console import driver
-class FakeConsoleProxy(driver.ConsoleProxy):
+class FakeConsoleProxy(object):
"""Fake ConsoleProxy driver."""
@property
diff --git a/nova/console/xvp.py b/nova/console/xvp.py
index 161b5ce204..2a76223dac 100644
--- a/nova/console/xvp.py
+++ b/nova/console/xvp.py
@@ -32,7 +32,6 @@ from nova import db
from nova import exception
from nova import flags
from nova import utils
-from nova.console import driver
flags.DEFINE_string('console_xvp_conf_template',
utils.abspath('console/xvp.conf.template'),
@@ -52,7 +51,7 @@ flags.DEFINE_integer('console_xvp_multiplex_port',
FLAGS = flags.FLAGS
-class XVPConsoleProxy(driver.ConsoleProxy):
+class XVPConsoleProxy(object):
"""Sets up XVP config, and manages xvp daemon"""
def __init__(self):
@@ -92,6 +91,10 @@ class XVPConsoleProxy(driver.ConsoleProxy):
"""Trim password to length, and encode"""
return self._xvp_encrypt(password)
+ def generate_password(self, length=8):
+ """Returns random console password"""
+ return os.urandom(length * 2).encode('base64')[:length]
+
def _rebuild_xvp_conf(self, context):
logging.debug("Rebuilding xvp conf")
pools = [pool for pool in