Merge lp:~soren/nova/no-more-networks-error into lp:~hudson-openstack/nova/trunk

Proposed by Soren Hansen
Status: Merged
Approved by: Soren Hansen
Approved revision: 436
Merged at revision: 443
Proposed branch: lp:~soren/nova/no-more-networks-error
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 21 lines (+8/-3)
1 file modified
bin/nova-manage (+8/-3)
To merge this branch: bzr merge lp:~soren/nova/no-more-networks-error
Reviewer Review Type Date Requested Status
Josh Kearney (community) Approve
Jonathan Bryce (community) Approve
Vish Ishaya (community) Approve
Review via email: mp+42482@code.launchpad.net

Commit message

Add a helpful error message to nova-manage in case of NoMoreNetworks.

This is one of the most common problems people have, and the solution
is not currently easily discoverable. This should address that.

Description of the change

Add a helpful error message to nova-manage in case of NoMoreNetworks.

This is one of the most common problems people have, and the solution
is not currently easily discoverable. This should address that.

To post a comment you must log in.
Revision history for this message
Vish Ishaya (vishvananda) wrote :

this will save us all a lot of irc time. LGTM

review: Approve
Revision history for this message
Jonathan Bryce (jbryce) wrote :

definitely a good update for one of the most common questions.

review: Approve
Revision history for this message
Josh Kearney (jk0) wrote :

LGTM (I answered this question a couple of times already today.)

review: Approve
Revision history for this message
Eric Day (eday) wrote :

lgtm

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

The attempt to merge lp:~soren/nova/no-more-networks-error into lp:nova failed. Below is the output from the failed tests.

nova.tests.access_unittest
  AccessTestCase
    test_001_allow_all ... [OK]
    test_002_allow_none ... [OK]
    test_003_allow_project_manager ... [OK]
    test_004_allow_sys_and_net ... [OK]
nova.tests.api_unittest
  ApiEc2TestCase
    test_authorize_revoke_security_group_cidr ... [OK]
    test_authorize_revoke_security_group_foreign_group ... [OK]
    test_create_delete_security_group ... [OK]
    test_describe_instances ... [OK]
    test_get_all_key_pairs ... [OK]
    test_get_all_security_groups ... [OK]
  XmlConversionTestCase
    test_number_conversion ... [OK]
nova.tests.auth_unittest
  AuthManagerDbTestCase
    test_004_signature_is_valid ... [OK]
    test_005_can_get_credentials ... [OK]
    test_add_user_role_doesnt_infect_project_roles ... [OK]
    test_adding_role_to_project_is_ignored_unless_added_to_user ... [OK]
    test_can_add_and_remove_user_role ... [OK]
    test_can_add_remove_user_with_role ... [OK]
    test_can_add_user_to_project ... [OK]
    test_can_create_and_get_project ... [OK]
    test_can_create_and_get_project_with_attributes ... [OK]
    test_can_create_project_with_manager ... [OK]
    test_can_delete_project ... [OK]
    test_can_delete_user ... [OK]
    test_can_generate_x509 ... [OK]
    test_can_list_project_roles ... [OK]
    test_can_list_projects ... [OK]
    test_can_list_user_roles ... [OK]
    test_can_list_users ... [OK]
    test_can_modify_project ... [OK]
    test_can_modify_users ... [OK]
    test_can_remove_project_role_but_keep_user_role ... [OK]
    test_can_remove_user_from_project ... [OK]
    test_can_remove_user_roles ... [OK]
    test_can_retrieve_project_by_user ... [OK]
    test_create_and_find_user ... [OK]
    test_create_and_find_with_properties ... [OK]
    test_create_project_assigns_manage...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/nova-manage'
2--- bin/nova-manage 2010-11-23 10:45:56 +0000
3+++ bin/nova-manage 2010-12-02 14:21:55 +0000
4@@ -359,9 +359,14 @@
5 def zipfile(self, project_id, user_id, filename='nova.zip'):
6 """Exports credentials for project to a zip file
7 arguments: project_id user_id [filename='nova.zip]"""
8- zip_file = self.manager.get_credentials(user_id, project_id)
9- with open(filename, 'w') as f:
10- f.write(zip_file)
11+ try:
12+ zip_file = self.manager.get_credentials(user_id, project_id)
13+ with open(filename, 'w') as f:
14+ f.write(zip_file)
15+ except db.api.NoMoreNetworks:
16+ print ('No more networks available. If this is a new '
17+ 'installation, you need\nto call something like this:\n\n'
18+ ' nova-manage network create 10.0.0.0/8 10 64\n\n')
19
20
21 class FloatingIpCommands(object):