incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject svn commit: r980054 - /incubator/deltacloud/trunk/server/lib/deltacloud/drivers/gogrid/gogrid_driver.rb
Date Wed, 28 Jul 2010 13:48:38 GMT
Author: mfojtik
Date: Wed Jul 28 13:48:38 2010
New Revision: 980054

URL: http://svn.apache.org/viewvc?rev=980054&view=rev
Log:
Remove flavors from the GoGrid driver.

Signed-off-by: Chris Lalancette <clalance@redhat.com>

Modified:
    incubator/deltacloud/trunk/server/lib/deltacloud/drivers/gogrid/gogrid_driver.rb

Modified: incubator/deltacloud/trunk/server/lib/deltacloud/drivers/gogrid/gogrid_driver.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/deltacloud/drivers/gogrid/gogrid_driver.rb?rev=980054&r1=980053&r2=980054&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/deltacloud/drivers/gogrid/gogrid_driver.rb (original)
+++ incubator/deltacloud/trunk/server/lib/deltacloud/drivers/gogrid/gogrid_driver.rb Wed Jul
28 13:48:38 2010
@@ -47,19 +47,6 @@ class GogridDriver < Deltacloud::BaseDri
     DEFAULT_COLLECTIONS.reject { |c| [ :storage_volumes, :storage_snapshots ].include?(c)
}
   end
 
-  # The only valid option for flavors is server RAM for now
-  def flavors(credentials, opts=nil)
-    flavors = []
-    safely do
-      flavors=new_client(credentials).request('common/lookup/list', { 'lookup' => 'server.ram'
})['list'].collect do |flavor|
-        convert_flavor(flavor)
-      end
-    end
-    flavors = filter_on( flavors, :id, opts )
-    flavors = filter_on( flavors, :architecture, opts )
-    flavors
-  end
-
   def images(credentials, opts=nil)
     imgs = []
     if opts and opts[:id]
@@ -237,15 +224,6 @@ class GogridDriver < Deltacloud::BaseDri
     end
   end
 
-  def convert_flavor(flavor)
-    Flavor.new(
-      :id => flavor['id'],
-      :architecture => 'x86',
-      :memory => flavor['name'].tr('G', ''),
-      :storage => '1'
-    )
-  end
-
   def convert_realm(realm)
     Realm.new(
       :id => realm['id'],
@@ -279,7 +257,6 @@ class GogridDriver < Deltacloud::BaseDri
       :id => instance['name'],
       :owner_id => owner_id,
       :image_id => instance['image']['id'],
-      :flavor_id => instance['ram']['id'],
       :instance_profile => prof,
       :name => instance['name'],
       :realm_id => instance['type']['id'],



Mime
View raw message