deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject git commit: VSphere: A meaningfull exception added in case the datastore is misconfigured or not available (DTACLOUD-203)
Date Wed, 09 May 2012 13:08:21 GMT
Updated Branches:
  refs/heads/master 4082b96c5 -> 3b7ba1ce5


VSphere: A meaningfull exception added in case the datastore is misconfigured or not available
(DTACLOUD-203)


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

Branch: refs/heads/master
Commit: 3b7ba1ce5e7de72d9df1bddc27a52d499d697fa0
Parents: 4082b96
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Wed May 9 15:09:08 2012 +0200
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Wed May 9 15:09:08 2012 +0200

----------------------------------------------------------------------
 .../drivers/vsphere/vsphere_filemanager.rb         |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/3b7ba1ce/server/lib/deltacloud/drivers/vsphere/vsphere_filemanager.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/vsphere/vsphere_filemanager.rb b/server/lib/deltacloud/drivers/vsphere/vsphere_filemanager.rb
index ce99af6..7b7d76f 100644
--- a/server/lib/deltacloud/drivers/vsphere/vsphere_filemanager.rb
+++ b/server/lib/deltacloud/drivers/vsphere/vsphere_filemanager.rb
@@ -164,6 +164,7 @@ module VSphere
     # return the url like https://<server_address>/folder/<path>/<file_name>?<query_infos>
 
     def buildUrl(datastore,file="")
+      raise "Requested datastore does not exists or misconfigured" unless datastore.respond_to?(:'_connection')
       uri=URI::HTTPS::build(:host=>datastore._connection.http.address)
       uri.path= ["/folder",DIRECTORY_PATH,file].join("/") if file
       query={:dcPath => datastore.send(:datacenter).name, :dsName => datastore.name
}


Mime
View raw message