resize.image.rb.diff

Vladislav Gorbunov, 12/11/2013 02:15 AM

Download (1.14 KB)

View differences:

/usr/lib/one/ruby/opennebula/image.rb 2013-12-11 13:53:33.472999938 +1200
36 36
            :chmod       => "image.chmod",
37 37
            :chtype      => "image.chtype",
38 38
            :clone       => "image.clone",
39
            :rename      => "image.rename"
39
            :rename      => "image.rename",
40
            :resize      => "image.resize"
40 41
        }
41 42

  
42 43
        IMAGE_STATES=%w{INIT READY USED DISABLED LOCKED ERROR CLONE DELETE USED_PERS}
......
224 225
            return call(IMAGE_METHODS[:rename], @pe_id, name)
225 226
        end
226 227

  
228
        # Resize this Image
229
        #
230
        # @param size [Integer] New size for the Image.
231
        #
232
        # @return [nil, OpenNebula::Error] nil in case of success, Error
233
        #   otherwise
234
        def resize(size)
235
            return call(IMAGE_METHODS[:resize], @pe_id, size.to_i)
236
        end
237

  
227 238
        #######################################################################
228 239
        # Helpers to get Image information
229 240
        #######################################################################