Sha256: bc716e91f888503dd826e327c0c6b3c712d86881bbc0b546063a949d3c66964e
Contents?: true
Size: 803 Bytes
Versions: 1
Compression:
Stored size: 803 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) if image_id self.class.new(:service => service).all(:imageId => image_id)[0] end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fog-aliyun-0.1.0 | lib/fog/aliyun/models/compute/images.rb |