Merge lp:~soren/nova/more-thorough-setup.py-install into lp:~hudson-openstack/nova/trunk

Proposed by Soren Hansen
Status: Merged
Merged at revision: 946
Proposed branch: lp:~soren/nova/more-thorough-setup.py-install
Merge into: lp:~hudson-openstack/nova/trunk
Prerequisite: lp:~soren/nova/ca-separate-code-and-state
Diff against target: 53 lines (+16/-0)
2 files modified
nova/wsgi.py (+1/-0)
setup.py (+15/-0)
To merge this branch: bzr merge lp:~soren/nova/more-thorough-setup.py-install
Reviewer Review Type Date Requested Status
Devin Carlen (community) Approve
Vish Ishaya (community) Approve
Jay Pipes (community) Needs Information
Review via email: mp+56347@code.launchpad.net

Commit message

Make "setup.py install" much more thorough. It now installs tools/ into /usr/share/nova and makes sure api-paste.conf lands in /etc/nova rather than /etc.

To post a comment you must log in.
Revision history for this message
Jay Pipes (jaypipes) wrote :

29 + return package_data

need one more newline after that.

Also, in the commit description you wrote: "It now installs tools/ into /usr/share/nova, CA/ into /usr/lib/python2.X/nova, and makes sure api-paste.conf lands in /etc/nova rather than /etc."

I see how this patch installs tools/ into /usr/share/nova, but I don't see where the other two things are done...could you explain, since I don't see anything in the commit that changes the CA or etc stuff...

review: Needs Information
Revision history for this message
Soren Hansen (soren) wrote :

2011/4/5 Jay Pipes <email address hidden>:
> Review: Needs Information
> 29      + return package_data
>
> need one more newline after that.

What, really? pep8 is dead silent to me?

> Also, in the commit description you wrote: "It now installs tools/ into /usr/share/nova, CA/ into /usr/lib/python2.X/nova, and makes sure api-paste.conf lands in /etc/nova rather than /etc."

Sorry, the CA stuff is wrong. That part was accomplished in the CA
separation branch. The api-paste thing is this:

> === added directory 'etc/nova'
> === renamed file 'etc/api-paste.ini' => 'etc/nova/api-paste.ini'

> I see how this patch installs tools/ into /usr/share/nova, but I don't see where the other two things are done...could you explain, since I don't see anything in the commit that changes the CA or etc stuff...

I'll remove the CA stuff. Sorry about the confusion.

--
Soren Hansen        | http://linux2go.dk/
Ubuntu Developer    | http://www.ubuntu.com/
OpenStack Developer | http://www.openstack.org/

Revision history for this message
Vish Ishaya (vishvananda) wrote :

lgtm

review: Approve
Revision history for this message
Devin Carlen (devcamcar) wrote :

lgtm

review: Approve
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :
Download full text (246.5 KiB)

The attempt to merge lp:~soren/nova/more-thorough-setup.py-install into lp:nova failed. Below is the output from the failed tests.

AccountsTest
    test_account_create OK
    test_account_delete OK
    test_account_update OK
    test_get_account OK
AdminAPITest
    test_admin_disabled OK
    test_admin_enabled OK
APITest
    test_exceptions_are_converted_to_faults OK
Test
    test_authorize_token OK
    test_authorize_user OK
    test_bad_token OK
    test_bad_user_bad_key OK
    test_bad_user_good_key OK
    test_no_user OK
    test_token_expiry OK
TestFunctional
    test_token_doesnotexist OK
    test_token_expiry OK
TestLimiter
    test_authorize_token OK
LimiterTest
    test_limiter_custom_max_limit OK
    test_limiter_limit_and_offset OK
    test_limiter_limit_medium OK
    test_limiter_limit_over_max OK
    test_limiter_limit_zero OK
    test_limiter_negative_limit OK
    test_limiter_negative_offset OK
    test_limiter_nothing OK
    test_limiter_offset_bad OK
    test_limiter_offset_blank OK
    test_limiter_offset_medium OK
    test_limiter_offset_over_max OK
    test_limiter_offset_zero OK
ActionExtensionTest
    test_extended_action OK
    test_invalid_action OK
    test_invalid_action_body OK
ExtensionControllerTest
    test_get_by_alias OK
    test_index OK
ExtensionManagerTest
    test_get_resources OK
ResourceExtensionTest
    test_get_resources OK
    test_get_resources_with_controller OK
    test_no_extension_present OK
ResponseExtensionTest
    test_get_resources_with_mgr OK
    test_get_resources_with_stub_mgr OK
TestFaults
    test_400_fault_json OK
    test_400_fault_xml ...

Revision history for this message
Soren Hansen (soren) wrote :

Apologies, forgot to push a last revision.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

No proposals found for merge of lp:~soren/nova/ca-separate-code-and-state into lp:nova.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'etc/nova'
2=== renamed file 'etc/api-paste.ini' => 'etc/nova/api-paste.ini'
3=== modified file 'nova/wsgi.py'
4--- nova/wsgi.py 2011-03-16 03:13:05 +0000
5+++ nova/wsgi.py 2011-04-06 06:42:16 +0000
6@@ -532,6 +532,7 @@
7 """
8
9 configfiles = [basename,
10+ os.path.join(FLAGS.state_path, 'etc', 'nova', basename),
11 os.path.join(FLAGS.state_path, 'etc', basename),
12 os.path.join(FLAGS.state_path, basename),
13 '/etc/nova/%s' % basename]
14
15=== modified file 'setup.py'
16--- setup.py 2011-03-29 22:34:25 +0000
17+++ setup.py 2011-04-06 06:42:16 +0000
18@@ -16,6 +16,7 @@
19 # License for the specific language governing permissions and limitations
20 # under the License.
21
22+import glob
23 import os
24 import subprocess
25 import sys
26@@ -86,6 +87,19 @@
27 except:
28 pass
29
30+
31+def find_data_files(destdir, srcdir):
32+ package_data = []
33+ files = []
34+ for d in glob.glob('%s/*' % (srcdir, )):
35+ if os.path.isdir(d):
36+ package_data += find_data_files(
37+ os.path.join(destdir, os.path.basename(d)), d)
38+ else:
39+ files += [d]
40+ package_data += [(destdir, files)]
41+ return package_data
42+
43 DistUtilsExtra.auto.setup(name='nova',
44 version=version.canonical_version_string(),
45 description='cloud computing fabric controller',
46@@ -96,6 +110,7 @@
47 packages=find_packages(exclude=['bin', 'smoketests']),
48 include_package_data=True,
49 test_suite='nose.collector',
50+ data_files=find_data_files('share/nova', 'tools'),
51 scripts=['bin/nova-ajax-console-proxy',
52 'bin/nova-api',
53 'bin/nova-compute',