Exception: Aviator::Openstack::Provider::MultipleServiceApisError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/aviator/openstack/provider.rb

Instance Method Summary collapse

Constructor Details

#initialize(service, entries, request_name) ⇒ MultipleServiceApisError

Returns a new instance of MultipleServiceApisError.



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/aviator/openstack/provider.rb', line 62

def initialize(service, entries, request_name)
  types = entries.map{|e| e[:type] }.join("\n - ")
  msg = "Multiple entries for the \#{ service } service were found in the api catalog:\n\n - \#{ types }\n\nI'm unable to guess which one it is you want to use. To fix this problem, you'll need to\ndo one of two things:\n\n  1) Indicate in the config file the api version you want to use:\n\nproduction:\n  provider: openstack\n  ...\n  \#{ service }_service:\n    api_version: v2\n\n  2) Indicate the api version when you call the request:\n\nsession.\#{ service }_service.request :\#{ request_name }, :api_version => :v2 { ... }\n\nIf you combine the two methods, method #2 will override method #1\n\n"
  super(msg)
end