deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [6/50] [abbrv] git commit: Core: Report timeout using 504 HTTP status code
Date Tue, 22 May 2012 20:19:37 GMT
Core: Report timeout using 504 HTTP status code


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

Branch: refs/heads/master
Commit: 26438e89f62d18d4018956d0345e66d95629a7f6
Parents: bcc98a2
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Tue May 22 14:28:42 2012 +0200
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Tue May 22 22:17:39 2012 +0200

----------------------------------------------------------------------
 server/lib/deltacloud/collections/instances.rb     |    5 ++---
 .../deltacloud/drivers/vsphere/vsphere_driver.rb   |    4 ++++
 server/lib/deltacloud/helpers.rb                   |    1 -
 server/lib/deltacloud/helpers/deltacloud_helper.rb |    1 +
 server/views/blobs/show.xml.haml                   |    2 +-
 5 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/26438e89/server/lib/deltacloud/collections/instances.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/collections/instances.rb b/server/lib/deltacloud/collections/instances.rb
index bba2ef9..05348a8 100644
--- a/server/lib/deltacloud/collections/instances.rb
+++ b/server/lib/deltacloud/collections/instances.rb
@@ -27,9 +27,8 @@ module Deltacloud::Collections
       @hardware_profiles = driver.hardware_profiles(credentials, :architecture => @image.architecture
)
       @realms = [Realm.new(:id => params[:realm_id])] if params[:realm_id]
       @realms ||= driver.realms(credentials)
-      if driver.class.has_feature? :instances, :authentication_key
-        @keys = driver.keys(credentials)
-      end
+      @firewalls = driver.firewalls(credentials) if driver.class.has_feature? :instances,
:firewalls
+      @keys = driver.keys(credentials) if driver.class.has_feature? :instances, :authentication_key
     end
 
     collection :instances do

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/26438e89/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb b/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
index 6d30cd4..253a2e5 100644
--- a/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
+++ b/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
@@ -368,6 +368,10 @@ module Deltacloud::Drivers::Vsphere
         status 502
       end
 
+      on /execution expired/ do
+        status 504
+      end
+
       on /Invalid/ do
         status 400
       end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/26438e89/server/lib/deltacloud/helpers.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/helpers.rb b/server/lib/deltacloud/helpers.rb
index 2109362..f2a9ebb 100644
--- a/server/lib/deltacloud/helpers.rb
+++ b/server/lib/deltacloud/helpers.rb
@@ -20,7 +20,6 @@ require_relative 'helpers/deltacloud_helper'
 require_relative 'helpers/rabbit_helper'
 require_relative 'helpers/blob_stream_helper'
 
-
 module Deltacloud::Collections
   class Base < Sinatra::Base
 

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/26438e89/server/lib/deltacloud/helpers/deltacloud_helper.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/helpers/deltacloud_helper.rb b/server/lib/deltacloud/helpers/deltacloud_helper.rb
index 5806d15..4ad0be9 100644
--- a/server/lib/deltacloud/helpers/deltacloud_helper.rb
+++ b/server/lib/deltacloud/helpers/deltacloud_helper.rb
@@ -231,6 +231,7 @@ module Deltacloud::Helpers
       when 406; { :message => "Not Acceptable" }
       when 500; { :message => "Internal Server Error" }
       when 502; { :message => "Backend Server Error" }
+      when 504; { :message => "Gateway Timeout" }
       when 501; { :message => "Not Supported" }
       end
     end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/26438e89/server/views/blobs/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/blobs/show.xml.haml b/server/views/blobs/show.xml.haml
index ba3d4de..79bb8e6 100644
--- a/server/views/blobs/show.xml.haml
+++ b/server/views/blobs/show.xml.haml
@@ -1,6 +1,6 @@
 !!! XML
 %blob{:href => bucket_url(@blob.bucket) + '/' + @blob.id, :id => @blob.id}
-  %bucket{ :id => @blob.bucket, :href => bucket_url(@blob.bucket), :rel => :bucket}
+  %bucket=@blob.bucket
   - @blob.attributes.select{ |attr| (attr!=:id && attr!=:user_metadata) }.each do
|attribute|
     - next if attribute == :bucket
     - unless attribute == :content


Mime
View raw message