Merge with trunk.
This commit is contained in:
commit
1bdde8e521
@ -24,7 +24,6 @@ import logging
|
||||
import os
|
||||
import shutil
|
||||
import string
|
||||
import sys
|
||||
import tempfile
|
||||
import uuid
|
||||
import zipfile
|
||||
@ -325,8 +324,7 @@ class AuthManager(object):
|
||||
def __new__(cls, *args, **kwargs):
|
||||
"""Returns the AuthManager singleton"""
|
||||
if not cls._instance:
|
||||
cls._instance = super(AuthManager, cls).__new__(
|
||||
cls, *args, **kwargs)
|
||||
cls._instance = super(AuthManager, cls).__new__(cls)
|
||||
return cls._instance
|
||||
|
||||
def __init__(self, driver=None, *args, **kwargs):
|
||||
|
@ -48,7 +48,8 @@ import hashlib
|
||||
import hmac
|
||||
import logging
|
||||
import urllib
|
||||
import boto
|
||||
import boto # NOTE(vish): for new boto
|
||||
import boto.utils # NOTE(vish): for old boto
|
||||
|
||||
from nova.exception import Error
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<domain type='kvm'>
|
||||
<domain type='%(type)s'>
|
||||
<name>%(name)s</name>
|
||||
<os>
|
||||
<type>hvm</type>
|
||||
@ -12,7 +12,6 @@
|
||||
<memory>%(memory_kb)s</memory>
|
||||
<vcpu>%(vcpus)s</vcpu>
|
||||
<devices>
|
||||
<emulator>/usr/bin/kvm</emulator>
|
||||
<disk type='file'>
|
||||
<source file='%(basepath)s/disk'/>
|
||||
<target dev='vda' bus='virtio'/>
|
||||
|
@ -41,7 +41,7 @@ def import_class(import_str):
|
||||
try:
|
||||
__import__(mod_str)
|
||||
return getattr(sys.modules[mod_str], class_str)
|
||||
except (ImportError, AttributeError):
|
||||
except (ImportError, ValueError, AttributeError):
|
||||
raise exception.NotFound('Class %s cannot be found' % class_str)
|
||||
|
||||
def fetchfile(url, target):
|
||||
|
@ -47,6 +47,10 @@ flags.DEFINE_string('libvirt_xml_template',
|
||||
utils.abspath('compute/libvirt.xml.template'),
|
||||
'Libvirt XML Template')
|
||||
|
||||
flags.DEFINE_string('libvirt_type',
|
||||
'kvm',
|
||||
'Libvirt domain type (kvm, qemu, etc)')
|
||||
|
||||
def get_connection(read_only):
|
||||
# These are loaded late so that there's no need to install these
|
||||
# libraries when not using libvirt.
|
||||
@ -235,6 +239,7 @@ class LibvirtConnection(object):
|
||||
|
||||
# TODO(termie): lazy lazy hack because xml is annoying
|
||||
xml_info['nova'] = json.dumps(instance.datamodel.copy())
|
||||
xml_info['type'] = FLAGS.libvirt_type
|
||||
libvirt_xml = libvirt_xml % xml_info
|
||||
logging.debug("Finished the toXML method")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user