lib/yao/resources/tenant.rb in yao-0.2.12 vs lib/yao/resources/tenant.rb in yao-0.2.13

- old
+ new

@@ -14,9 +14,13 @@ def meters @meters ||= Yao::Meter.list({'q.field' => 'project_id', 'q.op' => 'eq', 'q.value' => id}) end + def ports + @ports ||= Yao::Port.list(tenant_id: id) + end + def meters_by_name(meter_name) meters.select{|m| m.name == meter_name} end class << self