Added appropriate error message for designate cli

This patch adds appropriate error message for Exception
generated when running cli without authentication and
endpoint.

Change-Id: I78fe2f8db9a2cfa716c0071a7da404817dd5fbdd
Closes-Bug: #1490843
This commit is contained in:
sonu.kumar 2015-09-11 11:40:26 +05:30
parent 9803b87a31
commit 6952ecbec5
1 changed files with 4 additions and 1 deletions

View File

@ -52,7 +52,10 @@ class Command(CliffCommand):
self.error_output(parsed_args, columns, values)
except ks_exceptions.EndpointNotFound as e:
self.app.log.error("No endpoint was found: %s", e.message)
self.app.log.error('No endpoint was found. You must provide a'
'username or user id via --os-username, '
'--os-user-id, env[OS_USERNAME] or '
'env[OS_USER_ID]')
return 1