Exception: Aviator::Openstack::Provider::MultipleServiceApisError
- Inherits:
-
StandardError
- Object
- StandardError
- Aviator::Openstack::Provider::MultipleServiceApisError
- Defined in:
- lib/puppet/feature/aviator/openstack/provider.rb
Instance Method Summary collapse
-
#initialize(service, entries, request_name) ⇒ MultipleServiceApisError
constructor
A new instance of MultipleServiceApisError.
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/puppet/feature/aviator/openstack/provider.rb', line 62 def initialize(service, entries, request_name) types = entries.map{|e| e[:type] }.join("\n - ") msg = <<EOF Multiple entries for the #{ service } service were found in the api catalog: - #{ types } I'm unable to guess which one it is you want to use. To fix this problem, you'll need to do one of two things: 1) Indicate in the config file the api version you want to use: production: provider: openstack ... #{ service }_service: api_version: v2 2) Indicate the api version when you call the request: session.#{ service }_service.request :#{ request_name }, :api_version => :v2 { ... } If you combine the two methods, method #2 will override method #1 EOF super(msg) end |