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

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

Instance Method Summary collapse

Constructor Details

#initialize(service, entries, request_name) ⇒ MultipleServiceApisError

Returns a new instance of MultipleServiceApisError.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/puppet/feature/aviator/openstack/provider.rb', line 7

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