lib/yao/resources/server.rb in yao-0.16.0 vs lib/yao/resources/server.rb in yao-0.17.0

- old
+ new

@@ -30,9 +30,14 @@ # @return [Array<Yao::OldSample>] def old_samples(counter_name: nil, query: {}) Yao::OldSample.list(counter_name, query).select{|os| os.resource_metadata["instance_id"] == id} end + # @return [Array<Yao::Resources::Port>] + def ports + @ports ||= Yao::Port.list(device_id: id) + end + # @param id [String] # @return [Hash] def self.start(id) action(id, "os-start" => nil) end