diff options
| author | Soren Hansen <soren.hansen@rackspace.com> | 2010-12-07 20:04:26 +0000 |
|---|---|---|
| committer | Tarmac <> | 2010-12-07 20:04:26 +0000 |
| commit | 3ab829dbf635e34dd3a57b3ebcd9fa8dafd4a066 (patch) | |
| tree | 0f6869380e24295e1d287b4c4bc3e320722d8b5a | |
| parent | 1dc4532c14b554d94a9ed0ebc80bf07b3c4a0c01 (diff) | |
| parent | 1e050bb4a8eeb65a7ac25a9fb90493567b5b07f4 (diff) | |
| download | nova-3ab829dbf635e34dd3a57b3ebcd9fa8dafd4a066.tar.gz nova-3ab829dbf635e34dd3a57b3ebcd9fa8dafd4a066.tar.xz nova-3ab829dbf635e34dd3a57b3ebcd9fa8dafd4a066.zip | |
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.
| -rwxr-xr-x | bin/nova-manage | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/bin/nova-manage b/bin/nova-manage index eb7c6b87b..62eec8353 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -359,9 +359,14 @@ class ProjectCommands(object): def zipfile(self, project_id, user_id, filename='nova.zip'): """Exports credentials for project to a zip file arguments: project_id user_id [filename='nova.zip]""" - zip_file = self.manager.get_credentials(user_id, project_id) - with open(filename, 'w') as f: - f.write(zip_file) + try: + zip_file = self.manager.get_credentials(user_id, project_id) + with open(filename, 'w') as f: + f.write(zip_file) + except db.api.NoMoreNetworks: + print ('No more networks available. If this is a new ' + 'installation, you need\nto call something like this:\n\n' + ' nova-manage network create 10.0.0.0/8 10 64\n\n') class FloatingIpCommands(object): |
