Class: Fog::Identity::OpenStack::V3::Endpoints

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/openstack/models/identity_v3/endpoints.rb

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object Also known as: summary



11
12
13
# File 'lib/fog/openstack/models/identity_v3/endpoints.rb', line 11

def all(options = {})
  load(service.list_endpoints(options).body['endpoints'])
end

#find_by_id(id) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/fog/openstack/models/identity_v3/endpoints.rb', line 17

def find_by_id(id)
  cached_endpoint = self.find { |endpoint| endpoint.id == id }
  return cached_endpoint if cached_endpoint
  endpoint_hash = service.get_endpoint(id).body['endpoint']
  Fog::Identity::OpenStack::V3::Endpoint.new(
      endpoint_hash.merge(:service => service))
end