lib/fog/aliyun/models/compute/volumes.rb in fog-aliyun-0.1.0 vs lib/fog/aliyun/models/compute/volumes.rb in fog-aliyun-0.2.0

- old
+ new

@@ -3,19 +3,18 @@ module Fog module Compute class Aliyun class Volumes < Fog::Collection - model Fog::Compute::Aliyun::Volume # Used to create a volume. There are 3 arguments and availability_zone and size are required. You can generate a new key_pair as follows: # Aliyun.volumes.create(:size => 10) # # ==== Returns # - #<Fog::AWS::Compute::Volume + # <Fog::AWS::Compute::Volume # id="vol-1e2028b9", # attached_at=nil, # availability_zone="us-east-1a", # created_at=Tue Nov 23 23:30:29 -0500 2010, # delete_on_termination=nil, @@ -23,22 +22,21 @@ # server_id=nil, # size=10, # snapshot_id=nil, # state="creating", # tags=nil - #> + # > # # The volume can be retrieved by running Aliyun.volumes.get("d-25ohde62o"). See get method below. # - # Used to return all volumes. # Aliyun.volumes.all # # ==== Returns # - #>>Aliyun.volumes.all + # >>Aliyun.volumes.all # <Fog::Compute::Aliyun::Volumes # [ # <Fog::Compute::Aliyun::Volume # id="d-25ohde62o", # region_id="cn-beijing", @@ -74,11 +72,11 @@ # 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 = {'diskIds' => [*filters_arg]} + filters_arg = { 'diskIds' => [*filters_arg] } end data = Fog::JSON.decode(service.list_disks(filters_arg).body)['Disks']['Disk'] load(data) # load(data['volumeSet']) # if server @@ -93,11 +91,11 @@ # You can run the following command to get the details: # Aliyun.volumes.get('d-25x03nah9') # # ==== Returns # - #>> Aliyun.volumes.get('d-25ohde62o') + # >> Aliyun.volumes.get('d-25ohde62o') # <Fog::Compute::Aliyun::Volume # id="d-25ohde62o", # region_id="cn-beijing", # zone_id="cn-beijing-a", # name="", @@ -125,15 +123,13 @@ # > # def get(volume_id) if volume_id - diskIds=Array.new(1,volume_id) - self.class.new(:service => service).all(:diskIds => diskIds)[0] + diskIds = Array.new(1, volume_id) + self.class.new(service: service).all(diskIds: diskIds)[0] end end - end end end end -