Class: Pec::Compute::Tenant

Inherits:
Object show all
Extended by:
Query
Defined in:
lib/pec/compute/tenant.rb

Class Method Summary collapse

Methods included from Query

fetch, get_name, get_ref, list

Class Method Details

.get_name(id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/pec/compute/tenant.rb', line 6

def get_name(id)
  begin
    list.find {|p| p["id"] == id }["name"]
  rescue
    Pec::Resource.get_tenant
  end
end