Class: Fog::Identity::OpenStack::V3::Endpoints
- Inherits:
-
Collection
- Object
- Collection
- Fog::Identity::OpenStack::V3::Endpoints
- Defined in:
- lib/fog/openstack/models/identity_v3/endpoints.rb
Instance Method Summary collapse
- #all(options = {}) ⇒ Object (also: #summary)
- #find_by_id(id) ⇒ Object
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( = {}) load(service.list_endpoints().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 |