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 2013/03/26 13:36:20 UTC
[1/7] git commit: core: pass the locals properly due to tilt template
changes
Updated Branches:
refs/heads/master ad8de80bc -> 95e86624c
core: pass the locals properly due to tilt template changes
Signed-off-by: Francesco Vollero <fv...@redhat.com>
Signed-off-by: Michal fojtik <mf...@redhat.com>
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/5c5f7f2e
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/5c5f7f2e
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/5c5f7f2e
Branch: refs/heads/master
Commit: 5c5f7f2eb76651eacfd136aa1d7af936692403a2
Parents: ad8de80
Author: Francesco Vollero <fv...@redhat.com>
Authored: Mon Mar 25 17:57:30 2013 +0100
Committer: Michal fojtik <mf...@redhat.com>
Committed: Tue Mar 26 09:42:05 2013 +0100
----------------------------------------------------------------------
server/lib/deltacloud/helpers/deltacloud_helper.rb | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/5c5f7f2e/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 af14041..b794560 100644
--- a/server/lib/deltacloud/helpers/deltacloud_helper.rb
+++ b/server/lib/deltacloud/helpers/deltacloud_helper.rb
@@ -92,8 +92,8 @@ module Deltacloud::Helpers
instance_variable_set("@#{model}", @element)
if @element
respond_to do |format|
- format.html { haml :"#{model.to_s.pluralize}/show" }
- format.xml { haml :"#{model.to_s.pluralize}/show" }
+ format.html { haml :"#{model.to_s.pluralize}/show", :locals=>{model=>@element} }
+ format.xml { haml :"#{model.to_s.pluralize}/show" , :locals=>{model=>@element}}
format.json { JSON::dump(model => @element.to_hash(self)) }
end
else
[4/7] git commit: Removed obsoleted CIMI views
Posted by mf...@apache.org.
Removed obsoleted CIMI views
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/12954bae
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/12954bae
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/12954bae
Branch: refs/heads/master
Commit: 12954bae2df9d42ec8023abf4a809d4ee190833c
Parents: 37b80f9
Author: Michal Fojtik <mf...@redhat.com>
Authored: Tue Mar 26 10:48:06 2013 +0100
Committer: Michal fojtik <mf...@redhat.com>
Committed: Tue Mar 26 10:50:00 2013 +0100
----------------------------------------------------------------------
server/views/cimi/cloudEntryPoint/index.html.haml | 5 -
server/views/cimi/cloudEntryPoint/index.xml.haml | 9 -
server/views/cimi/collection/index.html.haml | 45 ----
server/views/cimi/collection/response.xml.haml | 3 -
server/views/cimi/error.html.haml | 31 ---
server/views/cimi/errors/400.xml.haml | 3 -
server/views/cimi/errors/401.xml.haml | 2 -
server/views/cimi/errors/403.xml.haml | 2 -
server/views/cimi/errors/404.xml.haml | 2 -
server/views/cimi/errors/405.xml.haml | 5 -
server/views/cimi/errors/500.xml.haml | 6 -
server/views/cimi/errors/502.xml.haml | 7 -
server/views/cimi/layout.html.haml | 32 ---
.../cimi/machine_configurations/show.html.haml | 159 -------------
.../cimi/machine_configurations/show.xml.haml | 27 ---
server/views/cimi/machine_images/show.html.haml | 79 -------
server/views/cimi/machine_images/show.xml.haml | 17 --
server/views/cimi/machines/show.html.haml | 177 ---------------
server/views/cimi/machines/show.xml.haml | 28 ---
server/views/cimi/volumes/show.html.haml | 68 ------
server/views/cimi/volumes/show.xml.haml | 17 --
21 files changed, 0 insertions(+), 724 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/cloudEntryPoint/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/cloudEntryPoint/index.html.haml b/server/views/cimi/cloudEntryPoint/index.html.haml
deleted file mode 100644
index 76f147b..0000000
--- a/server/views/cimi/cloudEntryPoint/index.html.haml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-- @collections.each do |p|
- - name, path = p
- = link_to name.to_s.capitalize, path
- %br/
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/cloudEntryPoint/index.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/cloudEntryPoint/index.xml.haml b/server/views/cimi/cloudEntryPoint/index.xml.haml
deleted file mode 100644
index cce651b..0000000
--- a/server/views/cimi/cloudEntryPoint/index.xml.haml
+++ /dev/null
@@ -1,9 +0,0 @@
-!!!XML
-%CloudEntryPoint{ :xmlns => CMWG_NAMESPACE }
- %uri= url_for("/cloudEntryPoint")
- %name cloud entry point
- %description cloud entry point
- %created= Time.new.getutc.to_s
- - @collections.each do |api|
- - res_name = api[0].to_s.camelize(:lower_case_first_letter)
- = "<#{res_name} href=\"#{api[1]}\"/>"
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/collection/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/collection/index.html.haml b/server/views/cimi/collection/index.html.haml
deleted file mode 100644
index 76ea9ba..0000000
--- a/server/views/cimi/collection/index.html.haml
+++ /dev/null
@@ -1,45 +0,0 @@
-- new_name = @dmtfitem["uri"] + " Collection"
-- new_name = new_name.gsub(/[A-Z]/, ' \0')
-%h1 #{new_name.capitalize}
-
-%form{ :action => url_for("/collection/" + @dmtfitem["uri"]) }
- %input{ :name => :id, :type => :hidden, :value => @dmtfitem["uri"] }/
- %input{ :name => :xmlRootNode, :type => :hidden, :value => @xml_root_node }/
- %p
- %label
- Name:
- %p
- %input{ :name => :name, :size => 50, :value => @dmtfitem["name"], :style => "width:50%;" }
- %input{ :name => :created, :type => :hidden, :size => 50, :value => @dmtfitem["created"] }
- %p
- %br
- %label
- Description:
- %p
- %textarea{ :name => :description, :cols => 50, :rows => 4, :style => "width:50%;" } #{@dmtfitem['description']}
- %p
- - if @dmtfitem["operation"]
- - if @dmtfitem["operation"].kind_of? (Array)
- - property_object = @dmtfitem["operation"]
- - else
- - property_object = [@dmtfitem["operation"]]
- - iter = -1
- - property_object.map do | operation|
- - iter += 1
- %br
- %label
- = operation["rel"].capitalize + ": " + url_for(operation["href"])
- %input{ :name => "operation_"+iter.to_s, :oper_type => operation["rel"], :type => :hidden, :value => operation["href"] }
- %br
-%p
-%br
-- new_name = @dmtfitem["uri"]
-- new_name = new_name.gsub(/[A-Z]/, ' \0')
-- if @dmtf_col_items
- %label
- = new_name.capitalize.pluralize + ":"
- %table{ :style => "width:52%;"}
- - @dmtf_col_items.map do |template|
- %tr
- %td
- %a{ :href => template["href"] }= template["name"]
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/collection/response.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/collection/response.xml.haml b/server/views/cimi/collection/response.xml.haml
deleted file mode 100644
index 0b8eb7a..0000000
--- a/server/views/cimi/collection/response.xml.haml
+++ /dev/null
@@ -1,3 +0,0 @@
-!!!XML
-%ReturnCode{ :xmlns => CMWG_NAMESPACE }
- %Status= "Success"
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/error.html.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/error.html.haml b/server/views/cimi/error.html.haml
deleted file mode 100644
index 942393c..0000000
--- a/server/views/cimi/error.html.haml
+++ /dev/null
@@ -1,31 +0,0 @@
-!!!
-!!! XML
-
-%html
- %head
- = stylesheet_link_tag '/stylesheets/compiled/screen.css', :media => 'screen, projection'
- = stylesheet_link_tag '/stylesheets/compiled/print.css', :media => 'print'
- /[if lt IE 8]
- = stylesheet_link_tag '/stylesheets/compiled/ie.css', :media => 'screen, projection'
- = stylesheet_link_tag '/stylesheets/compiled/application.css', :media => 'screen, projection'
- %script{:type => "text/javascript", :src => "/javascripts/jquery-1.4.2.min.js" }
- %script{:type => "text/javascript", :src => "/javascripts/application.js" }
- %body
- #wrapper
- #header
- = link_to image_tag( "/images/logo-wide.png" ), settings.root_url
- = bread_crumb
- #content{:class => :error}
- = yield
- #footer
- #formats
- Format:
- =link_to_format(:xml)
- |
- =link_to_format(:json)
- #driver_info
- Driver: #{driver_symbol} | API version: #{settings.version}
- #copyright
- Copyright 2009-2011
- %a{:href => 'http://incubator.apache.org/deltacloud/'} The Apache Software Foundation
- and individual contributors.
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/errors/400.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/errors/400.xml.haml b/server/views/cimi/errors/400.xml.haml
deleted file mode 100644
index b7eed5b..0000000
--- a/server/views/cimi/errors/400.xml.haml
+++ /dev/null
@@ -1,3 +0,0 @@
-%error{:url => "#{request.env['REQUEST_URI']}", :status => "#{response.status}"}
- %parameter #{@error.name}
- %message< #{cdata @error.message}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/errors/401.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/errors/401.xml.haml b/server/views/cimi/errors/401.xml.haml
deleted file mode 100644
index e835db5..0000000
--- a/server/views/cimi/errors/401.xml.haml
+++ /dev/null
@@ -1,2 +0,0 @@
-%error{:url => "#{request.env['REQUEST_URI']}", :status => "#{response.status}"}
- %message Authentication required
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/errors/403.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/errors/403.xml.haml b/server/views/cimi/errors/403.xml.haml
deleted file mode 100644
index 3bad335..0000000
--- a/server/views/cimi/errors/403.xml.haml
+++ /dev/null
@@ -1,2 +0,0 @@
-%error{:url => "#{request.env['REQUEST_URI']}", :status => "#{response.status}"}
- %message Method not allowed for this resource
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/errors/404.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/errors/404.xml.haml b/server/views/cimi/errors/404.xml.haml
deleted file mode 100644
index 47aede6..0000000
--- a/server/views/cimi/errors/404.xml.haml
+++ /dev/null
@@ -1,2 +0,0 @@
-%error{:url => "#{request.env['REQUEST_URI']}", :status => "#{response.status}"}
- %message Resource not found
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/errors/405.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/errors/405.xml.haml b/server/views/cimi/errors/405.xml.haml
deleted file mode 100644
index e0198f5..0000000
--- a/server/views/cimi/errors/405.xml.haml
+++ /dev/null
@@ -1,5 +0,0 @@
-%error{:url => "#{request.env['REQUEST_URI']}", :status => "#{response.status}"}
- %message
- Requested method not allowed
- %method
- =request.env['REQUEST_METHOD']
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/errors/500.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/errors/500.xml.haml b/server/views/cimi/errors/500.xml.haml
deleted file mode 100644
index 831d8a4..0000000
--- a/server/views/cimi/errors/500.xml.haml
+++ /dev/null
@@ -1,6 +0,0 @@
-%error{:url => "#{request.env['REQUEST_URI']}", :status => "#{response.status}"}
- %kind backend_error
- %message< #{cdata @error.message}
- %backend{ :driver => driver_symbol }
- %code=response.status
- %backtrace< #{h bt(@error.backtrace)}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/errors/502.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/errors/502.xml.haml b/server/views/cimi/errors/502.xml.haml
deleted file mode 100644
index 6e7a7b8..0000000
--- a/server/views/cimi/errors/502.xml.haml
+++ /dev/null
@@ -1,7 +0,0 @@
-%error{:url => "#{request.env['REQUEST_URI']}", :status => "#{response.status}"}
- %kind backend_error
- %backend{ :driver => driver_symbol }
- %code= @error.code
- - if @error.respond_to?(:details) && @error.details
- %details< #{cdata @error.details.join("\n")}
- %message< #{cdata @error.message}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/layout.html.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/layout.html.haml b/server/views/cimi/layout.html.haml
deleted file mode 100644
index 7c3b754..0000000
--- a/server/views/cimi/layout.html.haml
+++ /dev/null
@@ -1,32 +0,0 @@
-!!!
-!!! XML
-
-%html
- %head
- = stylesheet_link_tag '/stylesheets/compiled/screen.css', :media => 'screen, projection'
- = stylesheet_link_tag '/stylesheets/compiled/print.css', :media => 'print'
- /[if lt IE 8]
- = stylesheet_link_tag '/stylesheets/compiled/ie.css', :media => 'screen, projection'
- = stylesheet_link_tag '/stylesheets/compiled/application.css', :media => 'screen, projection'
- %script{:type => "text/javascript", :src => "/javascripts/jquery-1.4.2.min.js" }
- %script{:type => "text/javascript", :src => "/javascripts/application.js" }
- %script{:type => "text/javascript", :src => "/javascripts/cmwgapp.js" }
- %body
- #wrapper
- #header
- = link_to image_tag( "/images/logo-wide.png" ), settings.root_url
- = bread_crumb_ext
- #content
- = yield
- #footer
- #formats
- Format:
- =link_to_format(:xml)
- |
- =link_to_format(:json)
- #driver_info
- Driver: #{driver_symbol} | API version: #{settings.version}
- #copyright
- Copyright 2009-2011
- %a{:href => 'http://incubator.apache.org/deltacloud/'} The Apache Software Foundation
- and individual contributors.
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/machine_configurations/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/machine_configurations/show.html.haml b/server/views/cimi/machine_configurations/show.html.haml
deleted file mode 100644
index 0ab4971..0000000
--- a/server/views/cimi/machine_configurations/show.html.haml
+++ /dev/null
@@ -1,159 +0,0 @@
-%h1 View/Edit machine configuration
-
-%form{ :action => machine_configurations_url }
- %input{ :name => :id, :type => :hidden, :value => @dmtfitem["uri"] }/
- %input{ :name => :xmlRootNode, :type => :hidden, :value => @xml_root_node }/
- %input{ :name => :refreshURI, :type => :hidden, :value => machine_configurations_url }/
- %p
- %label
- Name:
- %p
- %input{ :name => :name, :size => 50, :value => @dmtfitem["name"], :style => "width:50%;" }
- %input{ :name => :created, :type => :hidden, :size => 50, :value => @dmtfitem["created"] }
- %p
- %br
- %label
- Description:
- %p
- %textarea{ :name => :description, :cols => 50, :rows => 4, :style => "width:50%;" } #{@dmtfitem['description']}
- %p
- %br
- %label
- Properties:
- %p
- %table{ :style => "width:50%;", :id => "propertyTable"}
- - if @dmtfitem["property"]
- - if @dmtfitem["property"]["name"] && @dmtfitem["property"]["content"]
- - property_object = {"#{@dmtfitem['property']['name']}" => {"content" => @dmtfitem["property"]["content"]}}
- - else
- - property_object = @dmtfitem["property"]
-
- - iter = -1
- - property_object.each_pair do |key, value|
- - iter += 1
- %tr
- %td
- %input{ :name => "param_name_" + iter.to_s, :size => 30, :value => key }
- %td
- %input{ :name => "param_value_" + iter.to_s, :size => 30, :value => value["content"] }
- %td
- %input{ :type => :button, :value => "Remove", :onClick => "return removeProperty(this)" }
- %input{ :type => :button, :name => "commit", :value => "Add new property", :onClick => "return AddNewPproperty('propertyTable')" }
- %p
- %br
- %label
- Cpu:
- %p
- %input{ :name => :cpu, :size => 50, :value => @dmtfitem["cpu"], :style => "width:50%;" }
- %br
- %label
- Memory:
- %p
- %input{ :name => :memory_quantity, :size => 20, :value => @dmtfitem["memory"]["quantity"], :style => "width:10%;" }
- %input{ :name => :memory_units, :size => 20, :value => @dmtfitem["memory"]["units"], :style => "width:10%;" }
- %br
- %label
- Disk:
- %p
- %table{ :style => "width:50%;", :id => "diskTable"}
- - if @dmtfitem["disk"]
- - if @dmtfitem["disk"].kind_of?(Array)
- - property_object = @dmtfitem["disk"]
- - else
- - property_object = [@dmtfitem["disk"]]
-
- - iter = -1
- %tr
- %td
- %label
- Quantity
- %td
- %label
- Units
- %td
- %label
- GuestInterface
- %td
- - property_object.each do |disk|
- - iter += 1
- %tr
- %td
- %input{ :name => "disk_quantity_" + iter.to_s, :size => 10, :value => disk["capacity"]["quantity"] }
- %td
- %input{ :name => "disk_units_" + iter.to_s, :size => 10, :value => disk["capacity"]["units"] }
- %td
- %input{ :name => "disk_guestInterface_" + iter.to_s, :size => 30, :value => disk["guestInterface"] }
- %td
- %input{ :type => :button, :value => "Remove", :onClick => "return removeProperty(this)" }
- %input{ :type => :button, :name => "commit", :value => "Add new disk", :onClick => "return addDiskRow('diskTable')" }
-
- %br
- %label
- EntityMetadata:
- %br
-
-:javascript
- function fixupXml(theNode) {
- var xmlData = "<?xml version='1.0' encoding='utf-8' ?>";
- xmlData += "<" + $(theNode.form).attr("xmlRootNode").value + " xmlns='http://schemas.dmtf.org/cimi/1'>";
- xmlData += getStandardData(theNode);
- xmlData += "<cpu>" + $(theNode.form).attr("cpu").value + "</cpu>";
- xmlData += "<memory quantity='" + $(theNode.form).attr("memory_quantity").value + "' units='";
- xmlData += $(theNode.form).attr("memory_units").value + "' />"
-
- var index=0;
- subDisk = ""
- while ($(theNode.form).attr("disk_quantity_" + index)) {
- if ($(theNode.form).attr("disk_quantity_" + index).value != null &&
- $(theNode.form).attr("disk_quantity_" + index).value.length > 0) {
- subDisk += "<capacity quantity='" + $(theNode.form).attr("disk_quantity_" + index).value + "' units='" +
- $(theNode.form).attr("disk_units_" + index).value + "' />";
- subDisk += "<guestInterface>" + $(theNode.form).attr("disk_guestInterface_" + index).value + "</guestInterface>";
- }
- index++;
- }
- if (subDisk.length > 0) {
- xmlData += "<disk>" + subDisk + "</disk>";
- }
-
- xmlData += "</" + $(theNode.form).attr("xmlRootNode").value + ">";
-
- return xmlData;
- }
-
- function addDiskRow(tableId) {
- var tbl = document.getElementById(tableId);
- var lastRow = tbl.rows.length;
- // if there's no header row in the table, then iteration = lastRow + 1
- var iteration = lastRow - 1;
- var row = tbl.insertRow(lastRow);
-
- elNames = ['disk_quantity_', 'disk_units_', 'disk_guestInterface_'];
- elSizes = [10, 10, 30]
- elValues = ["200", "megabyte", ""]
-
- for (var index=0; index<elNames.length; index++) {
- var aCellTD = row.insertCell(index);
- var aCell = document.createElement('input');
- aCell.type = 'text';
- aCell.name = elNames[index] + iteration;
- aCell.id = aCell.name;
- aCell.size = elSizes[index];
- aCell.value = elValues[index];
- aCellTD.appendChild(aCell);
- }
-
- // select cell
- var cellRightBut = row.insertCell(elNames.length);
- var er = document.createElement('input');
- er.type = 'button';
- er.name = 'param_remove' + iteration;
- er.id = 'param_remove' + iteration;
- er.value = "Remove";
- er.tableRow = row
- $(er).click(function() {
- removeProperty(this);
- })
-
- cellRightBut.appendChild(er);
- }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/machine_configurations/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/machine_configurations/show.xml.haml b/server/views/cimi/machine_configurations/show.xml.haml
deleted file mode 100644
index dbcfe78..0000000
--- a/server/views/cimi/machine_configurations/show.xml.haml
+++ /dev/null
@@ -1,27 +0,0 @@
-- unless defined?(partial)
- !!! XML
-%MachineConfiguration{ :xmlns => CMWG_NAMESPACE }
- %uri=machine_configurations_url + "/" + @dmtfitem["uri"]
- %name=@dmtfitem["name"]
- %description=@dmtfitem["description"]
- %created=@dmtfitem["created"]
- - if @dmtfitem["property"]
- - if @dmtfitem["property"]["name"] && @dmtfitem["property"]["content"]
- - property_object = {"#{@dmtfitem['property']['name']}" => {"content" => @dmtfitem["property"]["content"]}}
- - else
- - property_object = @dmtfitem["property"]
- - property_object.each_pair do |key, value|
- %property{ :name => key}=value["content"]
- %cpu=@dmtfitem["cpu"]
- %memory{ :quantity => @dmtfitem["memory"]["quantity"], :units => @dmtfitem["memory"]["units"] }
- - if @dmtfitem["disk"]
- - if @dmtfitem["disk"].kind_of?(Array)
- - property_object = @dmtfitem["disk"]
- - else
- - property_object = [@dmtfitem["disk"]]
- - property_object.each do |disk|
- %disk
- %capacity{ :quantity => disk["capacity"]["quantity"], :units => disk["capacity"]["units"] }
- %guestInterface= disk["guestInterface"]
- %operation{ :rel => "edit", :href => machine_configurations_url + "/" + @dmtfitem["uri"] }
- %operation{ :rel => "delete", :href => machine_configurations_url + "/" + @dmtfitem["uri"] }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/machine_images/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/machine_images/show.html.haml b/server/views/cimi/machine_images/show.html.haml
deleted file mode 100644
index 68cecc3..0000000
--- a/server/views/cimi/machine_images/show.html.haml
+++ /dev/null
@@ -1,79 +0,0 @@
-%h1 View/Edit machine image
-
-%form{ :action => machine_images_url }
- %input{ :name => :id, :type => :hidden, :value => @dmtfitem["uri"] }/
- %input{ :name => :xmlRootNode, :type => :hidden, :value => @xml_root_node }/
- %input{ :name => :refreshURI, :type => :hidden, :value => machine_images_url }/
- %p
- %label
- Name:
- %p
- %input{ :name => :name, :size => 50, :value => @dmtfitem["name"], :style => "width:50%;" }
- %input{ :name => :created, :type => :hidden, :size => 50, :value => @dmtfitem["created"] }
- %p
- %br
- %label
- Description:
- %p
- %textarea{ :name => :description, :cols => 50, :rows => 4, :style => "width:50%;" } #{@dmtfitem['description']}
- %p
- %br
- %label
- Properties:
- %p
- %table{ :style => "width:50%;", :id => "propertyTable"}
- - if @dmtfitem["property"]
- - if @dmtfitem["property"]["name"] && @dmtfitem["property"]["content"]
- - property_object = {"#{@dmtfitem['property']['name']}" => {"content" => @dmtfitem["property"]["content"]}}
- - else
- - property_object = @dmtfitem["property"]
-
- - iter = -1
- - property_object.each_pair do |key, value|
- - iter += 1
- %tr
- %td
- %input{ :name => "param_name_" + iter.to_s, :size => 30, :value => key }
- %td
- %input{ :name => "param_value_" + iter.to_s, :size => 30, :value => value["content"] }
- %td
- %input{ :type => :button, :value => "Remove", :onClick => "return removeProperty(this)" }
- %input{ :type => :button, :name => "commit", :value => "Add new property", :onClick => "return AddNewPproperty('propertyTable')" }
- %p
- %br
- %label
- Image Location:
- %p
- %input{ :name => :imageLocation, :size => 50, :value => @dmtfitem["imageLocation"], :style => "width:50%;" }
- %br
- %label
- Image Data:
- %p
- %textarea{:style=> "width:50%;height:100px;", :name => "imageData"}
- %br
- %label
- EntityMetadata:
- %br
- %div{:style => "width:90%;"}
- %pre
- - if @metadata
- = convert_xml_to_html @metadata
- %br
-
-:javascript
- function fixupXml(theNode) {
- var xmlData = "<?xml version='1.0' encoding='utf-8' ?>";
- xmlData += "<" + $(theNode.form).attr("xmlRootNode").value + " xmlns='http://schemas.dmtf.org/cimi/1'>";
- xmlData += getStandardData(theNode);
- xmlData += "<imageLocation href='" + $(theNode.form).attr("imageLocation").value + "' />";
- xmlData += "<imageData>" + $(theNode.form).attr("imageData").value + "</imageData>";
-
- //we handle entityMetadata here
- if ($(theNode.form).attr("entityMetadata") != null && $(theNode.form).attr("entityMetadata").value) {
- xmlData += $(theNode.form).attr("entityMetadata").value
- }
-
- xmlData += "</" + $(theNode.form).attr("xmlRootNode").value + ">";
-
- return xmlData;
- }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/machine_images/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/machine_images/show.xml.haml b/server/views/cimi/machine_images/show.xml.haml
deleted file mode 100644
index 3d55ebf..0000000
--- a/server/views/cimi/machine_images/show.xml.haml
+++ /dev/null
@@ -1,17 +0,0 @@
-- unless defined?(partial)
- !!! XML
-%MachineImage{ :xmlns => CMWG_NAMESPACE }
- %uri=machine_images_url + "/" + @dmtfitem["uri"]
- %name=@dmtfitem["name"]
- %description=@dmtfitem["description"]
- %created=@dmtfitem["created"]
- - if @dmtfitem["property"]
- - if @dmtfitem["property"]["name"] && @dmtfitem["property"]["content"]
- - property_object = {"#{@dmtfitem['property']['name']}" => {"content" => @dmtfitem["property"]["content"]}}
- - else
- - property_object = @dmtfitem["property"]
- - property_object.each_pair do |key, value|
- %property{ :name => key}=value["content"]
- %imageLocation{ :href => @dmtfitem["imageLocation"]}
- %operation{ :rel => "edit", :href => machine_images_url + "/" + @dmtfitem["uri"] }
- %operation{ :rel => "delete", :href => machine_images_url + "/" + @dmtfitem["uri"] }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/machines/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/machines/show.html.haml b/server/views/cimi/machines/show.html.haml
deleted file mode 100644
index 8ba662a..0000000
--- a/server/views/cimi/machines/show.html.haml
+++ /dev/null
@@ -1,177 +0,0 @@
-%h1 View/Edit machine
-
-%form{ :action => machines_url }
- %input{ :name => :id, :type => :hidden, :value => @dmtfitem["uri"] }/
- %input{ :name => :xmlRootNode, :type => :hidden, :value => @xml_root_node }/
- %input{ :name => :refreshURI, :type => :hidden, :value => machines_url }/
- %p
- %label
- Name:
- %p
- %input{ :name => :name, :size => 50, :value => @dmtfitem["name"], :style => "width:50%;" }
- %input{ :name => :created, :type => :hidden, :size => 50, :value => @dmtfitem["created"] }
- %p
- %br
- %label
- Description:
- %p
- %textarea{ :name => :description, :cols => 50, :rows => 4, :style => "width:50%;" } #{@dmtfitem['description']}
- %p
- %br
- %label
- Properties:
- %p
- %table{ :style => "width:50%;", :id => "propertyTable"}
- - if @dmtfitem["property"]
- - if @dmtfitem["property"]["name"] && @dmtfitem["property"]["content"]
- - property_object = {"#{@dmtfitem['property']['name']}" => {"content" => @dmtfitem["property"]["content"]}}
- - else
- - property_object = @dmtfitem["property"]
-
- - iter = -1
- - property_object.each_pair do |key, value|
- - iter += 1
- %tr
- %td
- %input{ :name => "param_name_" + iter.to_s, :size => 25, :value => key }
- %td
- %input{ :name => "param_value_" + iter.to_s, :size => 25, :value => value["content"] }
- %td
- %input{ :type => :button, :value => "Remove", :onClick => "return removeProperty(this)" }
- %input{ :type => :button, :name => "commit", :value => "Add new property", :onClick => "return AddNewPproperty('propertyTable')" }
- %p
- %br
- %label
- Status:
- %p
- %input{ :name => :status, :size => 50, :value => @dmtfitem["status"], :style => "width:50%;" }
- %p
- %br
- %label
- CPU:
- %p
- %input{ :name => :cpu, :size => 50, :value => @dmtfitem["cpu"], :style => "width:50%;" }
- %br
- %label
- Memory:
- %p
- %input{ :name => :memory_quantity, :size => 20, :value => @dmtfitem["memory"]["quantity"], :style => "width:10%;" }
- %input{ :name => :memory_units, :size => 20, :value => @dmtfitem["memory"]["units"], :style => "width:10%;" }
- %br
- %label
- Disk:
- %p
- %table{ :style => "width:50%;", :id => "diskTable"}
- - if @dmtfitem["disk"]
- - if @dmtfitem["disk"].kind_of?(Array)
- - property_object = @dmtfitem["disk"]
- - else
- - property_object = [@dmtfitem["disk"]]
-
- - iter = -1
- %tr
- %td
- %label
- Quantity
- %td
- %label
- Units
- %td
- %label
- GuestInterface
- %td
- - property_object.each do |disk|
- - iter += 1
- %tr
- %td
- %input{ :name => "disk_quantity_" + iter.to_s, :size => 10, :value => disk["capacity"]["quantity"] }
- %td
- %input{ :name => "disk_units_" + iter.to_s, :size => 10, :value => disk["capacity"]["units"] }
- %td
- %input{ :name => "disk_guestInterface_" + iter.to_s, :size => 20, :value => disk["guestInterface"] }
- %td
- %input{ :type => :button, :value => "Remove", :onClick => "return removeProperty(this)" }
- %input{ :type => :button, :name => "commit", :value => "Add new disk", :onClick => "return addDiskRow('diskTable')" }
-
- %br
- %label
- EntityMetadata:
- %br
- %label
- TODO Need to handle volumes:
- %p
- %br
- %label
- TODO Need to handle network interfaces:
-
-:javascript
- function fixupXml(theNode) {
- var xmlData = "<?xml version='1.0' encoding='utf-8' ?>";
- xmlData += "<" + $(theNode.form).attr("xmlRootNode").value + " xmlns='http://schemas.dmtf.org/cimi/1'>";
- xmlData += getStandardData(theNode);
- xmlData += "<cpu>" + $(theNode.form).attr("cpu").value + "</cpu>";
- xmlData += "<memory quantity='" + $(theNode.form).attr("memory_quantity").value + "' units='";
- xmlData += $(theNode.form).attr("memory_units").value + "' />"
-
- var index=0;
- subDisk = ""
- while ($(theNode.form).attr("disk_quantity_" + index)) {
- if ($(theNode.form).attr("disk_quantity_" + index).value != null &&
- $(theNode.form).attr("disk_quantity_" + index).value.length > 0) {
- subDisk += "<capacity quantity='" + $(theNode.form).attr("disk_quantity_" + index).value + "' units='" +
- $(theNode.form).attr("disk_units_" + index).value + "' />";
- subDisk += "<guestInterface>" + $(theNode.form).attr("disk_guestInterface_" + index).value + "</guestInterface>";
- }
- index++;
- }
- if (subDisk.length > 0) {
- xmlData += "<disk>" + subDisk + "</disk>";
- }
-
- //we handle entityMetadata here
- if ($(theNode.form).attr("entityMetadata").value) {
- xmlData += $(theNode.form).attr("entityMetadata").value
- }
-
- xmlData += "</" + $(theNode.form).attr("xmlRootNode").value + ">";
-
- return xmlData;
- }
-
- function addDiskRow(tableId) {
- var tbl = document.getElementById(tableId);
- var lastRow = tbl.rows.length;
- // if there's no header row in the table, then iteration = lastRow + 1
- var iteration = lastRow - 1;
- var row = tbl.insertRow(lastRow);
-
- elNames = ['disk_quantity_', 'disk_units_', 'disk_guestInterface_'];
- elSizes = [10, 10, 20]
- elValues = ["200", "megabyte", ""]
-
- for (var index=0; index<elNames.length; index++) {
- var aCellTD = row.insertCell(index);
- var aCell = document.createElement('input');
- aCell.type = 'text';
- aCell.name = elNames[index] + iteration;
- aCell.id = aCell.name;
- aCell.size = elSizes[index];
- aCell.value = elValues[index];
- aCellTD.appendChild(aCell);
- }
-
- // select cell
- var cellRightBut = row.insertCell(elNames.length);
- var er = document.createElement('input');
- er.type = 'button';
- er.name = 'param_remove' + iteration;
- er.id = 'param_remove' + iteration;
- er.value = "Remove";
- er.tableRow = row
- $(er).click(function() {
- removeProperty(this);
- })
-
- cellRightBut.appendChild(er);
-
- }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/machines/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/machines/show.xml.haml b/server/views/cimi/machines/show.xml.haml
deleted file mode 100644
index 653b51f..0000000
--- a/server/views/cimi/machines/show.xml.haml
+++ /dev/null
@@ -1,28 +0,0 @@
-- unless defined?(partial)
- !!! XML
-%Machine{ :xmlns => CMWG_NAMESPACE }
- %uri=machines_url + "/" + @dmtfitem["uri"]
- %name=@dmtfitem["name"]
- %description=@dmtfitem["description"]
- %created=@dmtfitem["created"]
- - if @dmtfitem["property"]
- - if @dmtfitem["property"]["name"] && @dmtfitem["property"]["content"]
- - property_object = {"#{@dmtfitem['property']['name']}" => {"content" => @dmtfitem["property"]["content"]}}
- - else
- - property_object = @dmtfitem["property"]
- - property_object.each_pair do |key, value|
- %property{ :name => key}=value["content"]
- %status=@dmtfitem["status"]
- %cpu=@dmtfitem["cpu"]
- %memory{ :quantity => @dmtfitem["memory"]["quantity"], :units => @dmtfitem["memory"]["units"] }
- - if @dmtfitem["disk"]
- - if @dmtfitem["disk"].kind_of?(Array)
- - property_object = @dmtfitem["disk"]
- - else
- - property_object = [@dmtfitem["disk"]]
- - property_object.each do |disk|
- %disk
- %capacity{ :quantity => disk["capacity"]["quantity"], :units => disk["capacity"]["units"] }
- %guestInterface= disk["guestInterface"]
- %operation{ :rel => "edit", :href => machines_url + "/" + @dmtfitem["uri"] }
- %operation{ :rel => "delete", :href => machines_url + "/" + @dmtfitem["uri"] }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/volumes/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/volumes/show.html.haml b/server/views/cimi/volumes/show.html.haml
deleted file mode 100644
index ba675eb..0000000
--- a/server/views/cimi/volumes/show.html.haml
+++ /dev/null
@@ -1,68 +0,0 @@
-%h1 View/Edit volume
-
-%form{ :action => volumes_url }
- %input{ :name => :id, :type => :hidden, :value => @dmtfitem["uri"] }/
- %input{ :name => :xmlRootNode, :type => :hidden, :value => @xml_root_node }/
- %input{ :name => :refreshURI, :type => :hidden, :value => volumes_url }/
- %p
- %label
- Name:
- %p
- %input{ :name => :name, :size => 50, :value => @dmtfitem["name"], :style => "width:50%;" }
- %input{ :name => :created, :type => :hidden, :size => 50, :value => @dmtfitem["created"] }
- %p
- %br
- %label
- Description:
- %p
- %textarea{ :name => :description, :cols => 50, :rows => 4, :style => "width:50%;" } #{@dmtfitem['description']}
- %p
- %br
- %label
- Properties:
- %p
- %table{ :style => "width:50%;", :id => "propertyTable"}
- - if @dmtfitem["property"]
- - if @dmtfitem["property"]["name"] && @dmtfitem["property"]["content"]
- - property_object = {"#{@dmtfitem['property']['name']}" => {"content" => @dmtfitem["property"]["content"]}}
- - else
- - property_object = @dmtfitem["property"]
-
- - iter = -1
- - property_object.each_pair do |key, value|
- - iter += 1
- %tr
- %td
- %input{ :name => "param_name_" + iter.to_s, :size => 30, :value => key }
- %td
- %input{ :name => "param_value_" + iter.to_s, :size => 30, :value => value["content"] }
- %td
- %input{ :type => :button, :value => "Remove", :onClick => "return removeProperty(this)" }
- %input{ :type => :button, :name => "commit", :value => "Add new property", :onClick => "return AddNewPproperty('propertyTable')" }
- %p
- %br
- %label
- Capacity:
- %p
- %input{ :name => :capacity_quantity, :size => 20, :value => @dmtfitem["capacity"]["quantity"], :style => "width:10%;" }
- %input{ :name => :capacity_units, :size => 20, :value => @dmtfitem["capacity"]["units"], :style => "width:10%;" }
- %br
- %label
- EntityMetadata:
- %br
-
-:javascript
- function fixupXml(theNode) {
- var xmlData = "<?xml version='1.0' encoding='utf-8' ?>";
- xmlData += "<" + $(theNode.form).attr("xmlRootNode").value + " xmlns='http://schemas.dmtf.org/cimi/1'>";
- xmlData += getStandardData(theNode);
- xmlData += "<cpu>" + $(theNode.form).attr("cpu").value + "</cpu>";
- xmlData += "<memory quantity='" + $(theNode.form).attr("memory_quantity").value + "' units='";
- xmlData += $(theNode.form).attr("memory_units").value + "' />"
-
- var index=0;
-
- xmlData += "</" + $(theNode.form).attr("xmlRootNode").value + ">";
-
- return xmlData;
- }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/volumes/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/volumes/show.xml.haml b/server/views/cimi/volumes/show.xml.haml
deleted file mode 100644
index 32f48af..0000000
--- a/server/views/cimi/volumes/show.xml.haml
+++ /dev/null
@@ -1,17 +0,0 @@
-- unless defined?(partial)
- !!! XML
-%Volume{ :xmlns => CMWG_NAMESPACE }
- %uri=volumes_url + "/" + @dmtfitem["uri"]
- %name=@dmtfitem["name"]
- %description=@dmtfitem["description"]
- %created=@dmtfitem["created"]
- - if @dmtfitem["property"]
- - if @dmtfitem["property"]["name"] && @dmtfitem["property"]["content"]
- - property_object = {"#{@dmtfitem['property']['name']}" => {"content" => @dmtfitem["property"]["content"]}}
- - else
- - property_object = @dmtfitem["property"]
- - property_object.each_pair do |key, value|
- %property{ :name => key}=value["content"]
- %capacity{ :quantity => @dmtfitem["capacity"]["quantity"], :units => @dmtfitem["capacity"]["units"]}
- %operation{ :rel => "edit", :href => volumes_url + "/" + @dmtfitem["uri"] }
- %operation{ :rel => "delete", :href => volumes_url + "/" + @dmtfitem["uri"] }
[3/7] git commit: HTML haml templates use local instead of instance
variables
Posted by mf...@apache.org.
HTML haml templates use local instead of instance variables
Signed-off-by: Francesco Vollero <fv...@redhat.com>
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/a19b3d1b
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/a19b3d1b
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/a19b3d1b
Branch: refs/heads/master
Commit: a19b3d1b54922e282dc6f52585b8da13b1be743c
Parents: b8652ea
Author: Francesco Vollero <fv...@redhat.com>
Authored: Mon Mar 25 17:57:34 2013 +0100
Committer: Michal fojtik <mf...@redhat.com>
Committed: Tue Mar 26 10:49:59 2013 +0100
----------------------------------------------------------------------
server/lib/deltacloud/collections/images.rb | 2 +-
server/lib/deltacloud/collections/instances.rb | 23 ++++++---
.../lib/deltacloud/collections/load_balancers.rb | 2 +-
.../lib/deltacloud/collections/storage_volumes.rb | 2 +-
server/lib/deltacloud/helpers/deltacloud_helper.rb | 3 +-
server/views/addresses/_address.html.haml | 6 +-
server/views/addresses/associate.html.haml | 6 +-
server/views/addresses/index.html.haml | 4 +-
server/views/addresses/show.html.haml | 14 +++---
server/views/api/show.html.haml | 2 +-
server/views/blobs/new.html.haml | 2 +-
server/views/blobs/show.html.haml | 16 +++---
server/views/buckets/index.html.haml | 2 +-
server/views/buckets/show.html.haml | 14 +++---
server/views/docs/collection.html.haml | 12 ++--
server/views/docs/operation.html.haml | 10 ++--
server/views/drivers/index.html.haml | 2 +-
server/views/error.html.haml | 4 +-
server/views/firewalls/index.html.haml | 2 +-
server/views/firewalls/new_rule.html.haml | 2 +-
server/views/firewalls/show.html.haml | 16 +++---
server/views/hardware_profiles/index.html.haml | 2 +-
server/views/hardware_profiles/show.html.haml | 6 +-
server/views/images/index.html.haml | 2 +-
server/views/images/new.html.haml | 4 +-
server/views/images/show.html.haml | 28 +++++-----
server/views/instance_states/show.html.haml | 2 +-
server/views/instances/new.html.haml | 28 +++++-----
server/views/keys/index.html.haml | 2 +-
server/views/keys/show.html.haml | 20 ++++----
server/views/load_balancers/index.html.haml | 2 +-
server/views/load_balancers/new.html.haml | 6 +-
server/views/load_balancers/show.html.haml | 20 ++++----
server/views/metrics/index.html.haml | 2 +-
server/views/metrics/show.html.haml | 4 +-
server/views/realms/index.html.haml | 2 +-
server/views/realms/show.html.haml | 10 ++--
server/views/storage_snapshots/index.html.haml | 2 +-
server/views/storage_snapshots/show.html.haml | 12 ++--
server/views/storage_volumes/attach.html.haml | 4 +-
server/views/storage_volumes/index.html.haml | 2 +-
server/views/storage_volumes/show.html.haml | 38 +++++++-------
42 files changed, 177 insertions(+), 167 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/lib/deltacloud/collections/images.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/collections/images.rb b/server/lib/deltacloud/collections/images.rb
index 687f931..3d59df5 100644
--- a/server/lib/deltacloud/collections/images.rb
+++ b/server/lib/deltacloud/collections/images.rb
@@ -23,7 +23,7 @@ module Deltacloud::Collections
new_route_for :images do
halt 404 unless params[:instance_id]
- @instance = Deltacloud::Instance.new( :id => params[:instance_id] )
+ @opts[:instance] = Deltacloud::Instance.new( :id => params[:instance_id] )
end
collection :images do
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/lib/deltacloud/collections/instances.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/collections/instances.rb b/server/lib/deltacloud/collections/instances.rb
index 7ee662d..6038bee 100644
--- a/server/lib/deltacloud/collections/instances.rb
+++ b/server/lib/deltacloud/collections/instances.rb
@@ -22,13 +22,22 @@ module Deltacloud::Collections
check_features :for => lambda { |c, f| driver.class.has_feature?(c, f) }
new_route_for(:instances) do
- @instance = Deltacloud::Instance.new( { :id=>params[:id], :image_id=>params[:image_id] } )
- @image = driver.image(credentials, :id => params[:image_id])
- @hardware_profiles = driver.hardware_profiles(credentials, :architecture => @image.architecture )
- @realms = [Deltacloud::Realm.new(:id => params[:realm_id])] if params[:realm_id]
- @realms ||= driver.realms(credentials)
- @firewalls = driver.firewalls(credentials) if driver.class.has_feature? :instances, :firewalls
- @keys = driver.keys(credentials) if driver.class.has_feature? :instances, :authentication_key
+ @opts = {
+ :instance => Deltacloud::Instance.new(:id=>params[:id], :image_id=>params[:image_id]),
+ }
+ @opts[:image] = driver.image(credentials, :id => params[:image_id])
+ @opts[:hardware_profiles] = @opts[:image].hardware_profiles
+ if params[:realm_id]
+ @opts[:realms] = [ Deltacloud::Realm.new(:id => params[:realm_id]) ] if params[:realm_id]
+ else
+ @opts[:realms] = driver.realms(credentials)
+ end
+ if driver.class.has_feature?(:instances, :firewalls)
+ @opts[:firewalls] = driver.firewalls(credentials)
+ end
+ if driver.class.has_feature?(:instances, :authentication_key)
+ @opts[:keys] = driver.keys(credentials)
+ end
end
get '/instances/:id/run' do
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/lib/deltacloud/collections/load_balancers.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/collections/load_balancers.rb b/server/lib/deltacloud/collections/load_balancers.rb
index 7a75c85..9c0a918 100644
--- a/server/lib/deltacloud/collections/load_balancers.rb
+++ b/server/lib/deltacloud/collections/load_balancers.rb
@@ -19,7 +19,7 @@ module Deltacloud::Collections
set :capability, lambda { |m| driver.respond_to? m }
new_route_for :load_balancers do
- @realms = driver.realms(credentials)
+ @opts[:realms] = driver.realms(credentials)
end
collection :load_balancers do
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/lib/deltacloud/collections/storage_volumes.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/collections/storage_volumes.rb b/server/lib/deltacloud/collections/storage_volumes.rb
index e02418f..b3a2958 100644
--- a/server/lib/deltacloud/collections/storage_volumes.rb
+++ b/server/lib/deltacloud/collections/storage_volumes.rb
@@ -24,7 +24,7 @@ module Deltacloud::Collections
new_route_for(:storage_volumes)
get "/storage_volumes/:id/attach_instance" do
- @instances = driver.instances(credentials)
+ @opts[:instances] = driver.instances(credentials)
respond_to do |format|
format.html{ haml :"storage_volumes/attach"}
end
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/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 32f13b0..7c9b5d3 100644
--- a/server/lib/deltacloud/helpers/deltacloud_helper.rb
+++ b/server/lib/deltacloud/helpers/deltacloud_helper.rb
@@ -324,10 +324,11 @@ module Deltacloud::Helpers
def new_route_for(route, &block)
get '/%s/new' % route.to_s do
+ @opts = {}
instance_eval(&block) if block_given?
respond_to do |format|
format.html do
- haml :"#{route}/new"
+ haml :"#{route}/new", :locals => @opts
end
end
end
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/addresses/_address.html.haml
----------------------------------------------------------------------
diff --git a/server/views/addresses/_address.html.haml b/server/views/addresses/_address.html.haml
index 28420a1..4a75311 100644
--- a/server/views/addresses/_address.html.haml
+++ b/server/views/addresses/_address.html.haml
@@ -1,6 +1,6 @@
%li
- %a{ :href => address_url(@address.id), :'data-ajax' => 'false'}
+ %a{ :href => address_url(address.id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/address.png'}
- %h3= @address.id
+ %h3= address.id
%span{ :class => 'ui-li-count'}
- = @address.instance_id ? @address.instance_id : 'Free'
+ = address.instance_id ? address.instance_id : 'Free'
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/addresses/associate.html.haml
----------------------------------------------------------------------
diff --git a/server/views/addresses/associate.html.haml b/server/views/addresses/associate.html.haml
index b4fb707..cc8b300 100644
--- a/server/views/addresses/associate.html.haml
+++ b/server/views/addresses/associate.html.haml
@@ -1,12 +1,12 @@
=header "Associate to instance"
-=subheader @address.id
+=subheader address.id
%div{ :'data-role' => :content, :'data-theme' => 'c', :class => 'middle-dialog'}
- %form{ :action => "#{address_url(@address.id)}/associate", :method => :post}
+ %form{ :action => "#{address_url(address.id)}/associate", :method => :post}
%div{ 'data-role' => :fieldcontain }
%label{ :for => :name} Instance:
%select{:name => 'instance_id'}
%option
- - @instances.each do |inst|
+ - instances.each do |inst|
%option{ :value => inst.id } #{inst.id} - #{inst.name}
%button{ :type => :submit} Associate
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/addresses/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/addresses/index.html.haml b/server/views/addresses/index.html.haml
index 7c72735..c4b2dcb 100644
--- a/server/views/addresses/index.html.haml
+++ b/server/views/addresses/index.html.haml
@@ -5,5 +5,5 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul#address_list{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'a'}
%li{ :'data-role' => 'list-divider'}=driver_symbol
- - @elements.each do |address|
- = haml :"addresses/_address", :locals => { :@address => address, :partial => true }
+ - elements.each do |address|
+ = haml :"addresses/_address", :locals => { :address => address, :partial => true }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/addresses/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/addresses/show.html.haml b/server/views/addresses/show.html.haml
index d4d146c..4883d83 100644
--- a/server/views/addresses/show.html.haml
+++ b/server/views/addresses/show.html.haml
@@ -1,20 +1,20 @@
=header "Address"
-=subheader @address.id
+=subheader address.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Address
%li
- %p{ :'data-role' => 'fieldcontain'}=@address.id
+ %p{ :'data-role' => 'fieldcontain'}=address.id
%li{ :'data-role' => 'list-divider'} Associated to instance
%li
- %p{ :'data-role' => 'fieldcontain'}=@address.instance_id || "Not associated yet"
+ %p{ :'data-role' => 'fieldcontain'}=address.instance_id || "Not associated yet"
%li{ :'data-role' => 'list-divider'} Actions
%li
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
- - if @address.associated?
- =link_to_action 'Disassociate', "#{address_url(@address.id)}/disassociate", :post
+ - if address.associated?
+ =link_to_action 'Disassociate', "#{address_url(address.id)}/disassociate", :post
- else
- if driver.respond_to?(:associate_address)
- =link_to_action 'Associate...',"#{address_url(@address.id)}/associate", :get
- =link_to_action "Destroy", destroy_address_url(@address.id), :delete
+ =link_to_action 'Associate...',"#{address_url(address.id)}/associate", :get
+ =link_to_action "Destroy", destroy_address_url(address.id), :delete
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/api/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/api/show.html.haml b/server/views/api/show.html.haml
index 57f32b6..60f29ac 100644
--- a/server/views/api/show.html.haml
+++ b/server/views/api/show.html.haml
@@ -22,7 +22,7 @@
- unless driver.configured_providers.empty?
%div{ :'data-role' => :footer, :'data-theme' => 'a'}
%form{ :action => settings.root_url, :method => :post, :'data-ajax' => 'false'}
- - if @driver_name
+ - if driver_name
%input{ :name => :driver, :type => :hidden, :value => driver.name }/
%fieldset{ :'data-type' => "horizontal", :'data-role' => "controlgroup", :id => "providers" }
%select{:name => 'provider', :'data-inline' => 'true', :'data-native-menu' => 'false'}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/blobs/new.html.haml
----------------------------------------------------------------------
diff --git a/server/views/blobs/new.html.haml b/server/views/blobs/new.html.haml
index 93cd9c7..62f9263 100644
--- a/server/views/blobs/new.html.haml
+++ b/server/views/blobs/new.html.haml
@@ -1,7 +1,7 @@
=header "Create new blob"
%div{ :'data-role' => :content, :'data-theme' => 'c', :class => 'middle-dialog'}
- %form{ :action => bucket_url(@bucket_id), :method => :post, :enctype => 'multipart/form-data', "data-ajax" => "false"}
+ %form{ :action => bucket_url(bucket_id), :method => :post, :enctype => 'multipart/form-data', "data-ajax" => "false"}
%div{ 'data-role' => :fieldcontain }
%label
Blob Name:
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/blobs/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/blobs/show.html.haml b/server/views/blobs/show.html.haml
index b037ed8..0a4fefe 100644
--- a/server/views/blobs/show.html.haml
+++ b/server/views/blobs/show.html.haml
@@ -1,31 +1,31 @@
=header "Blob"
-=subheader @blob.id
+=subheader blob.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Bucket
%li
- %p{ :'data-role' => 'fieldcontain'}=@blob.bucket
+ %p{ :'data-role' => 'fieldcontain'}=blob.bucket
%li{ :'data-role' => 'list-divider'} Content length
%li
- %p{ :'data-role' => 'fieldcontain'}=@blob.content_length
+ %p{ :'data-role' => 'fieldcontain'}=blob.content_length
%li{ :'data-role' => 'list-divider'} Content type
%li
- %p{ :'data-role' => 'fieldcontain'}=@blob.content_type
+ %p{ :'data-role' => 'fieldcontain'}=blob.content_type
%li{ :'data-role' => 'list-divider'} Last modified
%li
- %p{ :'data-role' => 'fieldcontain'}=@blob.last_modified
+ %p{ :'data-role' => 'fieldcontain'}=blob.last_modified
%li{ :'data-role' => 'list-divider'} Content
%li
- %a{ :href => bucket_url(@blob.bucket) + '/' + @blob.id + '/content' }="Download"
+ %a{ :href => bucket_url(blob.bucket) + '/' + blob.id + '/content' }="Download"
%li{ :'data-role' => 'list-divider'} User meta-data
%li
%p{ :'data-role' => 'fieldcontain'}
- - @blob.user_metadata.each do |k,v|
+ - blob.user_metadata.each do |k,v|
%b #{k} :
#{v}
%br
%li{ :'data-role' => 'list-divider'} Actions
%li
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
- =link_to_action 'Delete',bucket_url(@blob.bucket) + '/' + @blob.id, :delete
+ =link_to_action 'Delete',bucket_url(blob.bucket) + '/' + blob.id, :delete
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/buckets/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/buckets/index.html.haml b/server/views/buckets/index.html.haml
index 48dc699..0db02ec 100644
--- a/server/views/buckets/index.html.haml
+++ b/server/views/buckets/index.html.haml
@@ -3,7 +3,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'a'}
- - @buckets.each do |bucket|
+ - elements.each do |bucket|
%li
%a{ :href => bucket_url(bucket.id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/bucket.png'}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/buckets/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/buckets/show.html.haml b/server/views/buckets/show.html.haml
index 0ea89dc..c440954 100644
--- a/server/views/buckets/show.html.haml
+++ b/server/views/buckets/show.html.haml
@@ -1,23 +1,23 @@
=header "Bucket"
-=subheader @bucket.id
+=subheader bucket.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Name
%li
- %p{ :'data-role' => 'fieldcontain'}=@bucket.name
+ %p{ :'data-role' => 'fieldcontain'}=bucket.name
%li{ :'data-role' => 'list-divider'} Size
%li
- %p{ :'data-role' => 'fieldcontain'}=@bucket.size
+ %p{ :'data-role' => 'fieldcontain'}=bucket.size
%li{ :'data-role' => 'list-divider'}
Blobs
- - @bucket.blob_list.each do |blob|
+ - bucket.blob_list.each do |blob|
%li
- %a{ :href => bucket_url(@bucket.name) + "/" + blob, :'data-ajax' => 'false'}
+ %a{ :href => bucket_url(bucket.name) + "/" + blob, :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/blob.png'}
%h3=blob
%li{ :'data-role' => 'list-divider'} Actions
%li
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
- %a{ :href => new_blob_form_url(@bucket), :'data-role' => "button", :'data-ajax' => 'false'} Create new blob...
- =link_to_action 'Delete bucket', destroy_bucket_url(@bucket.name), :delete
+ %a{ :href => new_blob_form_url(bucket), :'data-role' => "button", :'data-ajax' => 'false'} Create new blob...
+ =link_to_action 'Delete bucket', destroy_bucket_url(bucket.name), :delete
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/docs/collection.html.haml
----------------------------------------------------------------------
diff --git a/server/views/docs/collection.html.haml b/server/views/docs/collection.html.haml
index 7485b60..a973b4f 100644
--- a/server/views/docs/collection.html.haml
+++ b/server/views/docs/collection.html.haml
@@ -1,5 +1,5 @@
=header "Deltacloud API #{settings.version} documentation", :back => 'false'
-=subheader @collection.name.to_s.titlecase
+=subheader collection.name.to_s.titlecase
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
@@ -8,18 +8,18 @@
Collection description:
%li
%br
- %p{ :'data-role' => 'fieldcontain'}=@collection.description
+ %p{ :'data-role' => 'fieldcontain'}=collection.description
%li{ :'data-role' => 'list-divider', :'data-divider-theme' => 'a'}
%h3 Operations:
- - @operations.keys.sort_by { |k| k.to_s }.each do |operation|
+ - operations.keys.sort_by { |k| k.to_s }.each do |operation|
%li{ :'data-role' => 'list-divider'}
- %a{:href => url_for("docs/#{@collection.name.to_s}/#{operation}"), :'data-ajax' => 'false'} #{operation}
+ %a{:href => url_for("docs/#{collection.name.to_s}/#{operation}"), :'data-ajax' => 'false'} #{operation}
%li
%br
- %p=@operations[operation].description
+ %p=operations[operation].description
%li{ :'data-role' => 'list-divider', :'data-divider-theme' => 'a'}
%h3 Defined features:
- - @features.sort_by { |f| f.name.to_s }.each do |feature|
+ - features.sort_by { |f| f.name.to_s }.each do |feature|
%li{ :'data-role' => 'list-divider'}=feature.name
%li
%br
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/docs/operation.html.haml
----------------------------------------------------------------------
diff --git a/server/views/docs/operation.html.haml b/server/views/docs/operation.html.haml
index b63d36c..6baed0b 100644
--- a/server/views/docs/operation.html.haml
+++ b/server/views/docs/operation.html.haml
@@ -1,5 +1,5 @@
=header "Deltacloud API #{settings.version} documentation", :back => 'false'
-=subheader "#{action_method(@operation.name, @collection.name).to_s.upcase} /api/#{@collection.name}/#{@operation.name}"
+=subheader "#{action_method(operation.name, collection.name).to_s.upcase} /api/#{collection.name}/#{operation.name}"
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
@@ -8,12 +8,12 @@
Description:
%li
%br
- %p=@operation.description
+ %p=operation.description
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider', :'data-divider-theme' => 'a'}
%h3 Parameters:
- - @operation.each_param do |p|
+ - operation.each_param do |p|
%li{ :'data-role' => 'list-divider'}
=p.name
%span{ :class => 'ui-li-count'}
@@ -21,8 +21,8 @@
%li
%br
%p=p.description.empty? ? '<strong>FIXME:</strong> No description for this parameter' : p.description
- - @features.sort { |a,b| a.name.to_s <=> b.name.to_s }.each do |f|
- - f.decl.operation(@operation.name).each_param do |p|
+ - features.sort { |a,b| a.name.to_s <=> b.name.to_s }.each do |f|
+ - f.decl.operation(operation.name).each_param do |p|
%li{ :'data-role' => 'list-divider'}
=p.name
%span{ :class => 'ui-li-count'}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/drivers/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/drivers/index.html.haml b/server/views/drivers/index.html.haml
index 6a9d866..3f8156a 100644
--- a/server/views/drivers/index.html.haml
+++ b/server/views/drivers/index.html.haml
@@ -3,7 +3,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'a'}
- - @drivers.each do |id, details|
+ - drivers.each do |id, details|
%li
%a{ :href => driver_url(id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/cloud.png'}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/error.html.haml
----------------------------------------------------------------------
diff --git a/server/views/error.html.haml b/server/views/error.html.haml
index 220a44a..31350dd 100644
--- a/server/views/error.html.haml
+++ b/server/views/error.html.haml
@@ -17,8 +17,8 @@
%body
%div{ 'data-role' => :page, :'data-theme' => 'e', :class => :error }
=header "#{response.status} - #{translate_error_code(response.status)[:message]}"
- - if @error
- =subheader @error.message
+ - if err
+ =subheader err.message
- elsif response.status.to_s =~ /4(\d{2})/
=subheader request.env['REQUEST_URI']
= yield
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/firewalls/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/firewalls/index.html.haml b/server/views/firewalls/index.html.haml
index f497b59..5862e4b 100644
--- a/server/views/firewalls/index.html.haml
+++ b/server/views/firewalls/index.html.haml
@@ -5,7 +5,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'a'}
%li{ :'data-role' => 'list-divider'}=driver_symbol
- - @firewalls.each do |firewall|
+ - firewalls.each do |firewall|
%li
%a{ :href => firewall_url(firewall.id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/firewall.png'}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/firewalls/new_rule.html.haml
----------------------------------------------------------------------
diff --git a/server/views/firewalls/new_rule.html.haml b/server/views/firewalls/new_rule.html.haml
index cfa3cef..ecac451 100644
--- a/server/views/firewalls/new_rule.html.haml
+++ b/server/views/firewalls/new_rule.html.haml
@@ -1,7 +1,7 @@
=header "New firewall rule"
%div{ :'data-role' => :content, :'data-theme' => 'c', :class => 'middle-dialog', :id => "new_rule_form"}
- %form{ :action => "#{firewall_url(@firewall_name)}/rules", :method => :post, :'data-ajax' => 'false'}
+ %form{ :action => "#{firewall_url(firewall_name)}/rules", :method => :post, :'data-ajax' => 'false'}
%div{ 'data-role' => :fieldcontain }
%label{ :for => :name} Protocol:
%input{ :type => :text, :id => :protocol, :name => :protocol, :value => '', :size => 10 }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/firewalls/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/firewalls/show.html.haml b/server/views/firewalls/show.html.haml
index c2fd5d0..c56ce33 100644
--- a/server/views/firewalls/show.html.haml
+++ b/server/views/firewalls/show.html.haml
@@ -1,27 +1,27 @@
=header "Firewall"
-=subheader @firewall.id
+=subheader firewall.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Identifier
%li
- %p{ :'data-role' => 'fieldcontain'}=@firewall.id
+ %p{ :'data-role' => 'fieldcontain'}=firewall.id
%li{ :'data-role' => 'list-divider'} Description
%li
- %p{ :'data-role' => 'fieldcontain'}=@firewall.description
+ %p{ :'data-role' => 'fieldcontain'}=firewall.description
%li{ :'data-role' => 'list-divider'} Owner
%li
- %p{ :'data-role' => 'fieldcontain'}=@firewall.owner_id
+ %p{ :'data-role' => 'fieldcontain'}=firewall.owner_id
%li{ :'data-role' => 'list-divider'} Actions
%li
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
- =link_to_action "Destroy", destroy_firewall_url(@firewall.id), :delete
+ =link_to_action "Destroy", destroy_firewall_url(firewall.id), :delete
=header "Rules", :back => 'false' do
- %a{ :href => url_for("firewalls/#{@firewall.id}/new_rule"), :'data-icon' => :plus, :'data-role' => :button, :class => 'ui-btn-right', :'data-ajax' => 'false'} Add new rule
+ %a{ :href => url_for("firewalls/#{firewall.id}/new_rule"), :'data-icon' => :plus, :'data-role' => :button, :class => 'ui-btn-right', :'data-ajax' => 'false'} Add new rule
%div{ :'data-role' => :content, :'data-theme' => 'c'}
- - @firewall.rules.each do |rule|
+ - firewall.rules.each do |rule|
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'}
%strong=rule.id
@@ -39,4 +39,4 @@
%li{ :'data-role' => 'list-divider'} Actions
%li
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
- =link_to_action "Delete", "#{firewall_url(@firewall.id)}/#{rule.id}", :delete
+ =link_to_action "Delete", "#{firewall_url(firewall.id)}/#{rule.id}", :delete
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/hardware_profiles/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/hardware_profiles/index.html.haml b/server/views/hardware_profiles/index.html.haml
index f02cb53..c3c7342 100644
--- a/server/views/hardware_profiles/index.html.haml
+++ b/server/views/hardware_profiles/index.html.haml
@@ -3,7 +3,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview, :'data-inset' => :true }
- - for profile in order_hardware_profiles(@hardware_profiles)
+ - for profile in order_hardware_profiles(elements)
%li{ :'data-theme' => 'c'}
%a{ :href => hardware_profile_url(profile.id)}
%img{ :class => 'ui-link-thumb', :src => '/images/profile.png'}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/hardware_profiles/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/hardware_profiles/show.html.haml b/server/views/hardware_profiles/show.html.haml
index 3fbb16f..c879779 100644
--- a/server/views/hardware_profiles/show.html.haml
+++ b/server/views/hardware_profiles/show.html.haml
@@ -1,12 +1,12 @@
=header "Hardware profiles"
-=subheader @hardware_profile.name || @hardware_profile.id
+=subheader hardware_profile.name || hardware_profile.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Name
%li
- %p{ :'data-role' => 'fieldcontain'}=@hardware_profile.name || @hardware_profile.id
- - @hardware_profile.each_property do |p|
+ %p{ :'data-role' => 'fieldcontain'}=hardware_profile.name || hardware_profile.id
+ - hardware_profile.each_property do |p|
%li{ :'data-role' => 'list-divider'} #{p.name.to_s.titlecase}
%li
%p{ :'data-role' => 'fieldcontain'}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/images/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/images/index.html.haml b/server/views/images/index.html.haml
index adcad43..bb201a3 100644
--- a/server/views/images/index.html.haml
+++ b/server/views/images/index.html.haml
@@ -4,7 +4,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'a'}
%li{ :'data-role' => 'list-divider'}=driver_symbol
- - @images.each do |image|
+ - elements.each do |image|
%li
%a{ :href => image_url(image.id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/image.png'}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/images/new.html.haml
----------------------------------------------------------------------
diff --git a/server/views/images/new.html.haml b/server/views/images/new.html.haml
index 263caf2..d2c6256 100644
--- a/server/views/images/new.html.haml
+++ b/server/views/images/new.html.haml
@@ -1,9 +1,9 @@
=header "Create new image"
-=subheader "#{@instance.id}"
+=subheader "#{instance.id}"
%div{ :'data-role' => :content, :'data-theme' => 'c', :class => 'middle-dialog'}
%form{ :action => images_url, :method => :post}
- %input{ :type => :hidden, :name => :instance_id, :value => @instance.id}
+ %input{ :type => :hidden, :name => :instance_id, :value => instance.id}
%div{ 'data-role' => :fieldcontain }
%label{ :for => :name} Name:
%input{ :type => :text, :id => :name, :name => :name, :value => '' }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/images/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/images/show.html.haml b/server/views/images/show.html.haml
index d33b3e7..fab3723 100644
--- a/server/views/images/show.html.haml
+++ b/server/views/images/show.html.haml
@@ -1,40 +1,40 @@
=header "Image"
-=subheader @image.id
+=subheader image.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Name
%li
- %p{ :'data-role' => 'fieldcontain'}=@image.name
+ %p{ :'data-role' => 'fieldcontain'}=image.name
%li{ :'data-role' => 'list-divider'} Description
%li
- %p{ :'data-role' => 'fieldcontain'}=@image.description
+ %p{ :'data-role' => 'fieldcontain'}=image.description
%li{ :'data-role' => 'list-divider'} Owner
%li
%p{ :'data-role' => 'fieldcontain'}
- %a{ :href => images_url + "?owner_id=#{@image.owner_id}"}
- =@image.owner_id
+ %a{ :href => images_url + "?owner_id=#{image.owner_id}"}
+ =image.owner_id
%li{ :'data-role' => 'list-divider'} State
%li
- %p{ :'data-role' => 'fieldcontain'}=@image.state
- - if @image.creation_time
+ %p{ :'data-role' => 'fieldcontain'}=image.state
+ - if image.creation_time
%li{ :'data-role' => 'list-divider'} Creation Time
%li
- %p{ :'data-role' => 'fieldcontain'}=@image.creation_time
+ %p{ :'data-role' => 'fieldcontain'}=image.creation_time
%li{ :'data-role' => 'list-divider'} Root Device Type
%li
- %p{ :'data-role' => 'fieldcontain'}=@image.root_type
+ %p{ :'data-role' => 'fieldcontain'}=image.root_type
%li{ :'data-role' => 'list-divider'} Architecture
%li
- %p{ :'data-role' => 'fieldcontain'}=@image.architecture
- - if @image.hardware_profiles
+ %p{ :'data-role' => 'fieldcontain'}=image.architecture
+ - if image.hardware_profiles
%li{ :'data-role' => 'list-divider'} Compatible Hardware Profiles
%li
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
- - @image.hardware_profiles.each do |hwp|
+ - image.hardware_profiles.each do |hwp|
%a{ :href => url_for("hardware_profiles/#{hwp.id}"), :'data-role' => "button", :'data-ajax' => 'false'} #{hwp.name}
%li{ :'data-role' => 'list-divider'} Actions
%li
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
- %a{ :href => url_for("instances/new?image_id=#{@image.id}"), :'data-role' => "button", :'data-ajax' => 'false'} Launch...
- = link_to_action 'Destroy', destroy_image_url(@image.id), :delete
+ %a{ :href => url_for("instances/new?image_id=#{image.id}"), :'data-role' => "button", :'data-ajax' => 'false'} Launch...
+ = link_to_action 'Destroy', destroy_image_url(image.id), :delete
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/instance_states/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/instance_states/show.html.haml b/server/views/instance_states/show.html.haml
index 2a94801..2f5b1d6 100644
--- a/server/views/instance_states/show.html.haml
+++ b/server/views/instance_states/show.html.haml
@@ -5,7 +5,7 @@
%img{ :src => url_for('instance_states?format=png') }
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-theme' => 'a'}
- - @machine.states.each do |state|
+ - machine.states.each do |state|
%li{ :'data-role' => 'list-divider', :'class' => 'ui-bar-a', :'data-theme' => 'a'}=state
- if state.transitions.empty?
%li{ :'data-role' => 'list-divider'} Action
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/instances/new.html.haml
----------------------------------------------------------------------
diff --git a/server/views/instances/new.html.haml b/server/views/instances/new.html.haml
index f6f674e..f508e7f 100644
--- a/server/views/instances/new.html.haml
+++ b/server/views/instances/new.html.haml
@@ -1,8 +1,8 @@
=header "Launch new instance"
-=subheader "#{@image.id}"
+=subheader "#{image.id}"
.hidden_content
- - @image.hardware_profiles.each do |profile|
+ - hardware_profiles.each do |profile|
%div{ :'data-role' => :fieldcontain, :id => "hwp_properties_#{profile.name}", :class => 'property_block'}
- profile.properties.reject { |prop| prop.fixed? }.each do |prop|
%label{ :for => "#{prop.param}_#{profile.name}", :class => 'ui-input-text' }=prop.name
@@ -19,7 +19,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c', :class => 'middle-dialog'}
%form{ :action => instances_url, :method => :post, :class => :new_instance, :enctype => 'multipart/form-data', :'data-ajax' => 'false'}
- %input{ :name => :image_id, :type => :hidden, :value => @instance.image_id }/
+ %input{ :name => :image_id, :type => :hidden, :value => instance.image_id }/
- if driver.class.has_feature?(:instances, :user_name)
%div{ 'data-role' => :fieldcontain }
@@ -52,7 +52,7 @@
%label{ :for => :keyname, :class => 'ui-input-text'} Instance SSH key:
%select{:name => 'keyname', :'data-native-menu' => "true" }
%option{ :value => ''} None
- - @keys.each do |key|
+ - keys.each do |key|
%option{ :value => key.id } #{key.id}
- if driver.class.has_feature?(:instances, :register_to_load_balancer)
@@ -60,20 +60,20 @@
%label{ :for => :load_balancer_id, :class => 'ui-input-text'} Register to loadbalancer:
%select{:name => 'load_balancer_id', :'data-native-menu' => "true" }
%option{ :value => ''} None
- - @load_balancers.each do |load_balancer|
+ - load_balancers.each do |load_balancer|
%option{:value => load_balancer.id} #{load_balancer.id}
- if driver.class.has_feature?(:instances, :firewalls)
%div{ 'data-role' => :fieldcontain }
%fieldset{ :'data-role' => 'controlgroup'}
%legend Register to firewall:
- - @firewalls.each_index do |i|
- - if @firewalls[i].name == 'default'
- %input{:type => :checkbox, :value => @firewalls[i].name, :name => "firewalls#{i}", :checked => :true, :id => "firewalls#{i}"}/
+ - firewalls.each_index do |i|
+ - if firewalls[i].name == 'default'
+ %input{:type => :checkbox, :value => firewalls[i].name, :name => "firewalls#{i}", :checked => :true, :id => "firewalls#{i}"}/
%label{:for => "firewalls#{i}"} Default
- else
- %input{:type => :checkbox, :value => @firewalls[i].name, :name => "firewalls#{i}", :id => "firewalls#{i}"}/
- %label{:for => "firewalls#{i}"}=@firewalls[i].name
+ %input{:type => :checkbox, :value => firewalls[i].name, :name => "firewalls#{i}", :id => "firewalls#{i}"}/
+ %label{:for => "firewalls#{i}"}=firewalls[i].name
- if driver.class.has_feature?(:instances, :user_files)
%div{ 'data-role' => :fieldcontain }
@@ -84,21 +84,21 @@
%input{ :type => :text, :id => "path#{i}", :name => "path#{i}", :value => ""} Path #{i}
%input{ :type => "file", :name => "content#{i}", :size => 50 }
- - if !@hardware_profiles.empty?
+ - if !hardware_profiles.empty?
%div{ 'data-role' => :fieldcontain }
%h3 Instance profile
%fieldset{ :'data-role' => :fieldcontain}
- - @hardware_profiles.each do |profile|
+ - hardware_profiles.each do |profile|
%input{ :type => :radio, :name => 'hwp_id', :value => profile.id, :id => profile.name, :'data-theme' => 'b'}/
%label{ :for => profile.name, :onclick => "expandHWP('#{profile.name}');"}="#{profile.name} - #{profile.memory} MB"
%div{ :'data-role' => :fieldcontain, :id => "property_container_#{profile.name}", :class => 'hwp_properties'}
- - if !@realms.empty?
+ - if !realms.empty?
%div{ 'data-role' => :fieldcontain }
%h3 Where do you want it?
%fieldset{ :'data-role' => :fieldcontain}
%legend
- - @realms.each do |realm|
+ - realms.each do |realm|
%div{ :'data-role' => :fieldcontain}
%label{ :for => realm.id }= "#{realm.name}, #{realm.limit}"
%input{ :type => :radio, :name => 'realm_id', :value => realm.id, :id => realm.id, :'data-theme' => 'b' }/
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/keys/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/keys/index.html.haml b/server/views/keys/index.html.haml
index 43efd76..ec83f68 100644
--- a/server/views/keys/index.html.haml
+++ b/server/views/keys/index.html.haml
@@ -3,7 +3,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'a'}
- - @elements.each do |key|
+ - elements.each do |key|
%li
%a{ :href => key_url(key.id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/key.png'}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/keys/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/keys/show.html.haml b/server/views/keys/show.html.haml
index 2b2a11e..bfd8287 100644
--- a/server/views/keys/show.html.haml
+++ b/server/views/keys/show.html.haml
@@ -1,31 +1,31 @@
=header "Key"
-=subheader @key.id
+=subheader key.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Identifier
%li
- %p{ :'data-role' => 'fieldcontain'}=@key.id
+ %p{ :'data-role' => 'fieldcontain'}=key.id
%li{ :'data-role' => 'list-divider'} Name
%li
- %p{ :'data-role' => 'fieldcontain'}=@key.name
- - if @key.is_password?
+ %p{ :'data-role' => 'fieldcontain'}=key.name
+ - if key.is_password?
%li{ :'data-role' => 'list-divider'} Username
%li
- %p{ :'data-role' => 'fieldcontain'}=@key.username
+ %p{ :'data-role' => 'fieldcontain'}=key.username
%li{ :'data-role' => 'list-divider'} Password
%li
- %p{ :'data-role' => 'fieldcontain'}=@key.password
+ %p{ :'data-role' => 'fieldcontain'}=key.password
- else
- - if @key.fingerprint
+ - if key.fingerprint
%li{ :'data-role' => 'list-divider'} Fingerprint
%li
- %p{ :'data-role' => 'fieldcontain'}=@key.fingerprint
+ %p{ :'data-role' => 'fieldcontain'}=key.fingerprint
%li{ :'data-role' => 'list-divider'} PEM key
%li
%p{ :'data-role' => 'fieldcontain'}
- %pre{:style=> 'width:600px;overflow:auto;'}=@key.pem_rsa_key
+ %pre{:style=> 'width:600px;overflow:auto;'}=key.pem_rsa_key
%li{ :'data-role' => 'list-divider'} Actions
%li
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
- =link_to_action "Destroy", destroy_key_url(@key.id), :delete
+ =link_to_action "Destroy", destroy_key_url(key.id), :delete
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/load_balancers/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/load_balancers/index.html.haml b/server/views/load_balancers/index.html.haml
index 789cd57..8b2f41f 100644
--- a/server/views/load_balancers/index.html.haml
+++ b/server/views/load_balancers/index.html.haml
@@ -4,7 +4,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'a'}
- - @elements.each do |balancer|
+ - elements.each do |balancer|
%li
%a{ :href => load_balancer_url(balancer.id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/balancer.png'}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/load_balancers/new.html.haml
----------------------------------------------------------------------
diff --git a/server/views/load_balancers/new.html.haml b/server/views/load_balancers/new.html.haml
index 6dffedd..e3b4016 100644
--- a/server/views/load_balancers/new.html.haml
+++ b/server/views/load_balancers/new.html.haml
@@ -6,18 +6,18 @@
%label
Name:
%input{ :name => 'name', :size => 30 }/
- -if @instances
+ -if instances
%p
%label
Running instance:
%select{ :name => 'instance_id'}
- - @instances.select{|i| i.state=="RUNNING"}.each do |instance|
+ - instances.select{|i| i.state=="RUNNING"}.each do |instance|
%option{ :value => instance.id } #{instance.id}
%p
%label
Realm:
%select{ :name => 'realm_id'}
- - @realms.each do |realm|
+ - realms.each do |realm|
%option{ :value => realm.id } #{realm.id} - #{realm.name}
%hr
%p
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/load_balancers/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/load_balancers/show.html.haml b/server/views/load_balancers/show.html.haml
index 7123319..063d271 100644
--- a/server/views/load_balancers/show.html.haml
+++ b/server/views/load_balancers/show.html.haml
@@ -1,39 +1,39 @@
=header "Load balancer"
-=subheader @load_balancer.id
+=subheader load_balancer.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Created at
%li
- %p{ :'data-role' => 'fieldcontain'}=@load_balancer.created_at
+ %p{ :'data-role' => 'fieldcontain'}=load_balancer.created_at
%li{ :'data-role' => 'list-divider'} Public addresses
- - @load_balancer.public_addresses.each do |address|
+ - load_balancer.public_addresses.each do |address|
%li
%p{ :'data-role' => 'fieldcontain'}=address
%li{ :'data-role' => 'list-divider'} Realms
- - @load_balancer.realms.each do |realm|
+ - load_balancer.realms.each do |realm|
%li
%a{ :href => realm_url(realm.id), :'data-ajax' => 'false'}
%h3=realm.name
%li{ :'data-role' => 'list-divider'} Registered Instances
- - @registered_instances.each do |instance|
+ - registered_instances.each do |instance|
%li
%a{ :href => instance_url(instance[:id]), :'data-ajax' => 'false'}
%h3=instance[:name]
- =link_to_action "Unregister", url_for("load_balancers/#{@load_balancer.id}/unregister?instance_id=#{instance[:id]}"), :post
+ =link_to_action "Unregister", url_for("load_balancers/#{load_balancer.id}/unregister?instance_id=#{instance[:id]}"), :post
%li{ :'data-role' => 'list-divider'} Unregistered Instances
- - @unregistered_instances.each do |instance|
+ - unregistered_instances.each do |instance|
%li
%a{:href => instance_url(instance[:id]), :'data-ajax' => 'false'}
%h3=instance[:name]
- =link_to_action "Register", url_for("load_balancers/#{@load_balancer.id}/register?instance_id=#{instance[:id]}"), :post
+ =link_to_action "Register", url_for("load_balancers/#{load_balancer.id}/register?instance_id=#{instance[:id]}"), :post
%li{ :'data-role' => 'list-divider'} Actions
%li
- =link_to_action "Destroy", url_for("load_balancers/#{@load_balancer.id}"), :delete
+ =link_to_action "Destroy", url_for("load_balancers/#{load_balancer.id}"), :delete
=header "Listeners", :back => 'false'
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
- - @load_balancer.listeners.each do |listener|
+ - load_balancer.listeners.each do |listener|
%li{ :'data-role' => 'list-divider'} Load balancer port
%li
%p{ :'data-role' => 'fieldcontain'}=listener.load_balancer_port
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/metrics/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/metrics/index.html.haml b/server/views/metrics/index.html.haml
index 21a9015..e4277ae 100644
--- a/server/views/metrics/index.html.haml
+++ b/server/views/metrics/index.html.haml
@@ -4,7 +4,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'a'}
%li{ :'data-role' => 'list-divider'}=driver_symbol
- - @metrics.each do |metric|
+ - metrics.each do |metric|
%li
%a{ :href => metric_url(metric.id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/metric.png'}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/metrics/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/metrics/show.html.haml b/server/views/metrics/show.html.haml
index 648ba33..403c0fd 100644
--- a/server/views/metrics/show.html.haml
+++ b/server/views/metrics/show.html.haml
@@ -1,9 +1,9 @@
=header Metric
-=subheader @metric.id
+=subheader metric.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%div{ :'data-role' => :'collapsible-set'}
- - @metric.properties.each do |p|
+ - metric.properties.each do |p|
%div{ :'data-role' => :'collapsible', :'data-collapse' => 'true'}
%h3=p.name
%table{ :summary => "#{p.name} values"}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/realms/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/realms/index.html.haml b/server/views/realms/index.html.haml
index 5e91e56..b041003 100644
--- a/server/views/realms/index.html.haml
+++ b/server/views/realms/index.html.haml
@@ -4,7 +4,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'a'}
%li{ :'data-role' => 'list-divider'}=driver_symbol
- - @realms.each do |realm|
+ - elements.each do |realm|
%li
%a{ :href => realm_url(realm.id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/realm.png'}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/realms/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/realms/show.html.haml b/server/views/realms/show.html.haml
index f2c52f7..a2acd4d 100644
--- a/server/views/realms/show.html.haml
+++ b/server/views/realms/show.html.haml
@@ -1,17 +1,17 @@
=header Realm
-=subheader @realm.id
+=subheader realm.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Identifier
%li
- %p{ :'data-role' => 'fieldcontain'}=@realm.id
+ %p{ :'data-role' => 'fieldcontain'}=realm.id
%li{ :'data-role' => 'list-divider'} Name
%li
- %p{ :'data-role' => 'fieldcontain'}=@realm.name
+ %p{ :'data-role' => 'fieldcontain'}=realm.name
%li{ :'data-role' => 'list-divider'} State
%li
- %p{ :'data-role' => 'fieldcontain'}=@realm.state
+ %p{ :'data-role' => 'fieldcontain'}=realm.state
%li{ :'data-role' => 'list-divider'} Limit
%li
- %p{ :'data-role' => 'fieldcontain'}=@realm.limit
+ %p{ :'data-role' => 'fieldcontain'}=realm.limit
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/storage_snapshots/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/storage_snapshots/index.html.haml b/server/views/storage_snapshots/index.html.haml
index 4443141..3b94b67 100644
--- a/server/views/storage_snapshots/index.html.haml
+++ b/server/views/storage_snapshots/index.html.haml
@@ -3,7 +3,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'a'}
%li{ :'data-role' => 'list-divider'}=driver_symbol
- - @storage_snapshots.each do |snapshot|
+ - elements.each do |snapshot|
%li
%a{ :href => storage_snapshot_url(snapshot.id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/snapshot.png'}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/storage_snapshots/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/storage_snapshots/show.html.haml b/server/views/storage_snapshots/show.html.haml
index 069e452..a23b677 100644
--- a/server/views/storage_snapshots/show.html.haml
+++ b/server/views/storage_snapshots/show.html.haml
@@ -1,22 +1,22 @@
=header "Storage snapshot"
-=subheader @storage_snapshot.id
+=subheader storage_snapshot.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Name
%li
- %p{ :'data-role' => 'fieldcontain'}=@storage_snapshot.id
+ %p{ :'data-role' => 'fieldcontain'}=storage_snapshot.id
%li{ :'data-role' => 'list-divider'} Storage volume
%li
- %p{ :'data-role' => 'fieldcontain'}=@storage_snapshot.storage_volume_id
+ %p{ :'data-role' => 'fieldcontain'}=storage_snapshot.storage_volume_id
%li{ :'data-role' => 'list-divider'} Created
%li
- %p{ :'data-role' => 'fieldcontain'}=@storage_snapshot.created
+ %p{ :'data-role' => 'fieldcontain'}=storage_snapshot.created
%li{ :'data-role' => 'list-divider'} State
%li
- %p{ :'data-role' => 'fieldcontain'}=@storage_snapshot.state
+ %p{ :'data-role' => 'fieldcontain'}=storage_snapshot.state
%li{ :'data-role' => 'list-divider'} Actions
%li
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
- if driver.respond_to?(:destroy_storage_snapshot)
- =link_to_action "Delete", url_for("storage_snapshots/#{@storage_snapshot.id}"), :delete
+ =link_to_action "Delete", url_for("storage_snapshots/#{storage_snapshot.id}"), :delete
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/storage_volumes/attach.html.haml
----------------------------------------------------------------------
diff --git a/server/views/storage_volumes/attach.html.haml b/server/views/storage_volumes/attach.html.haml
index 073cc2a..0deb638 100644
--- a/server/views/storage_volumes/attach.html.haml
+++ b/server/views/storage_volumes/attach.html.haml
@@ -4,12 +4,12 @@
%p
%label
Instance ID:
- - if @instances.empty?
+ - if instances.empty?
%select
%option There are no instances
- else
%select{ :name => 'instance_id' }
- - @instances.each do |i|
+ - instances.each do |i|
%option{ :value => "#{i.id}"} #{i.name}
%p
%label
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/storage_volumes/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/storage_volumes/index.html.haml b/server/views/storage_volumes/index.html.haml
index 2cc8794..2a3570c 100644
--- a/server/views/storage_volumes/index.html.haml
+++ b/server/views/storage_volumes/index.html.haml
@@ -4,7 +4,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'a'}
%li{ :'data-role' => 'list-divider'}=driver_symbol
- - @storage_volumes.each do |volume|
+ - elements.each do |volume|
%li
%a{ :href => storage_volume_url(volume.id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/volume.png'}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a19b3d1b/server/views/storage_volumes/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/storage_volumes/show.html.haml b/server/views/storage_volumes/show.html.haml
index e7a0d69..8630daa 100644
--- a/server/views/storage_volumes/show.html.haml
+++ b/server/views/storage_volumes/show.html.haml
@@ -1,43 +1,43 @@
=header "Storage volume"
-=subheader @storage_volume.id
+=subheader storage_volume.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Name
- %p{ :'data-role' => 'fieldcontain'}=@storage_volume.id
+ %p{ :'data-role' => 'fieldcontain'}=storage_volume.id
%li
- %p{ :'data-role' => 'fieldcontain'}=(@storage_volume.name ? @storage_volume.name : @storage_volume.id)
+ %p{ :'data-role' => 'fieldcontain'}=(storage_volume.name ? storage_volume.name : storage_volume.id)
%li{ :'data-role' => 'list-divider'} Created
%li
- %p{ :'data-role' => 'fieldcontain'}=@storage_volume.created
+ %p{ :'data-role' => 'fieldcontain'}=storage_volume.created
%li{ :'data-role' => 'list-divider'} Capacity
%li
- %p{ :'data-role' => 'fieldcontain'}=@storage_volume.capacity
+ %p{ :'data-role' => 'fieldcontain'}=storage_volume.capacity
%li{ :'data-role' => 'list-divider'} Realm
%li
- %p{ :'data-role' => 'fieldcontain'}=@storage_volume.realm_id
+ %p{ :'data-role' => 'fieldcontain'}=storage_volume.realm_id
%li{ :'data-role' => 'list-divider'} State
%li
- %p{ :'data-role' => 'fieldcontain'}=@storage_volume.state
+ %p{ :'data-role' => 'fieldcontain'}=storage_volume.state
%li{ :'data-role' => 'list-divider'} Attached to
%li
- - if @storage_volume.instance_id
- %a{ :href => instance_url( @storage_volume.instance_id)}
- = @storage_volume.instance_id
- - elsif @storage_volume.state and @storage_volume.state != "IN-USE"
+ - if storage_volume.instance_id
+ %a{ :href => instance_url( storage_volume.instance_id)}
+ = storage_volume.instance_id
+ - elsif storage_volume.state and storage_volume.state != "IN-USE"
%p{ :'data-role' => 'fieldcontain'}= 'none (detached)'
-else
%p{ :'data-role' => 'fieldcontain'}= 'unknown'
%li{ :'data-role' => 'list-divider'} Device
%li
- %p{ :'data-role' => 'fieldcontain'}= @storage_volume.device
+ %p{ :'data-role' => 'fieldcontain'}= storage_volume.device
%li{ :'data-role' => 'list-divider'} Actions
%li
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
- - if ["AVAILABLE", "IN-USE"].include?(@storage_volume.state)
- =link_to_action "Snapshot...", url_for("storage_snapshots/new?volume_id=#{@storage_volume.id}"), :get
- - unless @storage_volume.instance_id
- =link_to_action "Delete", url_for("storage_volumes/#{@storage_volume.id}"), :delete
- =link_to_action "Attach...", url_for("storage_volumes/#{@storage_volume.id}/attach_instance"), :get
- - if @storage_volume.instance_id
- =link_to_action "Detach", url_for("storage_volumes/#{@storage_volume.id}/detach"), :post
+ - if ["AVAILABLE", "IN-USE"].include?(storage_volume.state)
+ =link_to_action "Snapshot...", url_for("storage_snapshots/new?volume_id=#{storage_volume.id}"), :get
+ - unless storage_volume.instance_id
+ =link_to_action "Delete", url_for("storage_volumes/#{storage_volume.id}"), :delete
+ =link_to_action "Attach...", url_for("storage_volumes/#{storage_volume.id}/attach_instance"), :get
+ - if storage_volume.instance_id
+ =link_to_action "Detach", url_for("storage_volumes/#{storage_volume.id}/detach"), :post
[7/7] git commit: Core: Fixed various backward compatibility issues
in err reporting
Posted by mf...@apache.org.
Core: Fixed various backward compatibility issues in err reporting
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/95e86624
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/95e86624
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/95e86624
Branch: refs/heads/master
Commit: 95e86624c87128377891040bc55c0199f545b0fa
Parents: 5ec2798
Author: Michal Fojtik <mf...@redhat.com>
Authored: Tue Mar 26 11:00:27 2013 +0100
Committer: Michal fojtik <mf...@redhat.com>
Committed: Tue Mar 26 11:00:27 2013 +0100
----------------------------------------------------------------------
server/lib/cimi/collections/base.rb | 4 ++++
server/lib/deltacloud/helpers/deltacloud_helper.rb | 2 +-
server/lib/ec2/server.rb | 4 ++++
3 files changed, 9 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/95e86624/server/lib/cimi/collections/base.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/collections/base.rb b/server/lib/cimi/collections/base.rb
index 0d1d0ee..29657ab 100644
--- a/server/lib/cimi/collections/base.rb
+++ b/server/lib/cimi/collections/base.rb
@@ -61,6 +61,10 @@ module CIMI::Collections
report_error
end
+ error CIMI::Model::NotFound do
+ report_error(404, 'Not found')
+ end
+
error JSON::ParserError do
report_error(400, "Bad request (#{request.env['sinatra.error'].message})")
end
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/95e86624/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 7c9b5d3..d3e0ec8 100644
--- a/server/lib/deltacloud/helpers/deltacloud_helper.rb
+++ b/server/lib/deltacloud/helpers/deltacloud_helper.rb
@@ -128,7 +128,7 @@ module Deltacloud::Helpers
respond_to do |format|
format.xml { haml :"errors/common", :layout => false, :locals => { :err => error } }
- format.json { JSON::dump({ :code => code || error.code, :message => message, :err => error.class.name }) }
+ format.json { JSON::dump({ :code => code || error.code, :message => message, :error => error.class.name }) }
format.html {
begin
haml :"errors/common", :layout => :error, :locals => { :err => error }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/95e86624/server/lib/ec2/server.rb
----------------------------------------------------------------------
diff --git a/server/lib/ec2/server.rb b/server/lib/ec2/server.rb
index 6102fca..90f7815 100644
--- a/server/lib/ec2/server.rb
+++ b/server/lib/ec2/server.rb
@@ -58,6 +58,10 @@ module Deltacloud::EC2
headers 'Server' => 'Apache-Deltacloud-EC2/' + settings.version
end
+ error Deltacloud::Exceptions::AuthenticationFailure do
+ status 401
+ end
+
get '/' do
headers 'Connection' => 'close'
unless params['Action']
[2/7] git commit: XML haml templates use local instead of instance
variables
Posted by mf...@apache.org.
XML haml templates use local instead of instance variables
Signed-off-by: Michal fojtik <mf...@redhat.com>
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/b8652ea6
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/b8652ea6
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/b8652ea6
Branch: refs/heads/master
Commit: b8652ea6c3b77ce503e50cf6fe3f6b7e480ee4d3
Parents: 5c5f7f2
Author: Francesco Vollero <fv...@redhat.com>
Authored: Mon Mar 25 17:57:31 2013 +0100
Committer: Michal fojtik <mf...@redhat.com>
Committed: Tue Mar 26 09:49:29 2013 +0100
----------------------------------------------------------------------
server/lib/deltacloud/collections/addresses.rb | 4 +-
server/lib/deltacloud/collections/buckets.rb | 34 +++----
server/lib/deltacloud/collections/drivers.rb | 8 +-
server/lib/deltacloud/collections/firewalls.rb | 10 +-
server/lib/deltacloud/collections/images.rb | 4 +-
.../lib/deltacloud/collections/instance_states.rb | 8 +-
server/lib/deltacloud/collections/instances.rb | 12 +-
server/lib/deltacloud/collections/keys.rb | 4 +-
.../lib/deltacloud/collections/load_balancers.rb | 10 +-
.../deltacloud/collections/storage_snapshots.rb | 6 +-
.../lib/deltacloud/collections/storage_volumes.rb | 8 +-
server/lib/deltacloud/helpers/deltacloud_helper.rb | 37 ++++----
server/lib/deltacloud/server.rb | 8 +-
server/views/addresses/index.xml.haml | 4 +-
server/views/addresses/show.xml.haml | 18 ++--
server/views/api/show.html.haml | 2 +-
server/views/api/show.xml.haml | 2 +-
server/views/blobs/show.xml.haml | 14 ++--
server/views/buckets/index.xml.haml | 4 +-
server/views/buckets/show.xml.haml | 12 +-
server/views/drivers/index.xml.haml | 2 +-
server/views/drivers/show.html.haml | 12 +-
server/views/drivers/show.xml.haml | 10 +-
.../errors/backend_capability_failure.xml.haml | 6 +-
server/views/errors/common.html.haml | 14 ++--
server/views/errors/common.xml.haml | 10 +-
server/views/firewalls/index.xml.haml | 2 +-
server/views/firewalls/show.xml.haml | 18 ++--
server/views/hardware_profiles/index.xml.haml | 4 +-
server/views/hardware_profiles/show.xml.haml | 8 +-
server/views/images/index.xml.haml | 4 +-
server/views/images/show.xml.haml | 28 +++---
server/views/instance_states/show.png.erb | 4 +-
server/views/instance_states/show.xml.haml | 2 +-
server/views/instances/index.html.haml | 2 +-
server/views/instances/index.xml.haml | 4 +-
server/views/instances/run.html.haml | 4 +-
server/views/instances/run.xml.haml | 6 +-
server/views/instances/run_command.html.haml | 8 +-
server/views/instances/show.html.haml | 54 +++++-----
server/views/instances/show.xml.haml | 74 +++++++-------
server/views/keys/index.xml.haml | 4 +-
server/views/keys/show.xml.haml | 24 +++---
server/views/load_balancers/index.xml.haml | 4 +-
server/views/load_balancers/show.xml.haml | 18 ++--
server/views/metrics/index.xml.haml | 4 +-
server/views/metrics/show.xml.haml | 6 +-
server/views/realms/index.xml.haml | 4 +-
server/views/realms/show.xml.haml | 10 +-
server/views/storage_snapshots/index.xml.haml | 4 +-
server/views/storage_snapshots/show.xml.haml | 8 +-
server/views/storage_volumes/index.xml.haml | 4 +-
server/views/storage_volumes/show.xml.haml | 42 ++++----
53 files changed, 307 insertions(+), 310 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/lib/deltacloud/collections/addresses.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/collections/addresses.rb b/server/lib/deltacloud/collections/addresses.rb
index fabbb59..fb877d8 100644
--- a/server/lib/deltacloud/collections/addresses.rb
+++ b/server/lib/deltacloud/collections/addresses.rb
@@ -39,8 +39,8 @@ module Deltacloud::Collections
status 201 # Created
response['Location'] = address_url(@address.id)
respond_to do |format|
- format.xml { haml :"addresses/show", :ugly => true }
- format.html { haml :"addresses/_address", :layout => false }
+ format.xml { haml :"addresses/show", :ugly => true, :locals => { :address => @address } }
+ format.html { haml :"addresses/_address", :layout => false, :locals => { :address => @address } }
format.json { JSON::dump(:address => @address.to_hash(self)) }
end
end
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/lib/deltacloud/collections/buckets.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/collections/buckets.rb b/server/lib/deltacloud/collections/buckets.rb
index eb3830d..18d1d15 100644
--- a/server/lib/deltacloud/collections/buckets.rb
+++ b/server/lib/deltacloud/collections/buckets.rb
@@ -27,7 +27,7 @@ module Deltacloud::Collections
get '/buckets/:bucket/%s' % NEW_BLOB_FORM_ID do
@bucket_id = params[:bucket]
respond_to do |format|
- format.html {haml :"blobs/new"}
+ format.html {haml :"blobs/new", :locals=>{:bucket_id => @bucket_id} }
end
end
@@ -65,14 +65,12 @@ module Deltacloud::Collections
report_error(400) # likely blob size < 112 KB (didn't hit streaming patch)
end
when "finalize" then
- bucket_id = params[:bucket]
- blob_id = params[:blob]
segmented_blob_manifest = BlobHelper.extract_segmented_blob_manifest(request)
segmented_blob_id = BlobHelper.segmented_blob_id(request)
@blob = driver.create_blob(credentials, params[:bucket], params[:blob], nil, {:segment_manifest=>segmented_blob_manifest, :segmented_blob_id=>segmented_blob_id})
respond_to do |format|
- format.xml { haml :"blobs/show" }
- format.html { haml :"blobs/show" }
+ format.xml { haml :"blobs/show", :locals => { :blob => @blob } }
+ format.html { haml :"blobs/show", :locals => { :blob => @blob } }
format.json { xml_to_json 'blobs/show' }
end
else
@@ -89,8 +87,8 @@ module Deltacloud::Collections
@blob = driver.blob(credentials, {:id => params[:blob],
'bucket' => params[:bucket]})
respond_to do |format|
- format.xml { haml :"blobs/show" }
- format.html { haml :"blobs/show" }
+ format.xml { haml :"blobs/show", :locals => { :blob => @blob } }
+ format.html { haml :"blobs/show", :locals => { :blob => @blob } }
format.json { JSON::dump(:blob => @blob.to_hash(self) ) }
end
elsif(env["BLOB_FAIL"])
@@ -108,8 +106,8 @@ module Deltacloud::Collections
@blob = driver.create_blob(credentials, bucket_id, blob_id, blob_data, user_meta)
temp_file.delete
respond_to do |format|
- format.xml { haml :"blobs/show" }
- format.html { haml :"blobs/show" }
+ format.xml { haml :"blobs/show", :locals => { :blob => @blob } }
+ format.html { haml :"blobs/show", :locals => { :blob => @blob } }
format.json { JSON::dump(:blob => @blob.to_hash(self)) }
end
end
@@ -128,7 +126,7 @@ module Deltacloud::Collections
status 201
response['Location'] = bucket_url(@bucket.id)
respond_to do |format|
- format.xml { haml :"buckets/show" }
+ format.xml { haml :"buckets/show", :locals=> { :bucket => @bucket } }
format.json { JSON::dump(:bucket => @bucket.to_hash(self)) }
format.html do
redirect bucket_url(@bucket.id) if @bucket and @bucket.id
@@ -158,8 +156,8 @@ module Deltacloud::Collections
@blob = driver.blob(credentials, { :id => params[:blob_id], 'bucket' => params[:id]} )
if @blob
respond_to do |format|
- format.xml { haml :"blobs/show" }
- format.html { haml :"blobs/show" }
+ format.xml { haml :"blobs/show", :locals => { :blob => @blob } }
+ format.html { haml :"blobs/show", :locals => { :blob => @blob } }
format.json { JSON::dump(:blob => @blob.to_hash(self)) }
end
else
@@ -192,8 +190,8 @@ module Deltacloud::Collections
@blob = driver.create_blob(credentials, bucket_id, blob_id, blob_data, user_meta)
status 201
respond_to do |format|
- format.xml { haml :"blobs/show" }
- format.html { haml :"blobs/show"}
+ format.xml { haml :"blobs/show", :locals => { :blob => @blob } }
+ format.html { haml :"blobs/show", :locals => { :blob => @blob }}
format.json { JSON::dump(:blob => @blob.to_hash(self)) }
end
end
@@ -225,8 +223,8 @@ module Deltacloud::Collections
@blob = driver.blob(credentials, {:id => params[:blob],
'bucket' => params[:bucket]})
respond_to do |format|
- format.xml { haml :"blobs/show" }
- format.html { haml :"blobs/show" }
+ format.xml { haml :"blobs/show", :locals => { :blob => @blob } }
+ format.html { haml :"blobs/show", :locals => { :blob => @blob } }
format.json { JSON::dump(@blob.to_hash(self)) }
end
elsif(env["BLOB_FAIL"])
@@ -244,8 +242,8 @@ module Deltacloud::Collections
@blob = driver.create_blob(credentials, bucket_id, blob_id, blob_data, user_meta)
temp_file.delete
respond_to do |format|
- format.xml { haml :"blobs/show" }
- format.html { haml :"blobs/show" }
+ format.xml { haml :"blobs/show", :locals => { :blob => @blob } }
+ format.html { haml :"blobs/show", :locals => { :blob => @blob } }
format.json { JSON::dump(@blob.to_hash(self)) }
end
end
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/lib/deltacloud/collections/drivers.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/collections/drivers.rb b/server/lib/deltacloud/collections/drivers.rb
index 8c51019..c49ab43 100644
--- a/server/lib/deltacloud/collections/drivers.rb
+++ b/server/lib/deltacloud/collections/drivers.rb
@@ -22,9 +22,9 @@ module Deltacloud::Collections
control do
@drivers = Deltacloud::Drivers.driver_config
respond_to do |format|
- format.xml { haml :"drivers/index" }
+ format.xml { haml :"drivers/index", :locals => { :drivers => @drivers } }
format.json { @drivers.to_json }
- format.html { haml :"drivers/index" }
+ format.html { haml :"drivers/index", :locals => { :drivers => @drivers } }
end
end
end
@@ -38,9 +38,9 @@ module Deltacloud::Collections
@driver = Deltacloud::Drivers.driver_config[@name]
halt 404 unless @driver
respond_to do |format|
- format.xml { haml :"drivers/show" }
+ format.xml { haml :"drivers/show", :locals => { :driver => @driver, :name => @name, :providers => @providers } }
format.json { { :driver => @driver.merge(:id => params[:id]) }.to_json }
- format.html { haml :"drivers/show" }
+ format.html { haml :"drivers/show", :locals => { :driver => @driver, :name => @name, :providers => @providers }}
end
end
end
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/lib/deltacloud/collections/firewalls.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/collections/firewalls.rb b/server/lib/deltacloud/collections/firewalls.rb
index 1f35c58..e6ae4ee 100644
--- a/server/lib/deltacloud/collections/firewalls.rb
+++ b/server/lib/deltacloud/collections/firewalls.rb
@@ -25,7 +25,7 @@ module Deltacloud::Collections
get '/firewalls/:id/new_rule' do
@firewall_name = params[:id]
respond_to do |format|
- format.html {haml :"firewalls/new_rule" }
+ format.html { haml :"firewalls/new_rule", :locals => { :firewall_name => @firewall_name } }
end
end
@@ -64,8 +64,8 @@ module Deltacloud::Collections
status 201 # Created
response['Location'] = firewall_url(@firewall.id)
respond_to do |format|
- format.xml { haml :"firewalls/show" }
- format.html { haml :"firewalls/show" }
+ format.xml { haml :"firewalls/show", :locals => { :firewall => @firewall } }
+ format.html { haml :"firewalls/show", :locals => { :firewall => @firewall } }
format.json { JSON::dump(:firewall => @firewall.to_hash(self)) }
end
end
@@ -107,8 +107,8 @@ module Deltacloud::Collections
@firewall = driver.firewall(credentials, {:id => params[:id]})
status 201
respond_to do |format|
- format.xml { haml :"firewalls/show" }
- format.html { haml :"firewalls/show" }
+ format.xml { haml :"firewalls/show", :locals => { :firewall => @firewall} }
+ format.html { haml :"firewalls/show", :locals => { :firewall => @firewall} }
format.json { JSON::dump(:firewall => @firewall.to_hash(self) ) }
end
end
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/lib/deltacloud/collections/images.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/collections/images.rb b/server/lib/deltacloud/collections/images.rb
index 80fbf08..687f931 100644
--- a/server/lib/deltacloud/collections/images.rb
+++ b/server/lib/deltacloud/collections/images.rb
@@ -49,9 +49,9 @@ module Deltacloud::Collections
status 201 # Created
response['Location'] = image_url(@image.id)
respond_to do |format|
- format.xml { haml :"images/show" }
+ format.xml { haml :"images/show", :locals => { :image => @image } }
format.json { JSON::dump(:image => @image.to_hash(self)) }
- format.html { haml :"images/show" }
+ format.html { haml :"images/show", :locals => { :image => @image } }
end
end
end
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/lib/deltacloud/collections/instance_states.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/collections/instance_states.rb b/server/lib/deltacloud/collections/instance_states.rb
index 6e16568..aba153b 100644
--- a/server/lib/deltacloud/collections/instance_states.rb
+++ b/server/lib/deltacloud/collections/instance_states.rb
@@ -26,7 +26,7 @@ module Deltacloud::Collections
control do
@machine = driver.instance_state_machine
respond_to do |format|
- format.xml { haml :'instance_states/show', :layout => false }
+ format.xml { haml :'instance_states/show', :layout => false, :locals => { :machine => @machine } }
format.json do
out = []
@machine.states.each do |state|
@@ -37,12 +37,12 @@ module Deltacloud::Collections
end
out.to_json
end
- format.html { haml :'instance_states/show'}
- format.gv { erb :"instance_states/show" }
+ format.html { haml :'instance_states/show', :locals => { :machine => @machine }}
+ format.gv { erb :"instance_states/show", :locals => { :machine => @machine } }
format.png do
# Trick respond_to into looking up the right template for the
# graphviz file
- gv = erb(:"instance_states/show")
+ gv = erb(:"instance_states/show", :locals => { :machine => @machine })
png = ''
cmd = 'dot -Kdot -Gpad="0.2,0.2" -Gsize="5.0,8.0" -Gdpi="180" -Tpng'
::Open3.popen3( cmd ) do |stdin, stdout, stderr|
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/lib/deltacloud/collections/instances.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/collections/instances.rb b/server/lib/deltacloud/collections/instances.rb
index ee48f30..7ee662d 100644
--- a/server/lib/deltacloud/collections/instances.rb
+++ b/server/lib/deltacloud/collections/instances.rb
@@ -34,7 +34,7 @@ module Deltacloud::Collections
get '/instances/:id/run' do
respond_to do |format|
@instance = driver.instances(credentials, :id => params[:id]).first
- format.html {haml :"instances/run_command" }
+ format.html {haml :"instances/run_command", :locals => @instance }
end
end
@@ -59,7 +59,7 @@ module Deltacloud::Collections
end
status 201 # Created
respond_to do |format|
- format.xml { haml :"instances/#{action_handler}" }
+ format.xml { haml :"instances/#{action_handler}", :locals => {:instance=>@instance} }
format.json do
if @elements
JSON::dump(:instances => @elements.map { |i| i.to_hash(self) })
@@ -69,10 +69,10 @@ module Deltacloud::Collections
end
format.html do
if @elements
- haml :"instances/index"
+ haml :"instances/index", :locals => { :elements => @elements }
elsif @instance and @instance.id
response['Location'] = instance_url(@instance.id)
- haml :"instances/show"
+ haml :"instances/show", :locals => { :instance => @instance }
else
redirect instances_url
end
@@ -113,8 +113,8 @@ module Deltacloud::Collections
control do
@output = driver.run_on_instance(credentials, params)
respond_to do |format|
- format.xml { haml :"instances/run" }
- format.html { haml :"instances/run" }
+ format.xml { haml :"instances/run", :locals => { :output => @output } }
+ format.html { haml :"instances/run", :locals => { :output => @output } }
format.json { JSON::dump({:instance => { :id => params[:id], :public_address => @output.ssh.network.ip, :command => @output.ssh.command, :output => @output.body}})}
end
end
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/lib/deltacloud/collections/keys.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/collections/keys.rb b/server/lib/deltacloud/collections/keys.rb
index 8d5c460..d1b5541 100644
--- a/server/lib/deltacloud/collections/keys.rb
+++ b/server/lib/deltacloud/collections/keys.rb
@@ -40,8 +40,8 @@ module Deltacloud::Collections
status 201
response['Location'] = key_url(@key.id)
respond_to do |format|
- format.xml { haml :"keys/show", :ugly => true }
- format.html { haml :"keys/show" }
+ format.xml { haml :"keys/show", :ugly => true, :locals => { :key => @key } }
+ format.html { haml :"keys/show", :locals => { :key => @key } }
format.json { JSON::dump(:key => @key.to_hash(self)) }
end
end
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/lib/deltacloud/collections/load_balancers.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/collections/load_balancers.rb b/server/lib/deltacloud/collections/load_balancers.rb
index 92c7a36..7a75c85 100644
--- a/server/lib/deltacloud/collections/load_balancers.rb
+++ b/server/lib/deltacloud/collections/load_balancers.rb
@@ -40,9 +40,9 @@ module Deltacloud::Collections
end
@unregistered_instances = all_instances - @registered_instances
respond_to do |format|
- format.xml { haml :'load_balancers/show' }
+ format.xml { haml :'load_balancers/show', :locals => { :load_balancer => @load_balancer } }
format.json { JSON::dump(:load_balancer => @load_balancer.to_hash(self)) }
- format.html { haml :'load_balancers/show' }
+ format.html { haml :'load_balancers/show' } # FIXME: Fix the HTML view + instance variables
end
end
end
@@ -58,7 +58,7 @@ module Deltacloud::Collections
status 201 # Created
response['Location'] = load_balancer_url(@load_balancer.id)
respond_to do |format|
- format.xml { haml :"load_balancers/show" }
+ format.xml { haml :"load_balancers/show", :locals => { :load_balancer => @load_balancer } }
format.json { JSON::dump(:load_balancer => @load_balancer.to_hash(self)) }
format.html { redirect load_balancer_url(@load_balancer.id)}
end
@@ -72,7 +72,7 @@ module Deltacloud::Collections
driver.lb_register_instance(credentials, params)
@load_balancer = driver.load_balancer(credentials, :id => params[:id])
respond_to do |format|
- format.xml { haml :'load_balancers/show' }
+ format.xml { haml :'load_balancers/show', :locals => { :load_balancer => @load_balancer } }
format.json { JSON::dump(:load_balancer => @load_balancer.to_hash(self) ) }
format.html { redirect load_balancer_url(@load_balancer.id)}
end
@@ -86,7 +86,7 @@ module Deltacloud::Collections
driver.lb_unregister_instance(credentials, params)
@load_balancer = driver.load_balancer(credentials, :id => params[:id])
respond_to do |format|
- format.xml { haml :'load_balancers/show' }
+ format.xml { haml :'load_balancers/show', :locals => { :load_balancer => @load_balancer } }
format.json { JSON::dump(:load_balancer => @load_balancer.to_hash(self)) }
format.html { redirect load_balancer_url(@load_balancer.id) }
end
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/lib/deltacloud/collections/storage_snapshots.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/collections/storage_snapshots.rb b/server/lib/deltacloud/collections/storage_snapshots.rb
index c18bb41..c9836fa 100644
--- a/server/lib/deltacloud/collections/storage_snapshots.rb
+++ b/server/lib/deltacloud/collections/storage_snapshots.rb
@@ -34,9 +34,9 @@ module Deltacloud::Collections
status 201 # Created
response['Location'] = storage_snapshot_url(@storage_snapshot.id)
respond_to do |format|
- format.xml { haml :"storage_snapshots/show" }
- format.html { haml :"storage_snapshots/show" }
- format.json { xml_to_json "storage_snapshots/show" }
+ format.xml { haml :"storage_snapshots/show", :locals => { :storage_snapshot => @storage_snapshot } }
+ format.html { haml :"storage_snapshots/show", :locals => { :storage_snapshot => @storage_snapshot } }
+ format.json { JSON::dump(:storage_snapshot => @storage_snapshot.to_hash(self)) }
end
end
end
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/lib/deltacloud/collections/storage_volumes.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/collections/storage_volumes.rb b/server/lib/deltacloud/collections/storage_volumes.rb
index 3af8015..e02418f 100644
--- a/server/lib/deltacloud/collections/storage_volumes.rb
+++ b/server/lib/deltacloud/collections/storage_volumes.rb
@@ -46,8 +46,8 @@ module Deltacloud::Collections
status 201
response['Location'] = storage_volume_url(@storage_volume.id)
respond_to do |format|
- format.xml { haml :"storage_volumes/show" }
- format.html { haml :"storage_volumes/show" }
+ format.xml { haml :"storage_volumes/show", :locals => { :storage_volume => @storage_volume } }
+ format.html { haml :"storage_volumes/show", :locals => { :storage_volume => @storage_volume } }
format.json { JSON::dump(:storage_volume => @storage_volume.to_hash(self)) }
end
end
@@ -62,7 +62,7 @@ module Deltacloud::Collections
status 202
respond_to do |format|
format.html { redirect(storage_volume_url(params[:id]))}
- format.xml { haml :"storage_volumes/show" }
+ format.xml { haml :"storage_volumes/show", :locals => { :storage_volume => @storage_volume } }
format.json { JSON::dump(:storage_volume => @storage_volume.to_hash(self)) }
end
end
@@ -78,7 +78,7 @@ module Deltacloud::Collections
status 202
respond_to do |format|
format.html { redirect(storage_volume_url(params[:id]))}
- format.xml { haml :"storage_volumes/show" }
+ format.xml { haml :"storage_volumes/show", :locals => { :storage_volume => @storage_volume } }
format.json { JSON::dump(:storage_volume => @storage_volume.to_hash(self)) }
end
end
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/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 b794560..32f13b0 100644
--- a/server/lib/deltacloud/helpers/deltacloud_helper.rb
+++ b/server/lib/deltacloud/helpers/deltacloud_helper.rb
@@ -75,8 +75,8 @@ module Deltacloud::Helpers
headers['X-Backend-Runtime'] = @benchmark.real.to_s
instance_variable_set(:"@#{model}", @elements)
respond_to do |format|
- format.html { haml :"#{model}/index" }
- format.xml { haml :"#{model}/index" }
+ format.html { haml :"#{model}/index", :locals => { :elements => @elements } }
+ format.xml { haml :"#{model}/index", :locals => { :elements => @elements } }
format.json { JSON::dump({ model => @elements.map { |el| el.to_hash(self) }}) }
end
else
@@ -92,7 +92,7 @@ module Deltacloud::Helpers
instance_variable_set("@#{model}", @element)
if @element
respond_to do |format|
- format.html { haml :"#{model.to_s.pluralize}/show", :locals=>{model=>@element} }
+ format.html { haml :"#{model.to_s.pluralize}/show", :locals=>{model=>@element}}
format.xml { haml :"#{model.to_s.pluralize}/show" , :locals=>{model=>@element}}
format.json { JSON::dump(model => @element.to_hash(self)) }
end
@@ -109,30 +109,29 @@ module Deltacloud::Helpers
def report_error(code=nil, message=nil)
if !code.nil?
- @error = Deltacloud::Exceptions.exception_from_status(code, message || translate_error_code(code)[:message])
- @code = code
- message = @error.message
+ error = Deltacloud::Exceptions.exception_from_status(code, message || translate_error_code(code)[:message])
+ message = error.message
else
- @error = request.env['sinatra.error'] || @exception
- @code = @error.respond_to?(:code) ? @error.code : 500
- message = @error.respond_to?(:message) ? @error.message : translate_error_code(code)[:message]
+ error = request.env['sinatra.error'] || @exception
+ code = error.respond_to?(:code) ? error.code : 500
+ message = error.respond_to?(:message) ? error.message : translate_error_code(code)[:message]
end
- response.status = @code
+ response.status = code
- backtrace = (@error.respond_to?(:backtrace) and !@error.backtrace.nil?) ?
- "\n\n#{@error.backtrace[0..20].join("\n")}\n\n" : ''
+ backtrace = (error.respond_to?(:backtrace) and !error.backtrace.nil?) ?
+ "\n\n#{error.backtrace[0..20].join("\n")}\n\n" : ''
- if @code.to_s =~ /5(\d+)/
- log.error(@code.to_s) { "[#{@error.class.to_s}] #{message}#{backtrace}" }
+ if code.to_s =~ /5(\d+)/
+ log.error(code.to_s) { "[#{error.class.to_s}] #{message}#{backtrace}" }
end
respond_to do |format|
- format.xml { haml :"errors/common", :layout => false }
- format.json { JSON::dump({ :code => @code || @error.code, :message => message, :error => @error.class.name }) }
+ format.xml { haml :"errors/common", :layout => false, :locals => { :err => error } }
+ format.json { JSON::dump({ :code => code || error.code, :message => message, :err => error.class.name }) }
format.html {
begin
- haml :"errors/common", :layout => :error
+ haml :"errors/common", :layout => :error, :locals => { :err => error }
rescue RuntimeError
# If the HTML representation of error is missing, then try to report
# it through XML
@@ -171,8 +170,8 @@ module Deltacloud::Helpers
redirect instance_url(params[:id])
else
response = respond_to do |format|
- format.xml { haml :"instances/show" }
- format.html { haml :"instances/show" }
+ format.xml { haml :"instances/show", :locals => { :instance => @instance } }
+ format.html { haml :"instances/show", :locals => { :instance => @instance } }
format.json { JSON::dump(@instance.to_hash(self)) }
end
halt 202, response
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/lib/deltacloud/server.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/server.rb b/server/lib/deltacloud/server.rb
index 0ef925f..e874b44 100644
--- a/server/lib/deltacloud/server.rb
+++ b/server/lib/deltacloud/server.rb
@@ -48,11 +48,11 @@ module Deltacloud
if params[:force_auth]
return [401, 'Authentication failed'] unless driver.valid_credentials?(credentials)
end
- @collections = driver.supported_collections(credentials)
+ collections = driver.supported_collections(credentials)
respond_to do |format|
- format.xml { haml :"api/show" }
- format.json { collections_to_json(@collections) }
- format.html { haml :"api/show" }
+ format.xml { haml :"api/show", :locals => { :collections => collections } }
+ format.json { collections_to_json(collections) }
+ format.html { haml :"api/show", :locals => { :collections => collections } }
end
end
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/addresses/index.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/addresses/index.xml.haml b/server/views/addresses/index.xml.haml
index abf83b7..a944e5e 100644
--- a/server/views/addresses/index.xml.haml
+++ b/server/views/addresses/index.xml.haml
@@ -1,4 +1,4 @@
!!!XML
%addresses
- - @elements.each do |c|
- = haml :'addresses/show', :locals => { :@address => c, :partial => true }
+ - elements.each do |c|
+ = haml :'addresses/show', :locals => { :address => c, :partial => true }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/addresses/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/addresses/show.xml.haml b/server/views/addresses/show.xml.haml
index 1ae8814..28d8b6d 100644
--- a/server/views/addresses/show.xml.haml
+++ b/server/views/addresses/show.xml.haml
@@ -1,14 +1,14 @@
- unless defined?(partial)
!!! XML
-%address{ :href => address_url(@address.id), :id => @address.id }
+%address{ :href => address_url(address.id), :id => address.id }
%ip<
- =@address.id
+ =address.id
%actions
- if driver.respond_to?(:destroy_address)
- %link{ :rel => "destroy", :method => "delete", :href => destroy_address_url(@address.id)}
- - if driver.respond_to?(:associate_address) and not @address.instance_id
- %link{ :rel => "associate", :method => "post", :href => associate_address_url(@address.id)}
- - if driver.respond_to?(:disassociate_address) and @address.instance_id
- %link{ :rel => "disassociate", :method => "post", :href => disassociate_address_url(@address.id)}
- - if @address.instance_id
- %instance{ :href => instance_url(@address.instance_id), :id => @address.instance_id}
+ %link{ :rel => "destroy", :method => "delete", :href => destroy_address_url(address.id)}
+ - if driver.respond_to?(:associate_address) and not address.instance_id
+ %link{ :rel => "associate", :method => "post", :href => associate_address_url(address.id)}
+ - if driver.respond_to?(:disassociate_address) and address.instance_id
+ %link{ :rel => "disassociate", :method => "post", :href => disassociate_address_url(address.id)}
+ - if address.instance_id
+ %instance{ :href => instance_url(address.instance_id), :id => address.instance_id}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/api/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/api/show.html.haml b/server/views/api/show.html.haml
index 15a3490..57f32b6 100644
--- a/server/views/api/show.html.haml
+++ b/server/views/api/show.html.haml
@@ -3,7 +3,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview, :'data-inset' => 'true'}
- - @collections.each do |c|
+ - collections.each do |c|
%li
%a{ :href => url_for(c.collection_name), :'data-icon' => "arrow-r"}=c.collection_name.to_s.gsub('_', ' ').titlecase
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/api/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/api/show.xml.haml b/server/views/api/show.xml.haml
index f21f69b..852a599 100644
--- a/server/views/api/show.xml.haml
+++ b/server/views/api/show.xml.haml
@@ -1,5 +1,5 @@
%api{ :version => settings.version, :driver => driver_symbol, :provider => Thread.current[:provider] || ENV['API_PROVIDER'] }
- - @collections.each do |c|
+ - collections.each do |c|
%link{ :rel => c.collection_name, :href => self.send(:"#{c.collection_name}_url")}
- c.features.select { |f| driver.class.has_feature?(c.collection_name, f.name) }.each do |f|
- f.operations.each do |operation|
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/blobs/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/blobs/show.xml.haml b/server/views/blobs/show.xml.haml
index 4687720..d382c82 100644
--- a/server/views/blobs/show.xml.haml
+++ b/server/views/blobs/show.xml.haml
@@ -1,13 +1,13 @@
!!! XML
-%blob{:href => bucket_url(@blob.bucket) + '/' + @blob.id, :id => @blob.id}
- %bucket=@blob.bucket
- - @blob.attributes.select{ |attr| (attr!=:id && attr!=:user_metadata) }.each do |attribute|
+%blob{:href => bucket_url(blob.bucket) + '/' + blob.id, :id => blob.id}
+ %bucket=blob.bucket
+ - blob.attributes.select{ |attr| (attr!=:id && attr!=:user_metadata) }.each do |attribute|
- next if attribute == :bucket
- unless attribute == :content
- haml_tag(attribute, :<) do
- - haml_concat @blob.send(attribute)
+ - haml_concat blob.send(attribute)
%user_metadata
- - if @blob.user_metadata.respond_to? :each
- - @blob.user_metadata.each do |k, v|
+ - if blob.user_metadata.respond_to? :each
+ - blob.user_metadata.each do |k, v|
%entry{:key => k}=render_cdata(v)
- %content{:href => bucket_url(@blob.bucket) + '/' + @blob.id + '/content', :rel => 'blob_content'}
+ %content{:href => bucket_url(blob.bucket) + '/' + blob.id + '/content', :rel => 'blob_content'}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/buckets/index.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/buckets/index.xml.haml b/server/views/buckets/index.xml.haml
index 9f1fd20..f4b1ab7 100644
--- a/server/views/buckets/index.xml.haml
+++ b/server/views/buckets/index.xml.haml
@@ -1,4 +1,4 @@
!!!XML
%buckets
- - @elements.each do |c|
- = haml :'buckets/show', :locals => { :@bucket => c, :partial => true }
+ - elements.each do |c|
+ = haml :'buckets/show', :locals => { :bucket => c, :partial => true }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/buckets/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/buckets/show.xml.haml b/server/views/buckets/show.xml.haml
index 67f6935..ca2c1c9 100644
--- a/server/views/buckets/show.xml.haml
+++ b/server/views/buckets/show.xml.haml
@@ -1,10 +1,10 @@
- unless defined?(partial)
!!! XML
-%bucket{:href => bucket_url(@bucket.id), :id => @bucket.id}
- - @bucket.attributes.select{ |attr| attr!=:id }.each do |attribute|
+%bucket{:href => bucket_url(bucket.id), :id => bucket.id}
+ - bucket.attributes.select{ |attr| attr!=:id }.each do |attribute|
- unless attribute == :blob_list
-haml_tag(attribute, :<) do
- - haml_concat @bucket.send(attribute)
- - if @bucket.blob_list
- - @bucket.blob_list.each do |blb|
- %blob{:id => blb, :href => bucket_url(@bucket.id) +"/#{blb}"}
+ - haml_concat bucket.send(attribute)
+ - if bucket.blob_list
+ - bucket.blob_list.each do |blb|
+ %blob{:id => blb, :href => bucket_url(bucket.id) +"/#{blb}"}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/drivers/index.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/drivers/index.xml.haml b/server/views/drivers/index.xml.haml
index 63e809f..84673f3 100644
--- a/server/views/drivers/index.xml.haml
+++ b/server/views/drivers/index.xml.haml
@@ -1,5 +1,5 @@
%drivers
- - @drivers.each do |id, details|
+ - drivers.each do |id, details|
%driver{ :href => driver_url(id), :id => id }
%name<
=details[:name]
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/drivers/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/drivers/show.html.haml b/server/views/drivers/show.html.haml
index 062a5bc..5a162c1 100644
--- a/server/views/drivers/show.html.haml
+++ b/server/views/drivers/show.html.haml
@@ -1,23 +1,23 @@
-=header @name
+=header name
=subheader "Deltacloud API #{settings.version}"
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Identifier
%li
- %p{ :'data-role' => 'fieldcontain'}=@name
+ %p{ :'data-role' => 'fieldcontain'}=name
%li{ :'data-role' => 'list-divider'} Name
%li
- %p{ :'data-role' => 'fieldcontain'}=@driver[:name]
+ %p{ :'data-role' => 'fieldcontain'}=driver[:name]
%li{ :'data-role' => 'list-divider'} Provider
%li
%p{ :'data-role' => 'fieldcontain'}
- - if @providers
- - @providers.each do |p|
+ - if providers
+ - providers.each do |p|
%h3= p.id
%p= p.url
- else
- - providers = driver_provider(@driver).keys.collect { |k| k.to_s }.sort
+ - providers = driver_provider(driver).keys.collect { |k| k.to_s }.sort
- if providers.empty?
None
- else
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/drivers/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/drivers/show.xml.haml b/server/views/drivers/show.xml.haml
index 3734c4d..4297118 100644
--- a/server/views/drivers/show.xml.haml
+++ b/server/views/drivers/show.xml.haml
@@ -1,12 +1,12 @@
-%driver{ :href => driver_url(@name), :id => @name }
+%driver{ :href => driver_url(name), :id => name }
%name<
- = @driver[:name]
- - if @providers.nil?
- - driver_provider(@driver).each do |prov, details|
+ = driver[:name]
+ - if providers.nil?
+ - driver_provider(driver).each do |prov, details|
%provider{ :id => prov }
- details.each do |kind, url|
%entrypoint{ :kind => kind }<=cdata(url)
- else
- - @providers.each do |p|
+ - providers.each do |p|
%provider{ :id => p.id }
%entrypoint{ :kind => p.name }<=p.url
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/errors/backend_capability_failure.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/errors/backend_capability_failure.xml.haml b/server/views/errors/backend_capability_failure.xml.haml
index 4302e4b..48e3e6a 100644
--- a/server/views/errors/backend_capability_failure.xml.haml
+++ b/server/views/errors/backend_capability_failure.xml.haml
@@ -1,5 +1,5 @@
-%error{:url => "#{request.env['REQUEST_URI']}", :status => "#{response.status}"}
- %capability #{@error.capability}
- %message< #{cdata @error.message}
+%err{:url => "#{request.env['REQUEST_URI']}", :status => "#{response.status}"}
+ %capability #{err.capability}
+ %message< #{cdata err.message}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/errors/common.html.haml
----------------------------------------------------------------------
diff --git a/server/views/errors/common.html.haml b/server/views/errors/common.html.haml
index 8cd3c74..b8e85d2 100644
--- a/server/views/errors/common.html.haml
+++ b/server/views/errors/common.html.haml
@@ -2,28 +2,28 @@
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
%li{ :'data-role' => 'list-divider'} Server message
%li
- %h3= h [@error.class.name, @error.message].join(' - ')
+ %h3= h [err.class.name, err.message].join(' - ')
%li{ :'data-role' => 'list-divider'} Original request URI
%li
%a{ :href => request.env['REQUEST_URI'], :'data-ajax' => 'false'}
%span=request.env['REQUEST_URI']
%span{ :class => 'ui-li-count'} Retry
- %li{ :'data-role' => 'list-divider'} Error details
+ %li{ :'data-role' => 'list-divider'} err details
%li
- - if @error.class.method_defined? :details
- %p= h @error.details
+ - if err.class.method_defined? :details
+ %p= h err.details
- else
%em No details
%li{ :'data-role' => 'list-divider'} Backtrace
%li
- %pre= bt @error.backtrace
+ %pre= bt err.backtrace
- - if @error.backtrace
+ - if err.backtrace
%div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
%h3 Backtrace
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
%li
- %pre= h @error.backtrace.join("\n")
+ %pre= h err.backtrace.join("\n")
%div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
%h3 Parameters
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/errors/common.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/errors/common.xml.haml b/server/views/errors/common.xml.haml
index 88ce93f..64344e8 100644
--- a/server/views/errors/common.xml.haml
+++ b/server/views/errors/common.xml.haml
@@ -4,13 +4,13 @@
%backend{ :driver => driver_symbol, :provider => current_provider }
%code=response.status
%message<
- - if @error.respond_to? :message
- =cdata @error.message
+ - if err.respond_to? :message
+ =cdata err.message
- else
- =translate_error_code(response.status)
- - if @error.respond_to? :backtrace
+ =translate_err_code(response.status)
+ - if err.respond_to? :backtrace
%backtrace
- =cdata @error.backtrace.nil? ? '' : @error.backtrace.join("\n")
+ =cdata err.backtrace.nil? ? '' : err.backtrace.join("\n")
%request
- if params
-params.each do |name, value|
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/firewalls/index.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/firewalls/index.xml.haml b/server/views/firewalls/index.xml.haml
index 53a9b6e..44c77ae 100644
--- a/server/views/firewalls/index.xml.haml
+++ b/server/views/firewalls/index.xml.haml
@@ -1,6 +1,6 @@
!!! XML
%firewalls
- - @firewalls.each do |firewall|
+ - firewalls.each do |firewall|
%firewall{:href => firewall_url(firewall.id), :id => firewall.id}
%actions
%link{ :rel => :destroy, :href => destroy_firewall_url(firewall.id), :method => :delete, :id => firewall.id}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/firewalls/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/firewalls/show.xml.haml b/server/views/firewalls/show.xml.haml
index 39ed9d2..d7c2bb7 100644
--- a/server/views/firewalls/show.xml.haml
+++ b/server/views/firewalls/show.xml.haml
@@ -1,20 +1,20 @@
!!! XML
-%firewall{:href => firewall_url(@firewall.id), :id => @firewall.id}
+%firewall{:href => firewall_url(firewall.id), :id => firewall.id}
%actions
- %link{ :rel => :destroy, :href => destroy_firewall_url(@firewall.id), :method => :delete}
- %link{ :rel => :update, :href => "#{firewall_url(@firewall_name)}/rules", :method => :post}
- - @firewall.attributes.select{ |attr| attr != :id && attr!= :rules}.each do |attribute|
+ %link{ :rel => :destroy, :href => destroy_firewall_url(firewall.id), :method => :delete}
+ %link{ :rel => :update, :href => "#{firewall_url(firewall_name)}/rules", :method => :post}
+ - firewall.attributes.select{ |attr| attr != :id && attr!= :rules}.each do |attribute|
- haml_tag("#{attribute}".tr('-', '_'), :<) do
- if [:name, :description].include?(attribute)
=cdata do
- - haml_concat @firewall.send(attribute)
+ - haml_concat firewall.send(attribute)
- else
- - haml_concat @firewall.send(attribute)
+ - haml_concat firewall.send(attribute)
%rules
- - @firewall.rules.each do |rule|
- %rule{:href => firewall_url(@firewall.id) + '/' + rule.id, :id => rule.id}
+ - firewall.rules.each do |rule|
+ %rule{:href => firewall_url(firewall.id) + '/' + rule.id, :id => rule.id}
%actions
- %link{ :rel => :destroy, :href => "#{firewall_url(@firewall.name)}/#{rule.id}", :method => :delete}
+ %link{ :rel => :destroy, :href => "#{firewall_url(firewall.name)}/#{rule.id}", :method => :delete}
- rule.attributes.select{|attr| attr != :sources && attr != :id}.each do |rule_attrib|
- haml_tag("#{rule_attrib}".tr('-', '_'), :<) do
- haml_concat rule.send(rule_attrib)
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/hardware_profiles/index.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/hardware_profiles/index.xml.haml b/server/views/hardware_profiles/index.xml.haml
index 9292c5b..f12dce2 100644
--- a/server/views/hardware_profiles/index.xml.haml
+++ b/server/views/hardware_profiles/index.xml.haml
@@ -1,4 +1,4 @@
!!! XML
%hardware_profiles
- - order_hardware_profiles(@hardware_profiles).each do |prof|
- = haml :'hardware_profiles/show', :locals => { :@hardware_profile => prof, :partial => true }
+ - order_hardware_profiles(elements).each do |prof|
+ = haml :'hardware_profiles/show', :locals => { :hardware_profile => prof, :partial => true }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/hardware_profiles/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/hardware_profiles/show.xml.haml b/server/views/hardware_profiles/show.xml.haml
index 677674f..9709c52 100644
--- a/server/views/hardware_profiles/show.xml.haml
+++ b/server/views/hardware_profiles/show.xml.haml
@@ -1,10 +1,10 @@
- unless defined?(partial)
!!! XML
-%hardware_profile{ :href => hardware_profile_url(@hardware_profile.id), :id => @hardware_profile.id }
- %id= @hardware_profile.id
+%hardware_profile{ :href => hardware_profile_url(hardware_profile.id), :id => hardware_profile.id }
+ %id= hardware_profile.id
%name<
- = @hardware_profile.name
- - @hardware_profile.each_property do |prop|
+ = hardware_profile.name
+ - hardware_profile.each_property do |prop|
- attr = { :name => prop.name, :kind => prop.kind, :unit => prop.unit }
- if prop.kind == :fixed
%property{ attr, :value => prop.value }/
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/images/index.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/images/index.xml.haml b/server/views/images/index.xml.haml
index 52d86e6..bde6d05 100644
--- a/server/views/images/index.xml.haml
+++ b/server/views/images/index.xml.haml
@@ -1,5 +1,5 @@
- unless defined?(partial)
!!! XML
%images
- - @elements.each do |c|
- = haml :'images/show', :locals => { :@image => c, :partial => true }
+ - elements.each do |c|
+ = haml :'images/show', :locals => { :image => c, :partial => true }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/images/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/images/show.xml.haml b/server/views/images/show.xml.haml
index ac014af..a1988c0 100644
--- a/server/views/images/show.xml.haml
+++ b/server/views/images/show.xml.haml
@@ -1,20 +1,20 @@
- unless defined?(partial)
!!! XML
-%image{:href => image_url(@image.id), :id => @image.id}
- %name=@image.name
- %description=@image.description
- %owner_id=@image.owner_id
- %architecture=@image.architecture
- - if @image.state
- %state=@image.state
- - if @image.creation_time
- %creation_time=@image.creation_time
- - if @image.hardware_profiles
+%image{:href => image_url(image.id), :id => image.id}
+ %name=image.name
+ %description=image.description
+ %owner_id=image.owner_id
+ %architecture=image.architecture
+ - if image.state
+ %state=image.state
+ - if image.creation_time
+ %creation_time=image.creation_time
+ - if image.hardware_profiles
%hardware_profiles
- - @image.hardware_profiles.each do |profile|
+ - image.hardware_profiles.each do |profile|
%hardware_profile{ :href => hardware_profile_url(profile.id), :id => profile.id, :rel => :hardware_profile }
- %root_type=@image.root_type
+ %root_type=image.root_type
%actions
- %link{ :rel => 'create_instance', :method => :post, :href => "#{instances_url};image_id=#{@image.id}"}
+ %link{ :rel => 'create_instance', :method => :post, :href => "#{instances_url};image_id=#{image.id}"}
- if driver.respond_to? :destroy_image
- %link{ :rel => 'destroy_image', :method => :delete, :href => "#{destroy_image_url(@image.id)}" }
+ %link{ :rel => 'destroy_image', :method => :delete, :href => "#{destroy_image_url(image.id)}" }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/instance_states/show.png.erb
----------------------------------------------------------------------
diff --git a/server/views/instance_states/show.png.erb b/server/views/instance_states/show.png.erb
index e3f97a7..5634361 100644
--- a/server/views/instance_states/show.png.erb
+++ b/server/views/instance_states/show.png.erb
@@ -1,6 +1,6 @@
digraph instance_states {
rankdir=LR;
- <% for state in @machine.states do %>
+ <% for state in machine.states do %>
<%= state %>
[
label="<%= state.to_s.titlecase %>",
@@ -23,7 +23,7 @@ digraph instance_states {
]
<% end %>
- <% for state in @machine.states do %>
+ <% for state in machine.states do %>
<% for transition in state.transitions do %>
<%= state %> -> <%= transition.destination %>
[
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/instance_states/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/instance_states/show.xml.haml b/server/views/instance_states/show.xml.haml
index beba422..96efbe3 100644
--- a/server/views/instance_states/show.xml.haml
+++ b/server/views/instance_states/show.xml.haml
@@ -1,5 +1,5 @@
%states
- - for state in @machine.states
+ - for state in machine.states
%state{ :name=>state }
- for transition in state.transitions
- if ( transition.automatically? )
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/instances/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/instances/index.html.haml b/server/views/instances/index.html.haml
index f7efee2..3678a8d 100644
--- a/server/views/instances/index.html.haml
+++ b/server/views/instances/index.html.haml
@@ -4,7 +4,7 @@
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'a'}
%li{ :'data-role' => 'list-divider'}=driver_symbol
- - @elements.each do |instance|
+ - elements.each do |instance|
%li
%a{ :href => instance_url(instance.id), :'data-ajax' => 'false'}
%img{ :class => 'ui-link-thumb', :src => '/images/machine.png'}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/instances/index.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/instances/index.xml.haml b/server/views/instances/index.xml.haml
index e5f39ba..fa35eaf 100644
--- a/server/views/instances/index.xml.haml
+++ b/server/views/instances/index.xml.haml
@@ -1,4 +1,4 @@
!!! XML
%instances
- - @elements.each do |c|
- = haml :'instances/show', :locals => { :@instance => c, :partial => true }
+ - elements.each do |c|
+ = haml :'instances/show', :locals => { :instance => c, :partial => true }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/instances/run.html.haml
----------------------------------------------------------------------
diff --git a/server/views/instances/run.html.haml b/server/views/instances/run.html.haml
index 88c91ee..2951897 100644
--- a/server/views/instances/run.html.haml
+++ b/server/views/instances/run.html.haml
@@ -2,8 +2,8 @@
%p
%label Command:
- %em #{@output.ssh.command}
+ %em #{output.ssh.command}
%p
%strong Command output
%pre
- =@output.body
+ =output.body
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/instances/run.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/instances/run.xml.haml b/server/views/instances/run.xml.haml
index 4201e20..fa24fff 100644
--- a/server/views/instances/run.xml.haml
+++ b/server/views/instances/run.xml.haml
@@ -1,7 +1,7 @@
%instance{:id => params[:id], :href=> instance_url(params[:id])}
%public_address
- =@output.ssh.network.ip
+ =output.ssh.network.ip
%command
- =@output.ssh.command
+ =output.ssh.command
%output<
- =@output.body
+ =output.body
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/instances/run_command.html.haml
----------------------------------------------------------------------
diff --git a/server/views/instances/run_command.html.haml b/server/views/instances/run_command.html.haml
index a9d9bf9..d10f7ea 100644
--- a/server/views/instances/run_command.html.haml
+++ b/server/views/instances/run_command.html.haml
@@ -1,15 +1,15 @@
-=header "Run command on #{@instance.name}"
-=subheader "#{@instance.id}"
+=header "Run command on #{instance.name}"
+=subheader "#{instance.id}"
%div{ :'data-role' => :content, :'data-theme' => 'c', :class => 'middle-dialog'}
- %form{ :action => url_for('/instances/%s/run' % @instance.id), :method => :post }
+ %form{ :action => url_for('/instances/%s/run' % instance.id), :method => :post }
%p
%label{ :for => :cmd } Desired command:
%input{ :name => :cmd, :value => "", :type => :text}
%p
%fieldset{ :'data-role' => :fieldcontain}
%legend Target instance IP address:
- - (@instance.public_addresses | @instance.private_addresses).each_with_index do |ip, idx|
+ - (instance.public_addresses | instance.private_addresses).each_with_index do |ip, idx|
%label{ :for => ip.address }= "#{ip.address}"
%input{ :name => :ip, :value => ip.address, :id => ip.address, :type => :radio, :'data-theme' => 'b', :checked => idx == 0 || nil}/
%p
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/instances/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/instances/show.html.haml b/server/views/instances/show.html.haml
index ae193aa..58e912e 100644
--- a/server/views/instances/show.html.haml
+++ b/server/views/instances/show.html.haml
@@ -1,67 +1,67 @@
=header "Instance"
-=subheader @instance.id
+=subheader instance.id
%div{ :'data-role' => :content, :'data-theme' => 'c'}
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
%li{ :'data-role' => 'list-divider'} Name
%li
- %p{ :'data-role' => 'fieldcontain'}=@instance.name
+ %p{ :'data-role' => 'fieldcontain'}=instance.name
%li{ :'data-role' => 'list-divider'} Owner
%li
- %p{ :'data-role' => 'fieldcontain'}=@instance.owner_id
+ %p{ :'data-role' => 'fieldcontain'}=instance.owner_id
%li{ :'data-role' => 'list-divider'} State
%li
- %p{ :'data-role' => 'fieldcontain'}=@instance.state
+ %p{ :'data-role' => 'fieldcontain'}=instance.state
%li{ :'data-role' => 'list-divider'} Launch Time
%li
- %p{ :'data-role' => 'fieldcontain'}=@instance.launch_time
+ %p{ :'data-role' => 'fieldcontain'}=instance.launch_time
%li{ :'data-role' => 'list-divider'} Image
%li
- %a{ :href => image_url(@instance.image_id), :'data-ajax' => 'false' }=@instance.image_id
+ %a{ :href => image_url(instance.image_id), :'data-ajax' => 'false' }=instance.image_id
%li{ :'data-role' => 'list-divider'} Hardware Profile
%li
- - prof = @instance.instance_profile
+ - prof = instance.instance_profile
%a{ :href => hardware_profile_url(prof.name), :'data-ajax' => 'false'}
=[prof.name, format_instance_profile(prof)].compact.join(', ')
%li{ :'data-role' => 'list-divider'} Realm
%li
- - if @instance.realm_id
- %a{ :href => realm_url(@instance.realm_id), :'data-ajax' => 'false' }=@instance.realm_id
+ - if instance.realm_id
+ %a{ :href => realm_url(instance.realm_id), :'data-ajax' => 'false' }=instance.realm_id
- else
default
%li{ :'data-role' => 'list-divider'} Public addresses
%li
- %p{ :'data-role' => 'fieldcontain'}=@instance.public_addresses.join(',')
+ %p{ :'data-role' => 'fieldcontain'}=instance.public_addresses.join(',')
%li{ :'data-role' => 'list-divider'} Private addresses
%li
- %p{ :'data-role' => 'fieldcontain'}=@instance.private_addresses.join(',')
- - if @instance.password or @instance.keyname
+ %p{ :'data-role' => 'fieldcontain'}=instance.private_addresses.join(',')
+ - if instance.password or instance.keyname
%li{ :'data-role' => 'list-divider'} Authentication
- - if @instance.password
+ - if instance.password
%li{ :'data-role' => 'list-divider'} Username
- %li=@instance.username
+ %li=instance.username
%li{ :'data-role' => 'list-divider'} Password
- %li=@instance.password
- - if @instance.keyname
+ %li=instance.password
+ - if instance.keyname
%li{ :'data-role' => 'list-divider'} SSH key name
%li
- %a{ :href => key_url(@instance.keyname), :'data-ajax' => 'false'}=@instance.keyname
- - if @instance.firewalls
+ %a{ :href => key_url(instance.keyname), :'data-ajax' => 'false'}=instance.keyname
+ - if instance.firewalls
%li{ :'data-role' => 'list-divider'} Firewalls
- - @instance.firewalls.each do |firewall|
+ - instance.firewalls.each do |firewall|
%li
%a{ :href => firewall_url(firewall), :'data-ajax' => 'false'}=firewall
- - if @instance.storage_volumes
+ - if instance.storage_volumes
%li{ :'data-role' => 'list-divider'} Attached Storage Volumes
- -@instance.storage_volumes.each do |vol|
+ -instance.storage_volumes.each do |vol|
%li
%a{ :href => storage_volume_url("#{vol.keys.first}"), :'data-ajax' => 'false'}=["#{vol.keys.first}", "#{vol.values.first}"].compact.reject{ |e| e.empty? }.join(' <---> ')
%li{ :'data-role' => 'list-divider'} Actions
%li
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
- - @instance.actions.each do |action|
- =link_to_action action.to_s.capitalize, self.send(:"#{action}_instance_url", @instance.id), instance_action_method(action)
- - if @instance.state=="RUNNING" and driver.respond_to?(:run_on_instance)
- =link_to_action 'Run command...', url_for('instances/%s/run' % @instance.id), :get
- - if @instance.can_create_image?
- =link_to_action 'Create image...', url_for("images/new?instance_id=#{@instance.id}"), :get
+ - instance.actions.each do |action|
+ =link_to_action action.to_s.capitalize, self.send(:"#{action}_instance_url", instance.id), instance_action_method(action)
+ - if instance.state=="RUNNING" and driver.respond_to?(:run_on_instance)
+ =link_to_action 'Run command...', url_for('instances/%s/run' % instance.id), :get
+ - if instance.can_create_image?
+ =link_to_action 'Create image...', url_for("images/new?instance_id=#{instance.id}"), :get
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/instances/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/instances/show.xml.haml b/server/views/instances/show.xml.haml
index 6a888f7..654037b 100644
--- a/server/views/instances/show.xml.haml
+++ b/server/views/instances/show.xml.haml
@@ -1,60 +1,60 @@
- unless defined?(partial)
!!! XML
-%instance{:href => instance_url(@instance.id), :id => @instance.id}
- - if @instance.name
+%instance{:href => instance_url(instance.id), :id => instance.id}
+ - if instance.name
%name<
- =@instance.name
- - if @instance.owner_id
+ =instance.name
+ - if instance.owner_id
%owner_id<
- =@instance.owner_id
- - if @instance.image_id
- %image{:href => image_url(@instance.image_id), :id => @instance.image_id }
- - if @instance.realm_id
- %realm{:href => realm_url(@instance.realm_id), :id => @instance.realm_id }
- - if @instance.state
+ =instance.owner_id
+ - if instance.image_id
+ %image{:href => image_url(instance.image_id), :id => instance.image_id }
+ - if instance.realm_id
+ %realm{:href => realm_url(instance.realm_id), :id => instance.realm_id }
+ - if instance.state
%state<
- =@instance.state
- - if @instance.instance_profile
- - haml_tag :"hardware_profile", {:id => @instance.instance_profile.id, :href => hardware_profile_url(@instance.instance_profile.id)} do
- - @instance.instance_profile.overrides.each do |p, v|
+ =instance.state
+ - if instance.instance_profile
+ - haml_tag :"hardware_profile", {:id => instance.instance_profile.id, :href => hardware_profile_url(instance.instance_profile.id)} do
+ - instance.instance_profile.overrides.each do |p, v|
%property{:kind => 'fixed', :name => p, :value => v, :unit => Deltacloud::HardwareProfile::unit(p)}
- - if @instance.actions
+ - if instance.actions
%actions
- - @instance.actions.compact.each do |instance_action|
- %link{:rel => instance_action, :method => instance_action_method(instance_action), :href => self.send("#{instance_action}_instance_url", @instance.id)}
+ - instance.actions.compact.each do |instance_action|
+ %link{:rel => instance_action, :method => instance_action_method(instance_action), :href => self.send("#{instance_action}_instance_url", instance.id)}
- if driver.respond_to?(:run_on_instance)
- %link{:rel => 'run', :method => :post, :href => "#{run_instance_url(@instance.id)};id=#{@instance.id}"}
- - if @instance.can_create_image?
- %link{:rel => 'create_image', :method => :post, :href => "#{create_image_url};instance_id=#{@instance.id}"}
- - if @instance.launch_time
+ %link{:rel => 'run', :method => :post, :href => "#{run_instance_url(instance.id)};id=#{instance.id}"}
+ - if instance.can_create_image?
+ %link{:rel => 'create_image', :method => :post, :href => "#{create_image_url};instance_id=#{instance.id}"}
+ - if instance.launch_time
%launch_time<
- =@instance.launch_time
- - if @instance.public_addresses
+ =instance.launch_time
+ - if instance.public_addresses
%public_addresses<
- - @instance.public_addresses.each do |a|
+ - instance.public_addresses.each do |a|
%address{ :type => a.address_type, :port => a.port }=a.address
- - if @instance.private_addresses
+ - if instance.private_addresses
%private_addresses<
- - @instance.private_addresses.each do |a|
+ - instance.private_addresses.each do |a|
%address{ :type => a.address_type, :port => a.port }=a.address
- - if @instance.firewalls
+ - if instance.firewalls
%firewalls<
- - @instance.firewalls.each do |firewall|
+ - instance.firewalls.each do |firewall|
%firewall{:href => firewall_url(firewall), :id => firewall }
- - if @instance.storage_volumes
+ - if instance.storage_volumes
%storage_volumes<
- - @instance.storage_volumes.each do |volume|
+ - instance.storage_volumes.each do |volume|
%storage_volume{:href=> storage_volume_url(volume.keys.first), :id => volume.keys.first, :device => volume.values.first}
- if driver.class.has_feature?(:instances, :authentication_key) or driver.class.has_feature?(:instances, :authentication_password)
%authentication{ :type => auth_feature_name }
- - if @instance.authn_feature_failed?
- %error #{@instance.authn_error}
+ - if instance.authn_feature_failed?
+ %error #{instance.authn_error}
- else
- - if @instance.password
+ - if instance.password
%login
- %username #{@instance.username}
- %password=cdata(@instance.password)
- - if @instance.keyname
+ %username #{instance.username}
+ %password=cdata(instance.password)
+ - if instance.keyname
%login
- %keyname #{@instance.keyname}
+ %keyname #{instance.keyname}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/keys/index.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/keys/index.xml.haml b/server/views/keys/index.xml.haml
index 9256716..e379e49 100644
--- a/server/views/keys/index.xml.haml
+++ b/server/views/keys/index.xml.haml
@@ -1,4 +1,4 @@
!!!XML
%keys
- - @elements.each do |c|
- = haml :'keys/show', :locals => { :@key => c, :partial => true }
+ - elements.each do |c|
+ = haml :'keys/show', :locals => { :key => c, :partial => true }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/keys/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/keys/show.xml.haml b/server/views/keys/show.xml.haml
index db0786b..49e6de3 100644
--- a/server/views/keys/show.xml.haml
+++ b/server/views/keys/show.xml.haml
@@ -1,23 +1,23 @@
- unless defined?(partial)
!!! XML
-%key{ :href => key_url(@key.id), :id => @key.id, :type => "#{@key.credential_type}" }
- %name=@key.name
+%key{ :href => key_url(key.id), :id => key.id, :type => "#{key.credential_type}" }
+ %name=key.name
%actions
- if driver.respond_to?(:destroy_key)
- %link{ :rel => "destroy", :method => "delete", :href => destroy_key_url(@key.id)}
- - if @key.is_key?
- - if @key.fingerprint
+ %link{ :rel => "destroy", :method => "delete", :href => destroy_key_url(key.id)}
+ - if key.is_key?
+ - if key.fingerprint
%fingerprint<
- =@key.fingerprint
- - unless @key.pem_rsa_key.nil?
+ =key.fingerprint
+ - unless key.pem_rsa_key.nil?
%pem
- ~render_cdata(@key.pem_rsa_key)
- - if @key.is_password?
+ ~render_cdata(key.pem_rsa_key)
+ - if key.is_password?
%username<
=cdata do
- =@key.username
+ =key.username
%password<
=cdata do
- =@key.password
+ =key.password
%state<
- =@key.state
+ =key.state
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/load_balancers/index.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/load_balancers/index.xml.haml b/server/views/load_balancers/index.xml.haml
index 053b628..994c9cb 100644
--- a/server/views/load_balancers/index.xml.haml
+++ b/server/views/load_balancers/index.xml.haml
@@ -1,4 +1,4 @@
!!!XML
%load_balancers
- - @elements.each do |c|
- = haml :'load_balancers/show', :locals => { :@load_balancer => c, :partial => true }
+ - elements.each do |c|
+ = haml :'load_balancers/show', :locals => { :load_balancer => c, :partial => true }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/load_balancers/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/load_balancers/show.xml.haml b/server/views/load_balancers/show.xml.haml
index 2eeb09e..43b7034 100644
--- a/server/views/load_balancers/show.xml.haml
+++ b/server/views/load_balancers/show.xml.haml
@@ -1,21 +1,21 @@
- unless defined?(partial)
!!! XML
-%load_balancer{ :href => load_balancer_url(@load_balancer.id), :id => @load_balancer.id}
+%load_balancer{ :href => load_balancer_url(load_balancer.id), :id => load_balancer.id}
%actions
- %link{ :rel => "destroy", :method => "delete", :href => destroy_load_balancer_url(@load_balancer.id)}
- %link{ :rel => "register", :method => "post", :href => register_load_balancer_url(@load_balancer.id)}
+ %link{ :rel => "destroy", :method => "delete", :href => destroy_load_balancer_url(load_balancer.id)}
+ %link{ :rel => "register", :method => "post", :href => register_load_balancer_url(load_balancer.id)}
%public_addresses
- - @load_balancer.public_addresses.each do |address|
+ - load_balancer.public_addresses.each do |address|
%address #{address}
%created_at<
- = @load_balancer.created_at
- %realm{ :href => realm_url(@load_balancer.realms.first.id), :id => @load_balancer.realms.first.id}
+ = load_balancer.created_at
+ %realm{ :href => realm_url(load_balancer.realms.first.id), :id => load_balancer.realms.first.id}
%listeners
- - @load_balancer.listeners.each do |listener|
+ - load_balancer.listeners.each do |listener|
%listener{ :protocol => listener.protocol}
%load_balancer_port #{listener.load_balancer_port}
%instance_port #{listener.instance_port}
%instances
- - @load_balancer.instances.each do |instance|
+ - load_balancer.instances.each do |instance|
%instance{:href => instance_url(instance.id), :id => instance.id}
- %link{:rel => "unregister", :href => unregister_load_balancer_url(@load_balancer.id, { :instance_id => instance.id})}
+ %link{:rel => "unregister", :href => unregister_load_balancer_url(load_balancer.id, { :instance_id => instance.id})}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/metrics/index.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/metrics/index.xml.haml b/server/views/metrics/index.xml.haml
index bd5c184..36c8ccd 100644
--- a/server/views/metrics/index.xml.haml
+++ b/server/views/metrics/index.xml.haml
@@ -1,5 +1,5 @@
- unless defined?(partial)
!!!XML
%metrics
- - @elements.each do |c|
- = haml :'metrics/show', :locals => { :@metric => c, :partial => true}
+ - elements.each do |c|
+ = haml :'metrics/show', :locals => { :metric => c, :partial => true}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/metrics/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/metrics/show.xml.haml b/server/views/metrics/show.xml.haml
index 87254d0..5434413 100644
--- a/server/views/metrics/show.xml.haml
+++ b/server/views/metrics/show.xml.haml
@@ -1,10 +1,10 @@
- unless defined?(partial)
!!! XML
-%metric{:href => metric_url(@metric.id), :id => @metric.id}
+%metric{:href => metric_url(metric.id), :id => metric.id}
-haml_tag(:entity, :<) do
- -haml_concat @metric.send(:entity) || @metric.send(:id)
+ -haml_concat metric.send(:entity) || metric.send(:id)
%properties
- -@metric.properties.each do |prop|
+ -metric.properties.each do |prop|
-haml_tag(prop.name, :<) do
- if prop.values
- prop.values.each do |p|
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/realms/index.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/realms/index.xml.haml b/server/views/realms/index.xml.haml
index 71d1cb1..59f55ff 100644
--- a/server/views/realms/index.xml.haml
+++ b/server/views/realms/index.xml.haml
@@ -1,4 +1,4 @@
!!!XML
%realms
- - @elements.each do |c|
- = haml :'realms/show', :locals => { :@realm => c, :partial => true }
+ - elements.each do |c|
+ = haml :'realms/show', :locals => { :realm => c, :partial => true }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/realms/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/realms/show.xml.haml b/server/views/realms/show.xml.haml
index 5c06c06..2cc0c8c 100644
--- a/server/views/realms/show.xml.haml
+++ b/server/views/realms/show.xml.haml
@@ -1,11 +1,11 @@
- unless defined?(partial)
!!! XML
-%realm{:href => realm_url(@realm.id), :id => @realm.id }
+%realm{:href => realm_url(realm.id), :id => realm.id }
%name<
- =@realm.name
+ =realm.name
%state<
- =@realm.state
- - unless @realm.limit.eql?(:unlimited)
+ =realm.state
+ - unless realm.limit.eql?(:unlimited)
%limit<
=cdata do
- =@realm.limit
+ =realm.limit
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/storage_snapshots/index.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/storage_snapshots/index.xml.haml b/server/views/storage_snapshots/index.xml.haml
index 9ae9675..4a8b14f 100644
--- a/server/views/storage_snapshots/index.xml.haml
+++ b/server/views/storage_snapshots/index.xml.haml
@@ -1,4 +1,4 @@
!!!XML
%storage_snapshots
- - @elements.each do |c|
- = haml :'storage_snapshots/show', :locals => { :@storage_snapshot => c, :partial => true }
+ - elements.each do |c|
+ = haml :'storage_snapshots/show', :locals => { :storage_snapshot => c, :partial => true }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/storage_snapshots/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/storage_snapshots/show.xml.haml b/server/views/storage_snapshots/show.xml.haml
index a47a652..075fdc4 100644
--- a/server/views/storage_snapshots/show.xml.haml
+++ b/server/views/storage_snapshots/show.xml.haml
@@ -1,7 +1,7 @@
- unless defined?(partial)
!!! XML
-%storage_snapshot{:href => storage_snapshot_url(@storage_snapshot.id), :id => @storage_snapshot.id }
- %name=@storage_snapshot.id
+%storage_snapshot{:href => storage_snapshot_url(storage_snapshot.id), :id => storage_snapshot.id }
+ %name=storage_snapshot.id
%created<
- =@storage_snapshot.created
- %storage_volume{:href => storage_volume_url(@storage_snapshot.storage_volume_id), :id => @storage_snapshot.storage_volume_id}
+ =storage_snapshot.created
+ %storage_volume{:href => storage_volume_url(storage_snapshot.storage_volume_id), :id => storage_snapshot.storage_volume_id}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/storage_volumes/index.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/storage_volumes/index.xml.haml b/server/views/storage_volumes/index.xml.haml
index e73c46a..31517a3 100644
--- a/server/views/storage_volumes/index.xml.haml
+++ b/server/views/storage_volumes/index.xml.haml
@@ -1,4 +1,4 @@
!!!XML
%storage_volumes
- - @elements.each do |volume|
- = haml :'storage_volumes/show', :locals => { :@storage_volume => volume, :partial => true }
+ - elements.each do |volume|
+ = haml :'storage_volumes/show', :locals => { :storage_volume => volume, :partial => true }
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b8652ea6/server/views/storage_volumes/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/storage_volumes/show.xml.haml b/server/views/storage_volumes/show.xml.haml
index ccd1baa..f96bc4f 100644
--- a/server/views/storage_volumes/show.xml.haml
+++ b/server/views/storage_volumes/show.xml.haml
@@ -1,33 +1,33 @@
- unless defined?(partial)
!!!XML
-%storage_volume{ :href => storage_volume_url(@storage_volume.id), :id => @storage_volume.id}
- - if @storage_volume.created
+%storage_volume{ :href => storage_volume_url(storage_volume.id), :id => storage_volume.id}
+ - if storage_volume.created
%created<
- =@storage_volume.created
+ =storage_volume.created
%capacity{ :unit => "GB" }<
- = @storage_volume.capacity
- - if @storage_volume.kind
+ = storage_volume.capacity
+ - if storage_volume.kind
%kind<
- = @storage_volume.kind
+ = storage_volume.kind
%name<
- = @storage_volume.name || @storage_volume.id
- - if @storage_volume.device
+ = storage_volume.name || storage_volume.id
+ - if storage_volume.device
%device<
- = @storage_volume.device
- - if @storage_volume.realm_id
- %realm{:id => @storage_volume.realm_id, :href => realm_url(@storage_volume.realm_id)}
+ = storage_volume.device
+ - if storage_volume.realm_id
+ %realm{:id => storage_volume.realm_id, :href => realm_url(storage_volume.realm_id)}
%realm_id<
- = @storage_volume.realm_id
- - if @storage_volume.state
+ = storage_volume.realm_id
+ - if storage_volume.state
%state<
- = @storage_volume.state
+ = storage_volume.state
- - unless @storage_volume.instance_id.nil?
+ - unless storage_volume.instance_id.nil?
%mount
- %instance{:href => instance_url(@storage_volume.instance_id), :id => @storage_volume.instance_id}
- - unless @storage_volume.device.nil?
- %device{ :name => @storage_volume.device }
- - if @storage_volume.actions
+ %instance{:href => instance_url(storage_volume.instance_id), :id => storage_volume.instance_id}
+ - unless storage_volume.device.nil?
+ %device{ :name => storage_volume.device }
+ - if storage_volume.actions
%actions
- - @storage_volume.actions.each do |action|
- %link{:rel => action, :method => :post, :href => self.send("#{action}_storage_volume_url", @storage_volume.id)}
+ - storage_volume.actions.each do |action|
+ %link{:rel => action, :method => :post, :href => self.send("#{action}_storage_volume_url", storage_volume.id)}
[6/7] git commit: Core: Unlocked sinatra and tilt versions
Posted by mf...@apache.org.
Core: Unlocked sinatra and tilt versions
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/5ec2798e
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/5ec2798e
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/5ec2798e
Branch: refs/heads/master
Commit: 5ec2798e7bf5b5ccf9e04cfdb5666fd673ecdf1a
Parents: 12954ba
Author: Michal Fojtik <mf...@redhat.com>
Authored: Tue Mar 26 11:00:08 2013 +0100
Committer: Michal fojtik <mf...@redhat.com>
Committed: Tue Mar 26 11:00:08 2013 +0100
----------------------------------------------------------------------
server/deltacloud-core.gemspec | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/5ec2798e/server/deltacloud-core.gemspec
----------------------------------------------------------------------
diff --git a/server/deltacloud-core.gemspec b/server/deltacloud-core.gemspec
index ce035c5..f652dcf 100644
--- a/server/deltacloud-core.gemspec
+++ b/server/deltacloud-core.gemspec
@@ -78,11 +78,8 @@ Gem::Specification.new do |s|
s.add_dependency('require_relative') if RUBY_VERSION < '1.9'
s.add_dependency('sequel', '<= 3.42.0')
- # FIXME: These dependencies are locked due to bugs that
- # we will not address in this release.
- #
- s.add_dependency('tilt', '<=1.3.3')
- s.add_dependency('sinatra', '<=1.3.5')
+ s.add_dependency('tilt')
+ s.add_dependency('sinatra')
if RUBY_PLATFORM == 'java'
[5/7] git commit: Removed obsoleted docs/ views
Posted by mf...@apache.org.
Removed obsoleted docs/ views
* documentation is now part of sinatra-rabbit
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/37b80f99
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/37b80f99
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/37b80f99
Branch: refs/heads/master
Commit: 37b80f99a6590f515bc1c0123e58c9a865bdbe1f
Parents: a19b3d1
Author: Michal Fojtik <mf...@redhat.com>
Authored: Tue Mar 26 10:46:50 2013 +0100
Committer: Michal fojtik <mf...@redhat.com>
Committed: Tue Mar 26 10:50:00 2013 +0100
----------------------------------------------------------------------
server/views/docs/collection.html.haml | 26 ---------------------
server/views/docs/collection.xml.haml | 14 -----------
server/views/docs/index.html.haml | 11 ---------
server/views/docs/index.xml.haml | 5 ----
server/views/docs/operation.html.haml | 33 ---------------------------
server/views/docs/operation.xml.haml | 10 --------
server/views/root/index.html.haml | 4 ---
7 files changed, 0 insertions(+), 103 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/37b80f99/server/views/docs/collection.html.haml
----------------------------------------------------------------------
diff --git a/server/views/docs/collection.html.haml b/server/views/docs/collection.html.haml
deleted file mode 100644
index a973b4f..0000000
--- a/server/views/docs/collection.html.haml
+++ /dev/null
@@ -1,26 +0,0 @@
-=header "Deltacloud API #{settings.version} documentation", :back => 'false'
-=subheader collection.name.to_s.titlecase
-
-%div{ :'data-role' => :content, :'data-theme' => 'c'}
- %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
- %li{ :'data-role' => 'list-divider'}
- %h3
- Collection description:
- %li
- %br
- %p{ :'data-role' => 'fieldcontain'}=collection.description
- %li{ :'data-role' => 'list-divider', :'data-divider-theme' => 'a'}
- %h3 Operations:
- - operations.keys.sort_by { |k| k.to_s }.each do |operation|
- %li{ :'data-role' => 'list-divider'}
- %a{:href => url_for("docs/#{collection.name.to_s}/#{operation}"), :'data-ajax' => 'false'} #{operation}
- %li
- %br
- %p=operations[operation].description
- %li{ :'data-role' => 'list-divider', :'data-divider-theme' => 'a'}
- %h3 Defined features:
- - features.sort_by { |f| f.name.to_s }.each do |feature|
- %li{ :'data-role' => 'list-divider'}=feature.name
- %li
- %br
- %p=feature.description
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/37b80f99/server/views/docs/collection.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/docs/collection.xml.haml b/server/views/docs/collection.xml.haml
deleted file mode 100644
index 4359901..0000000
--- a/server/views/docs/collection.xml.haml
+++ /dev/null
@@ -1,14 +0,0 @@
-%docs{:status => "unsupported"}
- %collection{:url => url_for("docs/#{@collection.name}"), :name => "#{@collection.name}"}
- %description #{@collection.description}
- %operations
- - @operations.keys.sort_by { |k| k.to_s }.each do |operation|
- %operation{:url => url_for("#{@collection.name.to_s}"), :name => "#{operation}", :href => url_for("#{@operations[operation].path}"), :method => "#{@operations[operation].method}"}
- %description #{@operations[operation].description}
- - @operations[operation].each_param do |param|
- %parameter{:name => "#{param.name}", :type => "#{param.type}"}
- %class #{param.klass}
- - unless param.options.empty?
- %values
- - param.options.each do |v|
- %value #{v}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/37b80f99/server/views/docs/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/docs/index.html.haml b/server/views/docs/index.html.haml
deleted file mode 100644
index 742e03f..0000000
--- a/server/views/docs/index.html.haml
+++ /dev/null
@@ -1,11 +0,0 @@
-=header "Deltacloud API #{settings.version} documentation", :back => 'false'
-=subheader "Note: This documentation is autogenerated and thus not supported"
-
-%div{ :'data-role' => :content, :'data-theme' => 'c'}
- %ul{ :'data-role' => :listview, :'data-inset' => 'true'}
- - collections.keys.sort_by { |k| k.to_s }.each do |collection|
- %li
- %a{:href => url_for("docs/#{collection}"), :'data-ajax' => 'false'}
- %h3=collection.to_s.capitalize.tr('_', ' ')
- %p=collections[collection].description
-
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/37b80f99/server/views/docs/index.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/docs/index.xml.haml b/server/views/docs/index.xml.haml
deleted file mode 100644
index 18c9f7b..0000000
--- a/server/views/docs/index.xml.haml
+++ /dev/null
@@ -1,5 +0,0 @@
-%docs{:status => "unsupported"}
- - collections.keys.sort_by { |k| k.to_s }.each do |collection|
- %collection{:url => url_for("docs/#{collection}")}
- %name #{collection}
- %description #{collections[collection].description}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/37b80f99/server/views/docs/operation.html.haml
----------------------------------------------------------------------
diff --git a/server/views/docs/operation.html.haml b/server/views/docs/operation.html.haml
deleted file mode 100644
index 6baed0b..0000000
--- a/server/views/docs/operation.html.haml
+++ /dev/null
@@ -1,33 +0,0 @@
-=header "Deltacloud API #{settings.version} documentation", :back => 'false'
-=subheader "#{action_method(operation.name, collection.name).to_s.upcase} /api/#{collection.name}/#{operation.name}"
-
-%div{ :'data-role' => :content, :'data-theme' => 'c'}
- %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
- %li{ :'data-role' => 'list-divider'}
- %h3
- Description:
- %li
- %br
- %p=operation.description
-
- %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
- %li{ :'data-role' => 'list-divider', :'data-divider-theme' => 'a'}
- %h3 Parameters:
- - operation.each_param do |p|
- %li{ :'data-role' => 'list-divider'}
- =p.name
- %span{ :class => 'ui-li-count'}
- =[p.type,p.klass].join(',')
- %li
- %br
- %p=p.description.empty? ? '<strong>FIXME:</strong> No description for this parameter' : p.description
- - features.sort { |a,b| a.name.to_s <=> b.name.to_s }.each do |f|
- - f.decl.operation(operation.name).each_param do |p|
- %li{ :'data-role' => 'list-divider'}
- =p.name
- %span{ :class => 'ui-li-count'}
- =[p.type,p.klass].join(',')
- %li
- %br
- %p=p.description.empty? ? '<strong>FIXME:</strong> No description for this parameter' : p.description
-
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/37b80f99/server/views/docs/operation.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/docs/operation.xml.haml b/server/views/docs/operation.xml.haml
deleted file mode 100644
index 3faa5e5..0000000
--- a/server/views/docs/operation.xml.haml
+++ /dev/null
@@ -1,10 +0,0 @@
-%docs{:status => "unsupported"}
- %operation{:url => url_for("docs/#{@collection.name.to_s}"), :name => "#{@operation.name.to_s}", :href => url_for("#{@operation.path}"), :method => "#{@operation.method}"}
- %description #{@operation.description}
- - @operation.each_param do |param|
- %parameter{:name => "#{param.name}", :type => "#{param.type}"}
- %class #{param.klass}
- - unless param.options.empty?
- %values
- - param.options.each do |v|
- %value #{v}
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/37b80f99/server/views/root/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/root/index.html.haml b/server/views/root/index.html.haml
deleted file mode 100644
index cc2d36e..0000000
--- a/server/views/root/index.html.haml
+++ /dev/null
@@ -1,4 +0,0 @@
-%h1
- Deltacloud:
- = DRIVER.to_s.titlecase
-%a{ :href => api_url} API