Sha256: bd55dedab3652e9842fb5765f41f44922df62484191ae70821b5f8c73d50f45e
Contents?: true
Size: 798 Bytes
Versions: 4
Compression:
Stored size: 798 Bytes
Contents
require 'fog/huaweicloud/models/collection' require 'fog/identity/huaweicloud/v3/models/service' module Fog module Identity class HuaweiCloud class V3 class Endpoints < Fog::HuaweiCloud::Collection model Fog::Identity::HuaweiCloud::V3::Endpoint def all(options = {}) load_response(service.list_endpoints(options), 'endpoints') end def find_by_id(id) cached_endpoint = find { |endpoint| endpoint.id == id } return cached_endpoint if cached_endpoint endpoint_hash = service.get_endpoint(id).body['endpoint'] Fog::Identity::HuaweiCloud::V3::Endpoint.new( endpoint_hash.merge(:service => service) ) end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems