Return-Path: X-Original-To: apmail-deltacloud-dev-archive@www.apache.org Delivered-To: apmail-deltacloud-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 047AFFECD for ; Fri, 5 Apr 2013 19:26:31 +0000 (UTC) Received: (qmail 90672 invoked by uid 500); 5 Apr 2013 19:26:30 -0000 Delivered-To: apmail-deltacloud-dev-archive@deltacloud.apache.org Received: (qmail 90658 invoked by uid 500); 5 Apr 2013 19:26:30 -0000 Mailing-List: contact dev-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list dev@deltacloud.apache.org Received: (qmail 90650 invoked by uid 99); 5 Apr 2013 19:26:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Apr 2013 19:26:30 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jvlcek@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Apr 2013 19:26:24 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r35JPw2j023978 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 5 Apr 2013 15:25:59 -0400 Received: from keelhaul.bos.redhat.com (dhcp-186-112.bos.redhat.com [10.16.186.112]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r35JPwXh008220 for ; Fri, 5 Apr 2013 15:25:58 -0400 From: jvlcek@redhat.com To: dev@deltacloud.apache.org Subject: [PATCH 1/2] RHEVm - Provide for user selectable first boot device. Date: Fri, 5 Apr 2013 15:25:56 -0400 Message-Id: <1365189957-7799-2-git-send-email-jvlcek@redhat.com> In-Reply-To: <1365189957-7799-1-git-send-email-jvlcek@redhat.com> References: <1365189957-7799-1-git-send-email-jvlcek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Virus-Checked: Checked by ClamAV on apache.org From: Joe VLcek 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. --- server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb | 2 ++ server/views/instances/new.html.haml | 8 ++++++++ 2 files changed, 10 insertions(+) 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 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: -- 1.7.11.7