Revision 54b6be76 kamaki/cli/errors.py
b/kamaki/cli/errors.py | ||
---|---|---|
55 | 55 |
self.importance = 0 |
56 | 56 |
|
57 | 57 |
|
58 |
class CLIBaseUrlError(CLIError): |
|
59 |
def __init__(self, message='', details=[], importance=2, service=None): |
|
60 |
message = message or 'No url for %s' % service.lower() |
|
61 |
details = details or [ |
|
62 |
'Two options to resolve this:', |
|
63 |
'A. (recommended) Let kamaki discover the endpoint URLs for all', |
|
64 |
'services by setting a single Authentication URL:', |
|
65 |
' /config set auth_url <AUTH_URL>', |
|
66 |
'B. (advanced users) Explicitly set a valid %s endpoint URL' % ( |
|
67 |
service.upper()), |
|
68 |
'Note: auth_url option has a higher priority, so delete it to', |
|
69 |
'make that work', |
|
70 |
' /config delete auth_url', |
|
71 |
' /config set %s.url <%s_URL>' % (service, service.upper())] |
|
72 |
super(CLIBaseUrlError, self).__init__(message, details, importance) |
|
73 |
|
|
74 |
|
|
58 | 75 |
class CLISyntaxError(CLIError): |
59 | 76 |
def __init__(self, message='Syntax Error', details=[], importance=1): |
60 | 77 |
super(CLISyntaxError, self).__init__(message, details, importance) |
Also available in: Unified diff