Class: Fog::ContainerInfra::OpenStack::Clusters

Inherits:
OpenStack::Collection show all
Defined in:
lib/fog/container_infra/openstack/models/clusters.rb

Instance Attribute Summary

Attributes inherited from OpenStack::Collection

#response

Instance Method Summary collapse

Methods inherited from OpenStack::Collection

#destroy, #find_by_id, #load_response, #summary

Instance Method Details

#allObject



11
12
13
# File 'lib/fog/container_infra/openstack/models/clusters.rb', line 11

def all
  load_response(service.list_clusters, "clusters")
end

#get(cluster_uuid_or_name) ⇒ Object



15
16
17
18
19
20
# File 'lib/fog/container_infra/openstack/models/clusters.rb', line 15

def get(cluster_uuid_or_name)
  resource = service.get_cluster(cluster_uuid_or_name).body
  new(resource)
rescue Fog::ContainerInfra::OpenStack::NotFound
  nil
end