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.
This commit is contained in:
parent
f8afbcc08b
commit
1e050bb4a8
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user