diff options
| author | Ken Pepple <ken.pepple@gmail.com> | 2011-04-22 14:16:16 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-04-22 14:16:16 +0000 |
| commit | 8af2a2d720b97ef17565d57a9b8b028d449a9c84 (patch) | |
| tree | 35f6a6e53d07b90abdba5912e3f7a4fd36b61771 /bin | |
| parent | f72bc1d675e3034882bf901c2fee0491d60ce638 (diff) | |
| parent | f710ad1e3fff16de696f608986f24bdc8ffc3f6b (diff) | |
| download | nova-8af2a2d720b97ef17565d57a9b8b028d449a9c84.tar.gz nova-8af2a2d720b97ef17565d57a9b8b028d449a9c84.tar.xz nova-8af2a2d720b97ef17565d57a9b8b028d449a9c84.zip | |
clarifies error when trying to add duplicate instance_type names or flavorids via nova-manage instance_type
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/nova-manage | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/bin/nova-manage b/bin/nova-manage index 2c06767f1..c8230670a 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -826,11 +826,17 @@ class InstanceTypeCommands(object): instance_types.create(name, memory, vcpus, local_gb, flavorid, swap, rxtx_quota, rxtx_cap) except exception.InvalidInputException: - print "Must supply valid parameters to create instance type" + print "Must supply valid parameters to create instance_type" print e sys.exit(1) - except exception.DBError, e: - print "DB Error: %s" % e + except exception.ApiError, e: + print "\n\n" + print "\n%s" % e + print "Please ensure instance_type name and flavorid are unique." + print "To complete remove a instance_type, use the --purge flag:" + print "\n # nova-manage instance_type delete <name> --purge\n" + print "Currently defined instance_type names and flavorids:" + self.list("--all") sys.exit(2) except: print "Unknown error" |
