server/lib/deltacloud/drivers/digitalocean/digitalocean_driver.rb
# By default images will return list of 'all' images available
# to launch.
# With 'owner_id' you can filter them using 'global' and 'my_images'
# values to get less images.
#
By default images will return list of 'all' images available
to launch.
By default images will return list of ' all ' images available to launch .
def images(credentials, opts={})
          hwps = hardware_profile_ids(credentials)
          unless opts[:id]
            filter = opts[:owner_id] ? { :filter => "my_images" } : {}
            img_arr = safely do
              new_client(credentials).get('images', filter)['images'].map do |i|
                convert_image(hwps, i)
              end
            end
            filter_on( img_arr, :architecture, opts )
          else
            safely do
              [convert_image(
                hwps,
                new_client(credentials).get('images/%s' % opts[:id])['image']
              )]
            end
          end
        end
def images ( credentials , opts = { } ) hwps = hardware_profile_ids ( credentials ) unless opts [ :id ] filter = opts [ :owner_id ] ? { :filter => "my_images" } : { } img_arr = safely do new_client ( credentials ) . get ( 'images' , filter ) [ 'images' ] . map do | i | convert_image ( hwps , i ) end end filter_on ( img_arr , :architecture , opts ) else safely do [ convert_image ( hwps , new_client ( credentials ) . get ( 'images/%s' % opts [ :id ] ) [ 'image' ] ) ] end end end
By default images will return list of 'all' images available
to launch.
By default images will return list of ' all ' images available to launch .
credentials
<not_specific>
opts
<not_specific>