summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSoren Hansen <soren@linux2go.dk>2011-04-06 13:15:23 +0200
committerSoren Hansen <soren@linux2go.dk>2011-04-06 13:15:23 +0200
commit5ec86befbce742738011e256987688fc6d87fa3d (patch)
tree8f70f6acd5d001b6c5c520bfe7429ad6b529b2c9
parentd7013c9617d0740976a78ba87b1214c2b15ee702 (diff)
parent2899076039c936062a1173545c36858187c1fafc (diff)
Merge trunk
-rw-r--r--etc/nova/api-paste.ini (renamed from etc/api-paste.ini)0
-rw-r--r--nova/api/ec2/cloud.py15
-rw-r--r--nova/virt/libvirt_conn.py3
-rw-r--r--nova/wsgi.py1
-rw-r--r--setup.py15
5 files changed, 26 insertions, 8 deletions
diff --git a/etc/api-paste.ini b/etc/nova/api-paste.ini
index abe8c20c4..abe8c20c4 100644
--- a/etc/api-paste.ini
+++ b/etc/nova/api-paste.ini
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py
index 5d6d9537a..99520b302 100644
--- a/nova/api/ec2/cloud.py
+++ b/nova/api/ec2/cloud.py
@@ -893,10 +893,7 @@ class CloudController(object):
image_type = image['properties'].get('type')
ec2_id = self._image_ec2_id(image.get('id'), image_type)
name = image.get('name')
- if name:
- i['imageId'] = "%s (%s)" % (ec2_id, name)
- else:
- i['imageId'] = ec2_id
+ i['imageId'] = ec2_id
kernel_id = image['properties'].get('kernel_id')
if kernel_id:
i['kernelId'] = self._image_ec2_id(kernel_id, 'kernel')
@@ -904,11 +901,15 @@ class CloudController(object):
if ramdisk_id:
i['ramdiskId'] = self._image_ec2_id(ramdisk_id, 'ramdisk')
i['imageOwnerId'] = image['properties'].get('owner_id')
- i['imageLocation'] = image['properties'].get('image_location')
+ if name:
+ i['imageLocation'] = "%s (%s)" % (image['properties'].
+ get('image_location'), name)
+ else:
+ i['imageLocation'] = image['properties'].get('image_location')
i['imageState'] = image['properties'].get('image_state')
- i['displayName'] = image.get('name')
+ i['displayName'] = name
i['description'] = image.get('description')
- i['type'] = image_type
+ i['imageType'] = image_type
i['isPublic'] = str(image['properties'].get('is_public', '')) == 'True'
i['architecture'] = image['properties'].get('architecture')
return i
diff --git a/nova/virt/libvirt_conn.py b/nova/virt/libvirt_conn.py
index babbc610d..2be190256 100644
--- a/nova/virt/libvirt_conn.py
+++ b/nova/virt/libvirt_conn.py
@@ -970,7 +970,8 @@ class LibvirtConnection(driver.ComputeDriver):
'nics': nics}
if FLAGS.vnc_enabled:
- xml_info['vncserver_host'] = FLAGS.vncserver_host
+ if FLAGS.libvirt_type != 'lxc':
+ xml_info['vncserver_host'] = FLAGS.vncserver_host
if not rescue:
if instance['kernel_id']:
xml_info['kernel'] = xml_info['basepath'] + "/kernel"
diff --git a/nova/wsgi.py b/nova/wsgi.py
index ba0819466..05e7d5924 100644
--- a/nova/wsgi.py
+++ b/nova/wsgi.py
@@ -532,6 +532,7 @@ def paste_config_file(basename):
"""
configfiles = [basename,
+ os.path.join(FLAGS.state_path, 'etc', 'nova', basename),
os.path.join(FLAGS.state_path, 'etc', basename),
os.path.join(FLAGS.state_path, basename),
'/etc/nova/%s' % basename]
diff --git a/setup.py b/setup.py
index 20f4c1947..6c45109bc 100644
--- a/setup.py
+++ b/setup.py
@@ -16,6 +16,7 @@
# License for the specific language governing permissions and limitations
# under the License.
+import glob
import os
import subprocess
import sys
@@ -86,6 +87,19 @@ try:
except:
pass
+
+def find_data_files(destdir, srcdir):
+ package_data = []
+ files = []
+ for d in glob.glob('%s/*' % (srcdir, )):
+ if os.path.isdir(d):
+ package_data += find_data_files(
+ os.path.join(destdir, os.path.basename(d)), d)
+ else:
+ files += [d]
+ package_data += [(destdir, files)]
+ return package_data
+
DistUtilsExtra.auto.setup(name='nova',
version=version.canonical_version_string(),
description='cloud computing fabric controller',
@@ -96,6 +110,7 @@ DistUtilsExtra.auto.setup(name='nova',
packages=find_packages(exclude=['bin', 'smoketests']),
include_package_data=True,
test_suite='nose.collector',
+ data_files=find_data_files('share/nova', 'tools'),
scripts=['bin/nova-ajax-console-proxy',
'bin/nova-api',
'bin/nova-compute',