remove uneeded superclass
This commit is contained in:
parent
583788478b
commit
94f3782eb2
@ -60,7 +60,8 @@ if __name__ == '__main__':
|
||||
scheduler = service.Service.create(binary='nova-scheduler')
|
||||
#objectstore = service.Service.create(binary='nova-objectstore')
|
||||
|
||||
service.serve(compute, network, volume, scheduler)
|
||||
#service.serve(compute, network, volume, scheduler)
|
||||
service.serve(compute, network, scheduler)
|
||||
|
||||
server = wsgi.Server()
|
||||
server.start(api.API('os'), FLAGS.osapi_port, host=FLAGS.osapi_host)
|
||||
|
@ -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
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user