deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject [1/2] git commit: RHEVm - Provide for user selectable first boot device.
Date Tue, 09 Apr 2013 22:01:49 GMT
Updated Branches:
  refs/heads/master 3b0b1a593 -> 8231db2f1


RHEVm - Provide for user selectable first boot device.

The default first boot device has been changed in the rbovirt gem
to hard disk, followed by network. This push allows the user to
explicitly specify the first boot device as either netowrk or
hard disk with the other becoming the second boot device.
TrackedAt: http://tracker.deltacloud.org/patch/76cf9d5d5f4b72e42f125af39327ea7d9cae4734


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/eb382a39
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/eb382a39
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/eb382a39

Branch: refs/heads/master
Commit: eb382a390c878eb50187aa1808f7c65f1a05d587
Parents: 3b0b1a5
Author: Joe VLcek <jvlcek@redhat.com>
Authored: Thu Apr 4 14:31:22 2013 -0400
Committer: David Lutterkort <lutter@redhat.com>
Committed: Tue Apr 9 15:00:28 2013 -0700

----------------------------------------------------------------------
 .../lib/deltacloud/drivers/rhevm/rhevm_driver.rb   |    2 ++
 server/views/instances/new.html.haml               |    8 ++++++++
 2 files changed, 10 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/eb382a39/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
index 724c6b3..ce34457 100644
--- a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
+++ b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
@@ -23,6 +23,7 @@ module Deltacloud
 class RhevmDriver < Deltacloud::BaseDriver
 
   feature :instances, :user_data
+  feature :instances, :first_boot_dev
   feature :instances, :user_name do
     { :max_length => 50 }
   end
@@ -192,6 +193,7 @@ class RhevmDriver < Deltacloud::BaseDriver
       params[:cores] = opts[:hwp_cpu] if opts[:hwp_cpu]
       params[:user_data] = opts[:user_data].gsub(/\n/,'') if opts[:user_data]
       params[:fileinject_path] = "deltacloud-user-data.txt"
+      params[:first_boot_dev] = opts[:first_boot_dev] if opts[:first_boot_dev]
       convert_instance(client, client.create_vm(params))
     end
   end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/eb382a39/server/views/instances/new.html.haml
----------------------------------------------------------------------
diff --git a/server/views/instances/new.html.haml b/server/views/instances/new.html.haml
index f508e7f..57ce572 100644
--- a/server/views/instances/new.html.haml
+++ b/server/views/instances/new.html.haml
@@ -37,6 +37,14 @@
             %br/
             %a{ :href => "", :onclick => 'encodeb64();', :'data-ajax' => 'false'}
Encode data
 
+        - if driver.class.has_feature?(:instances, :first_boot_dev)
+          %fieldset{ :'data-role' => 'controlgroup', 'data-iconpos' => 'right'}
+            %legend First boot device:
+            %input{ :name => 'first_boot_dev', :id => :first_boot_dev_hd, :value =>
'hd', :checked => 'checked', :type => 'radio'}
+            %label{ :for => :first_boot_dev_hd} Hard Disk
+            %input{ :name  => 'first_boot_dev', :id => :first_boot_dev_network, :value
=> 'network', :type => "radio"}
+            %label{ :for => :first_boot_dev_network} Network
+
         - if driver.class.has_feature?(:instances, :instance_count)
           %div{ 'data-role' => :fieldcontain }
             %label{ :for => :instance_count} # of instances to be launched:


Mime
View raw message