diff options
| author | Ewan Mellor <emellor@silver> | 2010-10-03 13:12:32 +0100 |
|---|---|---|
| committer | Ewan Mellor <emellor@silver> | 2010-10-03 13:12:32 +0100 |
| commit | 4fa2258af9fb130be1650372cf48be39e83451e5 (patch) | |
| tree | 56cec5f01e7979a7ef2ef8d9891092d781f173be /bin | |
| parent | 4d13a8554459638387d772a23fffe6aaaab3348d (diff) | |
Bug #654025: nova-manage project zip and nova-manage vpn list broken by change in DB semantics when networks are missing
Catch exception.NotFound when getting project VPN data. This is in two places:
nova-manage as part of its vpn list command, and
auth.manager.AuthManager.get_credentials.
Also, document the behaviour of db.api.project_get_network.
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/nova-manage | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/nova-manage b/bin/nova-manage index bf3c67612..5293fc942 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -88,11 +88,16 @@ class VpnCommands(object): def list(self): """Print a listing of the VPNs for all projects.""" print "%-12s\t" % 'project', - print "%-12s\t" % 'ip:port', + print "%-20s\t" % 'ip:port', print "%s" % 'state' for project in self.manager.get_projects(): print "%-12s\t" % project.name, - print "%s:%s\t" % (project.vpn_ip, project.vpn_port), + + try: + s = "%s:%s" % (project.vpn_ip, project.vpn_port) + except exception.NotFound: + s = "None" + print "%-20s\t" % s, vpn = self._vpn_for(project.id) if vpn: |
