incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject svn commit: r962016 - in /incubator/deltacloud/trunk/drivers/rhevm: ./ .gitignore lib/ lib/rhevm_driver.rb scripts/ scripts/instances.ps1
Date Thu, 08 Jul 2010 23:17:11 GMT
Author: lutter
Date: Thu Jul  8 23:17:10 2010
New Revision: 962016

URL: http://svn.apache.org/viewvc?rev=962016&view=rev
Log:
Need to move off of a 64 bit machine

Added:
    incubator/deltacloud/trunk/drivers/rhevm/
    incubator/deltacloud/trunk/drivers/rhevm/.gitignore
    incubator/deltacloud/trunk/drivers/rhevm/lib/
    incubator/deltacloud/trunk/drivers/rhevm/lib/rhevm_driver.rb
    incubator/deltacloud/trunk/drivers/rhevm/scripts/
    incubator/deltacloud/trunk/drivers/rhevm/scripts/instances.ps1

Added: incubator/deltacloud/trunk/drivers/rhevm/.gitignore
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/drivers/rhevm/.gitignore?rev=962016&view=auto
==============================================================================
--- incubator/deltacloud/trunk/drivers/rhevm/.gitignore (added)
+++ incubator/deltacloud/trunk/drivers/rhevm/.gitignore Thu Jul  8 23:17:10 2010
@@ -0,0 +1 @@
+*.swp

Added: incubator/deltacloud/trunk/drivers/rhevm/lib/rhevm_driver.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/drivers/rhevm/lib/rhevm_driver.rb?rev=962016&view=auto
==============================================================================
--- incubator/deltacloud/trunk/drivers/rhevm/lib/rhevm_driver.rb (added)
+++ incubator/deltacloud/trunk/drivers/rhevm/lib/rhevm_driver.rb Thu Jul  8 23:17:10 2010
@@ -0,0 +1,95 @@
+
+require 'deltacloud/base_driver'
+
+class RHEVMDriver < DeltaCloud::BaseDriver
+
+  SCRIPT_DIR = File.dirname(__FILE__) + '/../scripts'
+  # 
+  # Flavors
+  # 
+
+  FLAVORS = [ 
+    { 
+      :id=>'m1-small',
+      :memory=>1.7,
+      :storage=>160,
+      :architecture=>'i386',
+    },
+    {
+      :id=>'m1-large', 
+      :memory=>7.5,
+      :storage=>850,
+      :architecture=>'x86_64',
+    },
+    { 
+      :id=>'m1-xlarge', 
+      :memory=>15,
+      :storage=>1690,
+      :architecture=>'x86_64',
+    },
+    { 
+      :id=>'c1-medium', 
+      :memory=>1.7,
+      :storage=>350,
+      :architecture=>'x86_64',
+    },
+    { 
+      :id=>'c1-xlarge', 
+      :memory=>7,
+      :storage=>1690,
+      :architecture=>'x86_64',
+    },
+  ]
+
+  def flavors(credentials, ids=nil)
+    return FLAVORS if ( ids.nil? )
+    FLAVORS.select{|f| ids.include?(f[:id])}
+  end
+
+  # 
+  # Images
+  # 
+
+  def images(credentials, ids_or_owner=nil )
+    foo = `c:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe #{File.join(SCRIPT_DIR,
"instances.ps1")}`
+    puts(foo) 
+    images = []
+  end
+
+  # 
+  # Instances
+  # 
+
+  def instances(credentials, ids=nil)
+    instances = []
+  end
+
+  def create_instance(credentials, image_id, flavor_id)
+    check_credentials( credentials )
+  end
+
+  def reboot_instance(credentials, id)
+  end
+
+  def delete_instance(credentials, id)
+  end
+
+  # 
+  # Storage Volumes
+  # 
+
+  def volumes(credentials, ids=nil)
+    volumes = []
+    volumes
+  end
+
+  # 
+  # Storage Snapshots
+  # 
+
+  def snapshots(credentials, ids=nil)
+    snapshots = []
+    snapshots
+  end
+
+end

Added: incubator/deltacloud/trunk/drivers/rhevm/scripts/instances.ps1
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/drivers/rhevm/scripts/instances.ps1?rev=962016&view=auto
==============================================================================
--- incubator/deltacloud/trunk/drivers/rhevm/scripts/instances.ps1 (added)
+++ incubator/deltacloud/trunk/drivers/rhevm/scripts/instances.ps1 Thu Jul  8 23:17:10 2010
@@ -0,0 +1 @@
+Login-User VdcUser 12345 qa
\ No newline at end of file



Mime
View raw message