Browse Source

Fix endpoint interface handling

Samuel Cassiba 1 year ago
parent
commit
dea8e2d18e
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      libraries/openstack_endpoint.rb

+ 2
- 2
libraries/openstack_endpoint.rb View File

@@ -31,14 +31,14 @@ module OpenstackclientCookbook
31 31
     action :create do
32 32
       service = new_resource.connection.services.find { |s| s.name == new_resource.service_name }
33 33
       endpoint = new_resource.connection.endpoints.find do |e|
34
-        e.service_id == service.id && e.interface == new_resource.interface
34
+        e.service_id == service.id && e.interface == interface
35 35
       end
36 36
 
37 37
       if endpoint
38 38
         log "#{new_resource.interface}_endpoint for \"#{new_resource.service_name}\" already exists"
39 39
       else
40 40
         new_resource.connection.endpoints.create(
41
-          interface: new_resource.interface,
41
+          interface: interface,
42 42
           url: new_resource.url,
43 43
           service_id: service.id,
44 44
           name: new_resource.endpoint_name,

Loading…
Cancel
Save