Sha256: 5086e33a19fbd619147db0f1221a37317b0ed1e86d0d3667b59b7f48172b9b29
Contents?: true
Size: 768 Bytes
Versions: 6
Compression:
Stored size: 768 Bytes
Contents
require 'fog/core/collection' require 'fog/aliyun/models/compute/image' module Fog module Compute class Aliyun class Images < Fog::Collection model Fog::Compute::Aliyun::Image 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 def get(image_id) self.class.new(service: service).all(imageId: image_id)[0] if image_id end end end end end
Version data entries
6 entries across 6 versions & 2 rubygems