summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorSoren Hansen <soren.hansen@rackspace.com>2010-12-07 20:04:26 +0000
committerTarmac <>2010-12-07 20:04:26 +0000
commit3ab829dbf635e34dd3a57b3ebcd9fa8dafd4a066 (patch)
tree0f6869380e24295e1d287b4c4bc3e320722d8b5a /bin
parent1dc4532c14b554d94a9ed0ebc80bf07b3c4a0c01 (diff)
parent1e050bb4a8eeb65a7ac25a9fb90493567b5b07f4 (diff)
downloadnova-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.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/nova-manage11
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):