You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2011/09/13 17:57:38 UTC
svn commit: r1170218 - in /incubator/deltacloud/trunk/server:
lib/deltacloud/drivers/rhevm/rhevm_driver.rb
lib/deltacloud/drivers/vsphere/vsphere_driver.rb
views/instances/new.html.haml
Author: mfojtik
Date: Tue Sep 13 15:57:37 2011
New Revision: 1170218
URL: http://svn.apache.org/viewvc?rev=1170218&view=rev
Log:
UI: New instance UI is not longer showing the name field when backend does not support it.
VSphere: Added exception when image_id not exists on create_instance
Modified:
incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
incubator/deltacloud/trunk/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
incubator/deltacloud/trunk/server/views/instances/new.html.haml
Modified: incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb?rev=1170218&r1=1170217&r2=1170218&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb (original)
+++ incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb Tue Sep 13 15:57:37 2011
@@ -195,8 +195,6 @@ class RHEVMDriver < Deltacloud::BaseDriv
params[:hwp_memory] = opts[:hwp_memory] if opts[:hwp_memory]
params[:hwp_cpu] = opts[:hwp_cpu] if opts[:hwp_cpu]
if opts[:user_data]
- # NOTE: Injected data will be Base64 encoded to pass through XML
- # attribute. You *need* to decode this file using a script inside guest.
params[:user_data] = opts[:user_data].gsub(/\n/,'')
end
convert_instance(client, client.create_vm(image_id, params))
Modified: incubator/deltacloud/trunk/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb?rev=1170218&r1=1170217&r2=1170218&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb (original)
+++ incubator/deltacloud/trunk/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb Tue Sep 13 15:57:37 2011
@@ -207,6 +207,7 @@ module Deltacloud::Drivers::VSphere
safely do
rootFolder = vsphere.serviceInstance.content.rootFolder
vm = find_vm(credentials, opts[:image_id])
+ raise "ERROR: Could not find the image in given datacenter" unless vm[:instance]
# New instance need valid resource pool and datastore to be placed.
# For this reason, realm_id **needs** to be set.
if opts and opts[:realm_id]
Modified: incubator/deltacloud/trunk/server/views/instances/new.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/instances/new.html.haml?rev=1170218&r1=1170217&r2=1170218&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/instances/new.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/instances/new.html.haml Tue Sep 13 15:57:37 2011
@@ -5,9 +5,10 @@
%form{ :action => instances_url, :method => :post, :class => :new_instance, :'data-ajax' => 'false'}
%input{ :name => :image_id, :type => :hidden, :value => @instance.image_id }/
- %div{ 'data-role' => :fieldcontain }
- %label{ :for => :name} Instance name:
- %input{ :type => :text, :id => :name, :name => :name, :value => '' }
+ - if driver_has_feature?(:user_name)
+ %div{ 'data-role' => :fieldcontain }
+ %label{ :for => :name} Instance name:
+ %input{ :type => :text, :id => :name, :name => :name, :value => '' }
%div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
%h3 Additional parameters