Revision 362adf50 kamaki/cli/errors.py
b/kamaki/cli/errors.py | ||
---|---|---|
55 | 55 |
self.importance = 0 |
56 | 56 |
|
57 | 57 |
|
58 |
class CLIUnimplemented(CLIError): |
|
59 |
def __init__( |
|
60 |
self, |
|
61 |
message='I \'M SORRY, DAVE.\nI \'M AFRAID I CAN\'T DO THAT.', |
|
62 |
details=[ |
|
63 |
' _ |', |
|
64 |
' _-- --_ |', |
|
65 |
' -- -- |', |
|
66 |
' -- . -- |', |
|
67 |
' -_ _- |', |
|
68 |
' -_ _- |', |
|
69 |
' - |'], |
|
70 |
importance=3): |
|
71 |
super(CLIUnimplemented, self).__init__(message, details, importance) |
|
72 |
|
|
73 |
|
|
58 | 74 |
class CLIBaseUrlError(CLIError): |
59 | 75 |
def __init__(self, message='', details=[], importance=2, service=None): |
60 | 76 |
message = message or 'No url for %s' % service.lower() |
61 | 77 |
details = details or [ |
62 | 78 |
'Two options to resolve this:', |
63 | 79 |
'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>', |
|
80 |
'services by setting a single Authentication URL and token:', |
|
81 |
' /config set remote.default.url <AUTH_URL>', |
|
82 |
' /config set remote.default.token <t0k3n>', |
|
66 | 83 |
'B. (advanced users) Explicitly set a valid %s endpoint URL' % ( |
67 | 84 |
service.upper()), |
68 |
'Note: auth_url option has a higher priority, so delete it to',
|
|
85 |
'Note: url option has a higher priority, so delete it to', |
|
69 | 86 |
'make that work', |
70 |
' /config delete auth_url', |
|
71 |
' /config set %s.url <%s_URL>' % (service, service.upper())] |
|
87 |
' /config delete remote.default.url', |
|
88 |
' /config set remote.%s.url <%s_URL>' % ( |
|
89 |
service, service.upper())] |
|
72 | 90 |
super(CLIBaseUrlError, self).__init__(message, details, importance) |
73 | 91 |
|
74 | 92 |
|
Also available in: Unified diff