Query regarding Deltacloud with EC2 driver
by Hemendra Jadaun
Hi,
I have successfully installed deltacloud portal and framework and working with mock driver. Can you tell me how to work with EC2 driver.
Thanks ,
Hemendra
________________________________
This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
______________________________________________________________________
14 years, 3 months
Some housekeeping notes
by David Lutterkort
Hi,
a couple of random notes:
1. We (well, mostly Michal) are working on (a) migrating the dcloud
API to Sinatra[1] and (b) adding validation and
self-documentation to the API. That is happening on the
dev/sinatra branch in a separate, temporary repo[2] (we are not
doing it on a branch in the main repo since we might do nasty
stuff like rebase a published branch etc.) Once that work has
reached a reasonable state, it will be folded, after a proper
review, into the main dcloud git repo, of course.
2. I had the fedorahosted admins install a couple of commit hooks;
in particular, the hooks forbid pushing merge commits and bad,
i.e. trailing, whitespace. If you have commit access, your
workflow should be based on topic branches and look something
like
git checkout -b dev/mystuff master
.. do lots of work on the dev/mystuff branch
.. time passes, master moves on
.. your patches have been reviewed and you are ready to push
.. these steps should be done quickly, before anybody else pushes
git rebase master dev/mystuff
git checkout master
git pull . dev/mystuff
git push
David
[1] http://www.sinatrarb.com/
[2] http://gitorious.org/deltacloud-sinatra/deltacloud-sinatra
14 years, 4 months
Re: [deltacloud-devel] [PATCH] OpenNebula driver
by David Lutterkort
On Wed, 2010-01-27 at 12:38 +0100, Daniel Molina Aranda wrote:
> 2010/1/27 David Lutterkort <lutter(a)redhat.com>
> 1. Can you send me some verbiage for
> http://deltacloud.org/drivers.html ? Just a few
> sentences that
> I'll add in a new OpenNebula driver section
> When using the driver for OpenNebula, the credentials passed in
> response to the HTTP 401 authentication challenge should be your
> OpenNebula user and password.
>
> The address, in which the OCCI server is listening, needs to be
> defined in an environment variable called OCCI_URL.
>
>
>
>
> 2. The driver currently uses crack to parse XML; in the
> interest of
> keeping the number of dependencies down, could you
> change things
> so that you use ReXML instead ? You can do that as an
> add-on
> patch after I commit the driver
>
> Ok, there is no problem in changing to ReXML. We will change it next
> week, we have lot of work these days.
Ok .. cool. I just pushed the driver to the core git repo and added a
mention of it to the drivers section in the docs.
David
14 years, 4 months
[PATCH] Additional parameters support for deltacloudd
by Michal Fojtik
Hi,
Just addded support for additional parameters for deltacloudd with some basic validation.
So now you could do:
./bin/deltacloudd ec2 -p3030
---
server/bin/deltacloudd | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/server/bin/deltacloudd b/server/bin/deltacloudd
index 33f7108..70da01b 100755
--- a/server/bin/deltacloudd
+++ b/server/bin/deltacloudd
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-if ( ARGV.size != 1 )
+if (ARGV.empty? || (!ARGV.empty? && ![:ec2, :rhevm, :mock, :rimu, :rackspace].include?(ARGV[0].to_sym)))
puts "Usage: deltacloudd <drivername>"
exit 1
end
--
1.6.6
--
- Michal
14 years, 4 months
Re: [deltacloud-devel] [PATCH] OpenNebula driver
by David Lutterkort
Hi Daniel,
On Tue, 2010-01-26 at 17:34 +0100, Daniel Molina Aranda wrote:
> The OpenNebula team would be more than happy to maintain the
> OpenNebula driver, in the same way that we do in libvirt with the
> OpenNebula plugin.
>
> We would like to be included in the main repo, as it has happened with
> the rest of the implemented drivers, becoming a "baked-in component"
> of the Deltacloud project.
I just gave the driver a quick spin, and it all looks good. I made a
couple small changes: (1) renamed OCCIClient.rb -> occi_client.rb, (2)
renamed CloudClient.rb -> cloud_client.rb (3) various whitespace
cleanup.
Before I push this, there's a couple things that I'd like you to
address:
1. Can you send me some verbiage for
http://deltacloud.org/drivers.html ? Just a few sentences that
I'll add in a new OpenNebula driver section
2. The driver currently uses crack to parse XML; in the interest of
keeping the number of dependencies down, could you change things
so that you use ReXML instead ? You can do that as an add-on
patch after I commit the driver.
David
14 years, 4 months
API Patch to return 404 HTTP code when realm, flavor or image not found
by Roman
Hello,
It looks like there is a minor issue when image, realm or flavor is
requested by id. Deltacloud API returns an error HTTP document instead
of 404 HTTP code, even if requested response format is XML. Below is a
trivial patch to address this issue.
Hope it can be of any use.
Thank you,
Roman
diff --git a/server/libexec/app/controllers/flavors_controller.rb
b/server/libexec/app/controllers/flavors_controller.rb
index 6176f2a..21d6531 100644
--- a/server/libexec/app/controllers/flavors_controller.rb
+++ b/server/libexec/app/controllers/flavors_controller.rb
@@ -40,6 +40,7 @@ class FlavorsController < ApplicationController
format.html
format.json
format.xml {
+ render :nothing=>true, :status=>404 and return unless @flavor
render :xml=>convert_to_xml( :flavor, @flavor )
}
end
diff --git a/server/libexec/app/controllers/images_controller.rb
b/server/libexec/app/controllers/images_controller.rb
index 382b138..a01b417 100644
--- a/server/libexec/app/controllers/images_controller.rb
+++ b/server/libexec/app/controllers/images_controller.rb
@@ -44,6 +44,7 @@ class ImagesController < ApplicationController
format.html
format.json
format.xml {
+ render :nothing=>true, :status=>404 and return unless @image
render :xml=>convert_to_xml( :image, @image )
}
end
diff --git a/server/libexec/app/controllers/realms_controller.rb
b/server/libexec/app/controllers/realms_controller.rb
index 492b850..73168ce 100644
--- a/server/libexec/app/controllers/realms_controller.rb
+++ b/server/libexec/app/controllers/realms_controller.rb
@@ -40,6 +40,7 @@ class RealmsController < ApplicationController
format.html
format.json
format.xml {
+ render :nothing=>true, :status=>404 and return unless @realm
render :xml=>convert_to_xml( :realm, @realm )
}
end
14 years, 4 months
Releases / Fedora packaging for dcloud?
by Greg DeKoenigsberg
So when I go to http://deltacloud.org/download.html, I see this sentence:
"As soon as possible, we will have everything packaged up for fedora, but
in the meantime, we have an rpm already built for the portal, which can be
found here."
I know that we would love to be running an instance of deltacloud on
Fedora Hosted somewhere to show it off. How far are you guys, roughly,
from having a Core "release", no matter how modest, that we can package
for initial inclusion in Fedora?
--g
--
Computer Science professors should be teaching open source.
Help make it happen. Visit http://teachingopensource.org.
14 years, 4 months
[PATCH] HAML views
by Michal Fojtik
From: Michal Fojtik <mfojtik(a)redhat.com>
* Replaced almost every ERB view with HAML
* Fixed year in copyright (application layout)
---
server/libexec/app/views/accounts/index.html.erb | 16 ----
server/libexec/app/views/accounts/index.html.haml | 10 ++
server/libexec/app/views/accounts/show.html.erb | 41 ---------
server/libexec/app/views/accounts/show.html.haml | 14 +++
server/libexec/app/views/flavors/index.html.erb | 35 --------
server/libexec/app/views/flavors/index.html.haml | 22 +++++
server/libexec/app/views/flavors/show.html.erb | 28 ------
server/libexec/app/views/flavors/show.html.haml | 16 ++++
.../app/views/hardware_profiles/index.html.haml | 49 ++++++-----
server/libexec/app/views/images/index.html.erb | 41 ---------
server/libexec/app/views/images/index.html.haml | 30 +++++++
server/libexec/app/views/images/show.html.erb | 42 ---------
server/libexec/app/views/images/show.html.haml | 22 +++++
.../app/views/instance_states/show.html.erb | 53 ------------
.../app/views/instance_states/show.html.haml | 31 +++++++
server/libexec/app/views/instances/index.html.erb | 68 ---------------
server/libexec/app/views/instances/index.html.haml | 33 +++++++
server/libexec/app/views/instances/show.html.erb | 88 --------------------
server/libexec/app/views/instances/show.html.haml | 41 +++++++++
.../app/views/layouts/application.html.haml | 4 +-
server/libexec/app/views/realms/index.html.erb | 35 --------
server/libexec/app/views/realms/index.html.haml | 29 +++++++
server/libexec/app/views/realms/show.html.erb | 28 ------
server/libexec/app/views/realms/show.html.haml | 15 ++++
server/libexec/app/views/root/index.html.erb | 5 -
server/libexec/app/views/root/index.html.haml | 4 +
.../app/views/storage_snapshots/index.html.erb | 35 --------
.../app/views/storage_snapshots/index.html.haml | 20 +++++
.../app/views/storage_snapshots/show.html.erb | 29 -------
.../app/views/storage_snapshots/show.html.haml | 14 +++
.../app/views/storage_volumes/index.html.erb | 35 --------
.../app/views/storage_volumes/index.html.haml | 21 +++++
.../app/views/storage_volumes/show.html.erb | 39 ---------
.../app/views/storage_volumes/show.html.haml | 20 +++++
34 files changed, 371 insertions(+), 642 deletions(-)
delete mode 100644 server/libexec/app/views/accounts/index.html.erb
create mode 100644 server/libexec/app/views/accounts/index.html.haml
delete mode 100644 server/libexec/app/views/accounts/show.html.erb
create mode 100644 server/libexec/app/views/accounts/show.html.haml
delete mode 100644 server/libexec/app/views/flavors/index.html.erb
create mode 100644 server/libexec/app/views/flavors/index.html.haml
delete mode 100644 server/libexec/app/views/flavors/show.html.erb
create mode 100644 server/libexec/app/views/flavors/show.html.haml
delete mode 100644 server/libexec/app/views/images/index.html.erb
create mode 100644 server/libexec/app/views/images/index.html.haml
delete mode 100644 server/libexec/app/views/images/show.html.erb
create mode 100644 server/libexec/app/views/images/show.html.haml
delete mode 100644 server/libexec/app/views/instance_states/show.html.erb
create mode 100644 server/libexec/app/views/instance_states/show.html.haml
delete mode 100644 server/libexec/app/views/instances/index.html.erb
create mode 100644 server/libexec/app/views/instances/index.html.haml
delete mode 100644 server/libexec/app/views/instances/show.html.erb
create mode 100644 server/libexec/app/views/instances/show.html.haml
delete mode 100644 server/libexec/app/views/realms/index.html.erb
create mode 100644 server/libexec/app/views/realms/index.html.haml
delete mode 100644 server/libexec/app/views/realms/show.html.erb
create mode 100644 server/libexec/app/views/realms/show.html.haml
delete mode 100644 server/libexec/app/views/root/index.html.erb
create mode 100644 server/libexec/app/views/root/index.html.haml
delete mode 100644 server/libexec/app/views/storage_snapshots/index.html.erb
create mode 100644 server/libexec/app/views/storage_snapshots/index.html.haml
delete mode 100644 server/libexec/app/views/storage_snapshots/show.html.erb
create mode 100644 server/libexec/app/views/storage_snapshots/show.html.haml
delete mode 100644 server/libexec/app/views/storage_volumes/index.html.erb
create mode 100644 server/libexec/app/views/storage_volumes/index.html.haml
delete mode 100644 server/libexec/app/views/storage_volumes/show.html.erb
create mode 100644 server/libexec/app/views/storage_volumes/show.html.haml
diff --git a/server/libexec/app/views/accounts/index.html.erb b/server/libexec/app/views/accounts/index.html.erb
deleted file mode 100644
index a9b9d88..0000000
--- a/server/libexec/app/views/accounts/index.html.erb
+++ /dev/null
@@ -1,16 +0,0 @@
-<h1>Accounts</h1>
-
-<table>
- <tr>
- <th>
- ID
- </th>
- </tr>
- <% for account in @accounts %>
- <tr>
- <td>
- <%= link_to account, account %>
- </td>
- </tr>
- <% end %>
-</table>
diff --git a/server/libexec/app/views/accounts/index.html.haml b/server/libexec/app/views/accounts/index.html.haml
new file mode 100644
index 0000000..7aee4c9
--- /dev/null
+++ b/server/libexec/app/views/accounts/index.html.haml
@@ -0,0 +1,10 @@
+%h1 Accounts
+
+%table
+ %thead
+ %th ID
+ %tbody
+ - @accounts.each do |account|
+ %tr
+ %td
+ = link_to account, account
diff --git a/server/libexec/app/views/accounts/show.html.erb b/server/libexec/app/views/accounts/show.html.erb
deleted file mode 100644
index a445154..0000000
--- a/server/libexec/app/views/accounts/show.html.erb
+++ /dev/null
@@ -1,41 +0,0 @@
-<h1><%= @account[:id] %></h1>
-
-<h2>Instances</h2>
-
-<table>
- <tr>
- <th>
- Instance ID
- </th>
- </tr>
- <% for instance_id in @account[:instance_ids] %>
- <tr>
- <td>
- <%= link_to instance_id, instance_url( instance_id ) %>
- </td>
- </tr>
- <% end %>
-</table>
-
-<h2>Images</h2>
-
-<table>
- <tr>
- <th>
- Image ID
- </th>
- <th>
- Description
- </th>
- </tr>
- <% for image in @images %>
- <tr>
- <td>
- <%= link_to image[:id], image_url( image[:id] ) %>
- </td>
- <td>
- <%= image[:description] %>
- </td>
- </tr>
- <% end %>
-</table>
diff --git a/server/libexec/app/views/accounts/show.html.haml b/server/libexec/app/views/accounts/show.html.haml
new file mode 100644
index 0000000..c09e63c
--- /dev/null
+++ b/server/libexec/app/views/accounts/show.html.haml
@@ -0,0 +1,14 @@
+%h1
+ = @account[:id]
+
+%h2 Instances
+
+%table
+ %thead
+ %tr
+ %th Instance ID
+ %tbody
+ - @account[:instance_ids].each do |instance_id|
+ %tr
+ %td
+ = link_to instance_id, instance_url( instance_id )
diff --git a/server/libexec/app/views/flavors/index.html.erb b/server/libexec/app/views/flavors/index.html.erb
deleted file mode 100644
index 8becc1d..0000000
--- a/server/libexec/app/views/flavors/index.html.erb
+++ /dev/null
@@ -1,35 +0,0 @@
-
-<h1>Flavors</h1>
-
-<table>
- <tr>
- <th>
- ID
- </th>
- <th>
- Architecture
- </th>
- <th>
- Memory
- </th>
- <th>
- Storage
- </th>
- </tr>
- <% for flavor in @flavors %>
- <tr>
- <td>
- <%= link_to flavor.id, flavor_url( flavor.id ) %>
- </td>
- <td>
- <%= flavor.architecture %>
- </td>
- <td>
- <%= flavor.memory %> GB
- </td>
- <td>
- <%= flavor.storage %> GB
- </td>
- </tr>
- <% end %>
-</table>
diff --git a/server/libexec/app/views/flavors/index.html.haml b/server/libexec/app/views/flavors/index.html.haml
new file mode 100644
index 0000000..3beee0b
--- /dev/null
+++ b/server/libexec/app/views/flavors/index.html.haml
@@ -0,0 +1,22 @@
+%h1
+ Flavors
+
+%table.display
+ %thead
+ %tr
+ %th ID
+ %th Architecture
+ %th Memory
+ %th Storage
+ %tbody
+ - @flavors.each do |flavor|
+ %tr
+ %td
+ = link_to flavor.id, flavor_url( flavor.id )
+ %td
+ = flavor.architecture
+ %td
+ = "#{flavor.memory} GB"
+ %td
+ = "#{flavor.storage} GB"
+
diff --git a/server/libexec/app/views/flavors/show.html.erb b/server/libexec/app/views/flavors/show.html.erb
deleted file mode 100644
index e17936c..0000000
--- a/server/libexec/app/views/flavors/show.html.erb
+++ /dev/null
@@ -1,28 +0,0 @@
-<h1><%= @flavor.id %></h1>
-
-<dl>
- <di>
- <dt>
- Architecture
- </dt>
- <dd>
- <%= @flavor.architecture %>
- </dd>
- </di>
- <di>
- <dt>
- Memory
- </dt>
- <dd>
- <%= @flavor.memory %> GB
- </dd>
- </di>
- <di>
- <dt>
- Storage
- </dt>
- <dd>
- <%= @flavor.storage %> GB
- </dd>
- </di>
-</dl>
diff --git a/server/libexec/app/views/flavors/show.html.haml b/server/libexec/app/views/flavors/show.html.haml
new file mode 100644
index 0000000..d81e75b
--- /dev/null
+++ b/server/libexec/app/views/flavors/show.html.haml
@@ -0,0 +1,16 @@
+%h1
+ = @flavor.id
+
+%dl
+ %di
+ %dt Architecture
+ %dd
+ = @flavor.architecture
+ %di
+ %dt Memory
+ %dd
+ = "#{(a)flavor.memory} GB"
+ %di
+ %dt Storage
+ %dd
+ = "#{(a)flavor.storage} GB"
diff --git a/server/libexec/app/views/hardware_profiles/index.html.haml b/server/libexec/app/views/hardware_profiles/index.html.haml
index 63fce7c..0c7503d 100644
--- a/server/libexec/app/views/hardware_profiles/index.html.haml
+++ b/server/libexec/app/views/hardware_profiles/index.html.haml
@@ -1,27 +1,30 @@
%h1
Hardware Profiles
-%table
- %tr
- %th
- Name
- %th
- Architecture
- %th
- Memory
- %th
- Storage
- %th
- Mutable
- - for profile in @profiles
+%table.display
+ %thead
%tr
- %td
- = link_to profile.name, hardware_profile_url( profile.name )
- %td
- = profile.architecture
- %td
- = format_hardware_aspect profile.memory
- %td
- = format_hardware_aspect profile.storage
- %td
- = profile.mutable?
+ %th
+ Name
+ %th
+ Architecture
+ %th
+ Memory
+ %th
+ Storage
+ %th
+ Mutable
+ %tbody
+ - for profile in @profiles
+ %tr
+ %td
+ = link_to profile.name, hardware_profile_url( profile.name )
+ %td
+ = profile.architecture
+ %td
+ = format_hardware_aspect profile.memory
+ %td
+ = format_hardware_aspect profile.storage
+ %td
+ = profile.mutable?
+
diff --git a/server/libexec/app/views/images/index.html.erb b/server/libexec/app/views/images/index.html.erb
deleted file mode 100644
index a353c7e..0000000
--- a/server/libexec/app/views/images/index.html.erb
+++ /dev/null
@@ -1,41 +0,0 @@
-
-<h1>Images</h1>
-
-<table>
- <tr>
- <th>
- ID
- </th>
- <th>
- Name
- </th>
- <th>
- Owner
- </th>
- <th>
- Architecture
- </th>
- <th>
- Description
- </th>
- </tr>
- <% for image in @images %>
- <tr>
- <td>
- <%= link_to image.id, image_url( image.id ) %>
- </td>
- <td>
- <%= image.name %>
- </td>
- <td>
- <%= link_to image.owner_id, images_url( :owner_id=>image.owner_id ) %>
- </td>
- <td>
- <%= image.architecture %>
- </td>
- <td>
- <%= image.description %>
- </td>
- </tr>
- <% end %>
-</table>
diff --git a/server/libexec/app/views/images/index.html.haml b/server/libexec/app/views/images/index.html.haml
new file mode 100644
index 0000000..f199402
--- /dev/null
+++ b/server/libexec/app/views/images/index.html.haml
@@ -0,0 +1,30 @@
+%h1
+ Images
+
+%table.display
+ %thead
+ %tr
+ %th
+ ID
+ %th
+ Name
+ %th
+ Owner
+ %th
+ Architecture
+ %th
+ Description
+ %tbody
+ - @images.each do |image|
+ %tr
+ %td
+ = link_to image.id, image_url(image.id)
+ %td
+ = image.name
+ %td
+ = link_to image.owner_id, images_url( :owner_id => image.owner_id )
+ %td
+ = image.architecture
+ %td
+ = image.description
+
diff --git a/server/libexec/app/views/images/show.html.erb b/server/libexec/app/views/images/show.html.erb
deleted file mode 100644
index 3d37143..0000000
--- a/server/libexec/app/views/images/show.html.erb
+++ /dev/null
@@ -1,42 +0,0 @@
-
-<h1>Image</h1>
-<h2><%= @image.id %></h2>
-
-<dl>
- <di>
- <dt>
- Name
- </dt>
- <dd>
- <%= @image.name %>
- </dd>
- </di>
- <di>
- <dt>
- Owner
- </dt>
- <dd>
- <%= link_to @image.owner_id, images_url( :owner_id=>@image.owner_id ) %>
- </dd>
- </di>
- <di>
- <dt>
- Architecture
- </dt>
- <dd>
- <%= @image.architecture %>
- </dd>
- </di>
- <di>
- <dt>
- Description
- </dt>
- <dd>
- <%= @image.description %>
- </dd>
- </di>
-</dl>
-
-<div>
- <%= link_to 'launch', new_instance_url( :image_id=>@image.id ) %>
-</div>
diff --git a/server/libexec/app/views/images/show.html.haml b/server/libexec/app/views/images/show.html.haml
new file mode 100644
index 0000000..f50f496
--- /dev/null
+++ b/server/libexec/app/views/images/show.html.haml
@@ -0,0 +1,22 @@
+%h1 Image
+%h2
+ = @image.id
+
+%dl
+ %di
+ %dt Name
+ %dd
+ = @image.name
+ %dt Owner
+ %dd
+ = link_to @image.owner_id, images_url( :owner_id => @image.owner_id )
+ %dt Architecture
+ %dd
+ = @image.architecture
+ %dt Description
+ %dd
+ = @image.description
+ %dt
+ %dd
+ = link_to 'Launch', new_instance_url( :image_id => @image.id )
+
diff --git a/server/libexec/app/views/instance_states/show.html.erb b/server/libexec/app/views/instance_states/show.html.erb
deleted file mode 100644
index 96bde93..0000000
--- a/server/libexec/app/views/instance_states/show.html.erb
+++ /dev/null
@@ -1,53 +0,0 @@
-
-<h1>Instance States</h1>
-
-<div id="state_graph">
- <%= image_tag url_for( :format=>:png ) %>
-</div>
-
-<table class="states">
- <tr>
- <th>
- Origin
- </th>
- <th>
- Action
- </th>
- <th>
- Destination
- </th>
- </tr>
- <% @machine.states.each do |state| %>
- <tr>
- <td rowspan="<%= state.transitions.empty? ? 2 : state.transitions.size + 1 %>" class="origin">
- <%= state %>
- </td>
- </tr>
- <% if ( state.transitions.empty? ) %>
- <tr>
- <td>
- --
- </td>
- <td>
- --
- </td>
- </tr>
- <% else %>
- <% state.transitions.each do |transition| %>
- <tr>
- <td>
- <% if ( transition.automatically? ) %>
- <em>auto</em>
- <% else %>
- <%= transition.action %>
- <% end %>
- </td>
- <td>
- <%= transition.destination %>
- </td>
- </tr>
- <% end %>
- <% end %>
- <% end %>
-</table>
-
diff --git a/server/libexec/app/views/instance_states/show.html.haml b/server/libexec/app/views/instance_states/show.html.haml
new file mode 100644
index 0000000..8bbc046
--- /dev/null
+++ b/server/libexec/app/views/instance_states/show.html.haml
@@ -0,0 +1,31 @@
+%h1 Instance States
+
+%div#state_graph
+ = image_tag url_for( :format => :png )
+
+%table.states
+ %thead
+ %tr
+ %th Origin
+ %th Action
+ %th Destination
+ %tbody
+ - @machine.states.each do |state|
+ %tr
+ %td.origin{:rowspan => "#{state.transitions.empty? ? 2 : (state.transitions.size + 1)}"}
+ = state
+ - if state.transitions.empty?
+ %tr
+ %td --
+ %td --
+ - else
+ - state.transitions.each do |transition|
+ %tr
+ %td
+ - if transition.automatically?
+ %em auto
+ - else
+ = transition.action
+ %td
+ = transition.destination
+
diff --git a/server/libexec/app/views/instances/index.html.erb b/server/libexec/app/views/instances/index.html.erb
deleted file mode 100644
index 4f1ffa3..0000000
--- a/server/libexec/app/views/instances/index.html.erb
+++ /dev/null
@@ -1,68 +0,0 @@
-<h1>Instances</h1>
-
-<table>
- <tr>
- <th>
- ID
- </th>
- <th>
- Owner
- </th>
- <th>
- Name
- </th>
- <th>
- Image
- </th>
- <th>
- Flavor
- </th>
- <th>
- Realm
- </th>
- <th>
- State
- </th>
- <th>
- Actions
- </th>
- </tr>
- <% for instance in @instances %>
- <tr>
- <td>
- <%= link_to instance.id, instance_url( instance.id ) %>
- </td>
- <td>
- <%= link_to instance.owner_id, images_url( :owner=>instance.owner_id ) %>
- </td>
- <td>
- <%= instance.name %>
- </td>
- <td>
- <%= link_to instance.image_id, image_url( instance.image_id ) %>
- </td>
- <td>
- <% if ( instance.flavor_id ) %>
- <%= link_to instance.flavor_id, flavor_url( instance.flavor_id ) %>
- <% else %>
- default
- <% end %>
- </td>
- <td>
- <% if ( instance.realm_id ) %>
- <%= link_to instance.realm_id, realm_url( instance.realm_id ) %>
- <% else %>
- default
- <% end %>
- </td>
- <td>
- <%= instance.state %>
- </td>
- <td>
- <% instance.actions.each do |action| %>
- <%= link_to action, self.send( "#{action}_instance_url", instance.id ), :method=>:post %>
- <% end %>
- </td>
- </tr>
- <% end %>
-</table>
diff --git a/server/libexec/app/views/instances/index.html.haml b/server/libexec/app/views/instances/index.html.haml
new file mode 100644
index 0000000..6d513b6
--- /dev/null
+++ b/server/libexec/app/views/instances/index.html.haml
@@ -0,0 +1,33 @@
+%h1 Instances
+
+%table.display
+ %thead
+ %tr
+ %th ID
+ %th Owner
+ %th Name
+ %th Image
+ %th Flavor
+ %th Realm
+ %th State
+ %th Actions
+ %tbody
+ - @instances.each do |instance|
+ %tr
+ %td
+ = link_to instance.id, instance_url( instance.id )
+ %td
+ = link_to instance.owner_id, images_url( instance.owner_id )
+ %td
+ = instance.name
+ %td
+ = link_to instance.image_id, image_url( instance.image_id )
+ %td
+ = instance.flavor_id ? link_to(instance.flavor_id, flavor_url(instance.flavor_url)) : default
+ %td
+ = instance.realm_id ? link_to(instance.realm_id, realm_url( instance.realm_id )) : default
+ %td
+ = instance.state
+ %td
+ = instance.actions.collect { |a| link_to(a, self.send("#{a}_instance_url", instance.id), :method => :post)}.join(' ')
+
diff --git a/server/libexec/app/views/instances/show.html.erb b/server/libexec/app/views/instances/show.html.erb
deleted file mode 100644
index 2f1d8a1..0000000
--- a/server/libexec/app/views/instances/show.html.erb
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-<h1><%= @instance.id %></h1>
-
-<dl>
- <di>
- <dt>
- Image
- </dt>
- <dd>
- <%= link_to @instance.image_id, image_url( @instance.image_id ) %>
- </dd>
- </di>
- <di>
- <dt>
- Owner
- </dt>
- <dd>
- <%= @instance.owner_id %>
- </dd>
- </di>
- <di>
- <dt>
- Name
- </dt>
- <dd>
- <%= @instance.name %>
- </dd>
- </di>
- <di>
- <dt>
- Flavor
- </dt>
- <dd>
- <% if ( @instance.flavor_id ) %>
- <%= link_to @instance.flavor_id, flavor_url( @instance.flavor_id ) %>
- <% else %>
- default
- <% end %>
- </dd>
- </di>
- <di>
- <dt>
- Realm
- </dt>
- <dd>
- <% if ( @instance.realm_id ) %>
- <%= link_to @instance.realm_id, realm_url( @instance.realm_id ) %>
- <% else %>
- default
- <% end %>
- </dd>
- </di>
- <di>
- <dt>
- State
- </dt>
- <dd>
- <%= @instance.state %>
- </dd>
- </di>
- <di>
- <dt>
- Public Addresses
- </dt>
- <dd>
- <% for address in @instance.public_addresses %>
- <div><%= address %></div>
- <% end %>
- </dd>
- </di>
- <di>
- <dt>
- Private Addresses
- </dt>
- <dd>
- <% for address in @instance.private_addresses %>
- <div><%= address %></div>
- <% end %>
- </dd>
- </di>
-</dl>
-
-<div>
- <% @instance.actions.each do |action| %>
- <%= link_to action, send( "#{action}_instance_url", @instance.id ), :method=>:post %>
- <% end %>
-</div>
diff --git a/server/libexec/app/views/instances/show.html.haml b/server/libexec/app/views/instances/show.html.haml
new file mode 100644
index 0000000..5ef1306
--- /dev/null
+++ b/server/libexec/app/views/instances/show.html.haml
@@ -0,0 +1,41 @@
+%h1
+ = @instance.id
+
+%dl
+ %di
+ %dt Image
+ %dd
+ = link_to @instance.image_id, image_url( @instance.image_id )
+ %di
+ %dt Owner
+ %dd
+ = @instance.owner_id
+ %di
+ %dt Name
+ %dd
+ = @instance.name
+ %di
+ %dt Flavor
+ %dd
+ = @instance.flavor_id ? link_to((a)instance.flavor_id, flavor_url((a)instance.flavor_id)) ? default
+ %di
+ %dt Realm
+ %dd
+ = @instance.realm_id ? link_to((a)instance.realm_id, realm_url((a)instance.realm_id)) ? default
+ %di
+ %dt State
+ %dd
+ = @instance.state
+ %di
+ %dt Public Addresses
+ %dd
+ = @instance.public_addresses.collect { |address| "<div>#{address}</div>" }.join
+ %di
+ %dt Private Addresses
+ %dd
+ = @instance.private_addresses.collect { |address| "<div>#{address}</div>" }.join
+ %di
+ %dt
+ %dd
+ = @instance.actions.collect { |action| link_to(action, send("#{action}_instance_url", @instance.id, :method => :post))}.join
+
diff --git a/server/libexec/app/views/layouts/application.html.haml b/server/libexec/app/views/layouts/application.html.haml
index 5a5e096..a218e22 100644
--- a/server/libexec/app/views/layouts/application.html.haml
+++ b/server/libexec/app/views/layouts/application.html.haml
@@ -19,6 +19,8 @@
#driver_info
Driver: #{DRIVER}
#copyright
- Copyright 2009 #{link_to 'Red Hat', 'http://redhat.com'} and individual contributors.
+ Copyright
+ = Time.now.year
+ #{link_to 'Red Hat', 'http://redhat.com'} and individual contributors.
diff --git a/server/libexec/app/views/realms/index.html.erb b/server/libexec/app/views/realms/index.html.erb
deleted file mode 100644
index 7be82b5..0000000
--- a/server/libexec/app/views/realms/index.html.erb
+++ /dev/null
@@ -1,35 +0,0 @@
-
-<h1>Realms</h1>
-
-<table>
- <tr>
- <th>
- ID
- </th>
- <th>
- Name
- </th>
- <th>
- State
- </th>
- <th>
- Limit
- </th>
- </tr>
- <% for realm in @realms %>
- <tr>
- <td>
- <%= link_to realm.id, realm_url( realm.id ) %>
- </td>
- <td>
- <%= realm.name %>
- </td>
- <td>
- <%= realm.state %>
- </td>
- <td>
- <%= realm.limit %>
- </td>
- </tr>
- <% end %>
-</table>
diff --git a/server/libexec/app/views/realms/index.html.haml b/server/libexec/app/views/realms/index.html.haml
new file mode 100644
index 0000000..cfee320
--- /dev/null
+++ b/server/libexec/app/views/realms/index.html.haml
@@ -0,0 +1,29 @@
+%h1
+ Realms
+
+%table.display
+ %thead
+ %tr
+ %th
+ Name
+ %th
+ Architecture
+ %th
+ Memory
+ %th
+ Storage
+ %th
+ Mutable
+ %tbody
+ - @realms.each do |realm|
+ %tr
+ %td
+ = link_to realm.id, realm_url( realm.id )
+ %td
+ = realm.name
+ %td
+ = realm.state
+ %td
+ = realm.limit
+ %td
+
diff --git a/server/libexec/app/views/realms/show.html.erb b/server/libexec/app/views/realms/show.html.erb
deleted file mode 100644
index e0e30d5..0000000
--- a/server/libexec/app/views/realms/show.html.erb
+++ /dev/null
@@ -1,28 +0,0 @@
-<h1><%= @realm.id %></h1>
-
-<dl>
- <di>
- <dt>
- Name
- </dt>
- <dd>
- <%= @realm.name %>
- </dd>
- </di>
- <di>
- <dt>
- State
- </dt>
- <dd>
- <%= @realm.state %>
- </dd>
- </di>
- <di>
- <dt>
- Limit
- </dt>
- <dd>
- <%= @realm.limit %>
- </dd>
- </di>
-</dl>
diff --git a/server/libexec/app/views/realms/show.html.haml b/server/libexec/app/views/realms/show.html.haml
new file mode 100644
index 0000000..4ed33ad
--- /dev/null
+++ b/server/libexec/app/views/realms/show.html.haml
@@ -0,0 +1,15 @@
+%h1
+ = @realm.id
+%dl
+ %di
+ %dt Name
+ %dd
+ = @realm.name
+ %di
+ %dt State
+ %dd
+ = @realm.state
+ %di
+ %dt Limit
+ %dd
+ = @realm.limit
diff --git a/server/libexec/app/views/root/index.html.erb b/server/libexec/app/views/root/index.html.erb
deleted file mode 100644
index 7f6d5d7..0000000
--- a/server/libexec/app/views/root/index.html.erb
+++ /dev/null
@@ -1,5 +0,0 @@
-
-<!-- <h1>δ-cloud-foundation</h1> -->
-<h1>Deltacloud: <%= DRIVER.to_s.titlecase %></h1>
-
-<%= link_to 'API', api_url %>
diff --git a/server/libexec/app/views/root/index.html.haml b/server/libexec/app/views/root/index.html.haml
new file mode 100644
index 0000000..4c350de
--- /dev/null
+++ b/server/libexec/app/views/root/index.html.haml
@@ -0,0 +1,4 @@
+%h1
+ Deltacloud:
+ = DRIVER.to_s.titlecase
+= link_to 'API', api_url
diff --git a/server/libexec/app/views/storage_snapshots/index.html.erb b/server/libexec/app/views/storage_snapshots/index.html.erb
deleted file mode 100644
index c00d2f5..0000000
--- a/server/libexec/app/views/storage_snapshots/index.html.erb
+++ /dev/null
@@ -1,35 +0,0 @@
-
-<h1>Storage Snapshots</h1>
-
-<table>
- <tr>
- <th>
- ID
- </th>
- <th>
- Volume
- </th>
- <th>
- Created
- </th>
- <th>
- State
- </th>
- </tr>
- <% for snapshot in @snapshots %>
- <tr>
- <td>
- <%= link_to snapshot.id, storage_snapshot_url( snapshot.id ) %>
- </td>
- <td>
- <%= link_to snapshot.storage_volume_id, storage_volume_url( snapshot.storage_volume_id ) %>
- </td>
- <td>
- <%= snapshot.created %>
- </td>
- <td>
- <%= snapshot.state %>
- </td>
- </tr>
- <% end %>
-</table>
diff --git a/server/libexec/app/views/storage_snapshots/index.html.haml b/server/libexec/app/views/storage_snapshots/index.html.haml
new file mode 100644
index 0000000..7633388
--- /dev/null
+++ b/server/libexec/app/views/storage_snapshots/index.html.haml
@@ -0,0 +1,20 @@
+%h1 Storage Snapshots
+
+%table
+ %thead
+ %tr
+ %th ID
+ %th Volume
+ %th Created
+ %th State
+ %tbody
+ - @snapshots.each do |snapshot|
+ %tr
+ %td
+ = link_to snapshot.id, storage_snapshot_url( snapshot.id )
+ %td
+ = link_to snapshot.storage_volume_id, storage_volume_url( snapshot.storage_volume_id )
+ %td
+ = snapshot.created
+ %td
+ = snapshot.state
diff --git a/server/libexec/app/views/storage_snapshots/show.html.erb b/server/libexec/app/views/storage_snapshots/show.html.erb
deleted file mode 100644
index 7087df1..0000000
--- a/server/libexec/app/views/storage_snapshots/show.html.erb
+++ /dev/null
@@ -1,29 +0,0 @@
-
-<h1><%= @snapshot.id %></h1>
-
-<dl>
- <di>
- <dt>
- Volume
- </dt>
- <dd>
- <%= @snapshot.storage_volume_id %>
- </dd>
- </di>
- <di>
- <dt>
- Created
- </dt>
- <dd>
- <%= @snapshot.created %>
- </dd>
- </di>
- <di>
- <dt>
- State
- </dt>
- <dd>
- <%= @snapshot.state %>
- </dd>
- </di>
-</dl>
diff --git a/server/libexec/app/views/storage_snapshots/show.html.haml b/server/libexec/app/views/storage_snapshots/show.html.haml
new file mode 100644
index 0000000..5cd1a95
--- /dev/null
+++ b/server/libexec/app/views/storage_snapshots/show.html.haml
@@ -0,0 +1,14 @@
+%h1
+ = @snapshot.id
+
+%dl
+ %di
+ %dt Volume
+ %dd
+ = @snapshot.storage_volume_id
+ %dt Created
+ %dd
+ = @snapshot.created
+ %dt State
+ %dd
+ = @snapshot.state
diff --git a/server/libexec/app/views/storage_volumes/index.html.erb b/server/libexec/app/views/storage_volumes/index.html.erb
deleted file mode 100644
index 5b0559c..0000000
--- a/server/libexec/app/views/storage_volumes/index.html.erb
+++ /dev/null
@@ -1,35 +0,0 @@
-
-<h1>Storage Volumes</h1>
-
-<table>
- <tr>
- <th>
- ID
- </th>
- <th>
- Created
- </th>
- <th>
- Capacity
- </th>
- <th>
- Status
- </th>
- </tr>
- <% for volume in @volumes %>
- <tr>
- <td>
- <%= link_to volume.id, storage_volume_url( volume.id ) %>
- </td>
- <td>
- <%= volume.created %>
- </td>
- <td>
- <%= volume.capacity %> GB
- </td>
- <td>
- <%= volume.state %>
- </td>
- </tr>
- <% end %>
-</table>
diff --git a/server/libexec/app/views/storage_volumes/index.html.haml b/server/libexec/app/views/storage_volumes/index.html.haml
new file mode 100644
index 0000000..7bee08f
--- /dev/null
+++ b/server/libexec/app/views/storage_volumes/index.html.haml
@@ -0,0 +1,21 @@
+%h1 Storage Volumes
+
+%table.display
+ %thead
+ %tr
+ %th ID
+ %th Created
+ %th Capacity
+ %th Status
+ %tbody
+ - @volumes.each do |volume|
+ %tr
+ %td
+ = link_to volume.id, storage_volume_url( volume.id )
+ %td
+ = volume.created
+ %td
+ = "#{volume.capacity} GB"
+ %td
+ = "#{volume.state}"
+
diff --git a/server/libexec/app/views/storage_volumes/show.html.erb b/server/libexec/app/views/storage_volumes/show.html.erb
deleted file mode 100644
index f524543..0000000
--- a/server/libexec/app/views/storage_volumes/show.html.erb
+++ /dev/null
@@ -1,39 +0,0 @@
-
-<h1><%= @volume.id %></h1>
-
-<dl>
- <di>
- <dt>
- Created
- </dt>
- <dd>
- <%= @volume.created %>
- </dd>
- </di>
- <di>
- <dt>
- Capacity
- </dt>
- <dd>
- <%= @volume.capacity %> GB
- </dd>
- </di>
- <di>
- <dt>
- State
- </dt>
- <dd>
- <%= @volume.state %>
- </dd>
- </di>
- <di>
- <dt>
- Attached
- </dt>
- <dd>
- <% if ( @volume.instance_id ) %>
- <%= link_to @volume.instance_id, instance_url( @volume.instance_id ) %> - <%= @volume.device %>
- <% end %>
- </dd>
- </di>
-</dl>
diff --git a/server/libexec/app/views/storage_volumes/show.html.haml b/server/libexec/app/views/storage_volumes/show.html.haml
new file mode 100644
index 0000000..4839ac3
--- /dev/null
+++ b/server/libexec/app/views/storage_volumes/show.html.haml
@@ -0,0 +1,20 @@
+%h1
+ = @volume.id
+
+%dl
+ %di
+ %dt Created
+ %dd
+ = @volume.created
+ %di
+ %dt Capacity
+ %dd
+ = "#{(a)volume.capacity} GB"
+ %di
+ %dt State
+ %dd
+ = @volume.state
+ %di
+ %dt Attached
+ %dd
+ = link_to((a)volume.instance_id, instance_url( @volume.instance_id)) + ' - ' + @volume.device.to_s if @volume.instance_id
--
1.6.6
14 years, 4 months
GoGrid.com driver for Deltacloud
by Michal Fojtik
Hi everyone,
I want to announce a new gogrid driver for Deltacloud.
Gogrid.com provide a Cloud hosting and it's fully supported
by 'right' gems (which we already using in EC2).
Patch contains a simple unit test file to test basic functionality.
(cd server/libexec && ruby lib/deltacloud/drivers/gogrid_test.rb)
Unfortunately, this test will fail in destroy, reboot and stop action,
because instance isn't ready for this actions yet.
To test those functions, you need wait for deployment and then explicitly
write a name of instance and run it again.
You could simply use this driver by applying a path (see attachment) and
then start Deltacloud API server with './bin/deltacloudd gogrid'.
Of course you need install a 'right_gogrid' gem first ;-)
- Michal
14 years, 4 months