You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by mf...@redhat.com on 2010/10/11 16:38:21 UTC
Fixes in budgets
Hi,
First patch will fix an issue when you want to create a new
budget, but there is no directory for budgets inside mock dir.
Second patch adds an actions block for budgets in XML.
-- Michal
[PATCH core 2/2] Added actions for buckets
Posted by mf...@redhat.com.
From: Michal Fojtik <mf...@redhat.com>
---
server/views/buckets/show.xml.haml | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/server/views/buckets/show.xml.haml b/server/views/buckets/show.xml.haml
index 9b650e2..579f6b4 100644
--- a/server/views/buckets/show.xml.haml
+++ b/server/views/buckets/show.xml.haml
@@ -5,4 +5,6 @@
-haml_tag(attribute, :<) do
- haml_concat @bucket.send(attribute)
- @bucket.blob_list.each do |blb|
- %blob{:id => blb, :href => bucket_url(@bucket.id) +"/#{blb}"}
\ No newline at end of file
+ %blob{:id => blb, :href => bucket_url(@bucket.id) +"/#{blb}"}
+ %actions
+ %link{:rel => 'destroy', :method => :delete, :href => destroy_bucket_url(@bucket.id)}
--
1.7.2.3
[PATCH core 1/2] Fixed case when there is no directory for holding buckets
Posted by mf...@redhat.com.
From: Michal Fojtik <mf...@redhat.com>
---
server/lib/deltacloud/drivers/mock/mock_driver.rb | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/server/lib/deltacloud/drivers/mock/mock_driver.rb b/server/lib/deltacloud/drivers/mock/mock_driver.rb
index 847319b..e1499e8 100644
--- a/server/lib/deltacloud/drivers/mock/mock_driver.rb
+++ b/server/lib/deltacloud/drivers/mock/mock_driver.rb
@@ -259,6 +259,8 @@ class MockDriver < Deltacloud::BaseDriver
#--
def buckets(credentials, opts=nil)
check_credentials(credentials)
+ bucket_dir = File.join(@storage_root, 'buckets')
+ FileUtils.mkdir_p(bucket_dir) unless File.directory?(bucket_dir)
buckets=[]
Dir[ "#{@storage_root}/buckets/*.yml" ].each do |bucket_file|
bucket = YAML.load( File.read( bucket_file ) )
--
1.7.2.3