some more cleanup

This commit is contained in:
Anthony Young
2011-01-04 16:22:47 -08:00
parent 8ae8f2477a
commit e32da431bf

View File

@@ -26,20 +26,6 @@ import httplib
from nova import flags from nova import flags
from boto.ec2.regioninfo import RegionInfo from boto.ec2.regioninfo import RegionInfo
class ConsoleInfo(object):
def __init__(self, connection=None, endpoint=None):
self.connection = connection
self.endpoint = endpoint
def startElement(self, name, attrs, connection):
return None
def endElement(self, name, value, connection):
if name == 'url':
self.url = str(value)
if name == 'kind':
self.url = str(value)
FLAGS = flags.FLAGS FLAGS = flags.FLAGS
DEFAULT_CLC_URL = 'http://127.0.0.1:8773' DEFAULT_CLC_URL = 'http://127.0.0.1:8773'
@@ -389,13 +375,3 @@ class NovaAdminClient(object):
def get_hosts(self): def get_hosts(self):
return self.apiconn.get_list('DescribeHosts', {}, [('item', HostInfo)]) return self.apiconn.get_list('DescribeHosts', {}, [('item', HostInfo)])
def create_console(self, instance_id, kind='ajax'):
"""
Create a console
"""
console = self.apiconn.get_object('CreateConsole', {'Kind': kind, 'InstanceId': instance_id}, ConsoleInfo)
if console.url != None:
return console