Class: Fog::Compute::Aliyun::Images
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::Aliyun::Images
- Defined in:
- lib/fog/aliyun/models/compute/images.rb
Instance Method Summary collapse
Instance Method Details
#all(filters_arg = {}) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/fog/aliyun/models/compute/images.rb', line 12 def all(filters_arg = {}) unless filters_arg.is_a?(Hash) Fog::Logger.deprecation("all with #{filters_arg.class} param is deprecated, use all('diskIds' => []) instead [light_black](#{caller.first})[/]") filters_arg = { imageId: filters_arg } end data = Fog::JSON.decode(service.list_images(filters_arg).body)['Images']['Image'] load(data) end |
#get(image_id) ⇒ Object
21 22 23 |
# File 'lib/fog/aliyun/models/compute/images.rb', line 21 def get(image_id) self.class.new(service: service).all(imageId: image_id)[0] if image_id end |