You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by lu...@apache.org on 2010/07/09 01:49:03 UTC
svn commit: r962357 - in /incubator/deltacloud/trunk/server/views:
hardware_profiles/ images/ instances/ realms/ storage_snapshots/
storage_volumes/
Author: lutter
Date: Thu Jul 8 23:49:02 2010
New Revision: 962357
URL: http://svn.apache.org/viewvc?rev=962357&view=rev
Log:
Replaced ID element with ID attribute for all models
Modified:
incubator/deltacloud/trunk/server/views/hardware_profiles/index.xml.haml
incubator/deltacloud/trunk/server/views/hardware_profiles/show.xml.haml
incubator/deltacloud/trunk/server/views/images/index.xml.haml
incubator/deltacloud/trunk/server/views/images/show.xml.haml
incubator/deltacloud/trunk/server/views/instances/index.xml.haml
incubator/deltacloud/trunk/server/views/instances/show.html.haml
incubator/deltacloud/trunk/server/views/instances/show.xml.haml
incubator/deltacloud/trunk/server/views/realms/index.xml.haml
incubator/deltacloud/trunk/server/views/realms/show.xml.haml
incubator/deltacloud/trunk/server/views/storage_snapshots/index.xml.haml
incubator/deltacloud/trunk/server/views/storage_snapshots/show.xml.haml
incubator/deltacloud/trunk/server/views/storage_volumes/index.xml.haml
incubator/deltacloud/trunk/server/views/storage_volumes/show.xml.haml
Modified: incubator/deltacloud/trunk/server/views/hardware_profiles/index.xml.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/hardware_profiles/index.xml.haml?rev=962357&r1=962356&r2=962357&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/hardware_profiles/index.xml.haml (original)
+++ incubator/deltacloud/trunk/server/views/hardware_profiles/index.xml.haml Thu Jul 8 23:49:02 2010
@@ -1,4 +1,4 @@
!!! XML
-%hardware-profiles
+%hardware_profiles
- @profiles.each do |prof|
= haml :'hardware_profiles/show', :locals => { :@profile => prof, :partial => true }
Modified: incubator/deltacloud/trunk/server/views/hardware_profiles/show.xml.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/hardware_profiles/show.xml.haml?rev=962357&r1=962356&r2=962357&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/hardware_profiles/show.xml.haml (original)
+++ incubator/deltacloud/trunk/server/views/hardware_profiles/show.xml.haml Thu Jul 8 23:49:02 2010
@@ -1,7 +1,6 @@
- unless defined?(partial)
!!! XML
-%hardware-profile{ :href => hardware_profile_url(@profile.name) }
- %id= @profile.name
+%hardware_profile{ :href => hardware_profile_url(@profile.name), :id => @profile.name }
- @profile.each_property do |prop|
- attr = { :name => prop.name, :kind => prop.kind, :unit => prop.unit }
- if prop.kind == :fixed
Modified: incubator/deltacloud/trunk/server/views/images/index.xml.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/images/index.xml.haml?rev=962357&r1=962356&r2=962357&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/images/index.xml.haml (original)
+++ incubator/deltacloud/trunk/server/views/images/index.xml.haml Thu Jul 8 23:49:02 2010
@@ -1,7 +1,8 @@
!!! XML
%images
- @elements.each do |image|
- %image{:href => image_url(image.id)}
- - image.attributes.each do |attribute|
- - haml_tag(attribute, :<) do
+ %image{:href => image_url(image.id), :id => image.id}
+ - image.attributes.select{ |attr| attr!=:id }.each do |attribute|
+ - haml_tag("#{attribute}".tr('-', '_'), :<) do
- haml_concat image.send(attribute)
+
Modified: incubator/deltacloud/trunk/server/views/images/show.xml.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/images/show.xml.haml?rev=962357&r1=962356&r2=962357&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/images/show.xml.haml (original)
+++ incubator/deltacloud/trunk/server/views/images/show.xml.haml Thu Jul 8 23:49:02 2010
@@ -1,5 +1,5 @@
!!! XML
-%image{:href => image_url(@image.id)}
- - @image.attributes.each do |attribute|
+%image{:href => image_url(@image.id), :id => @image.id}
+ - @image.attributes.select{ |attr| attr!=:id }.each do |attribute|
- haml_tag(attribute, :<) do
- haml_concat @image.send(attribute)
Modified: incubator/deltacloud/trunk/server/views/instances/index.xml.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/instances/index.xml.haml?rev=962357&r1=962356&r2=962357&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/instances/index.xml.haml (original)
+++ incubator/deltacloud/trunk/server/views/instances/index.xml.haml Thu Jul 8 23:49:02 2010
@@ -1,23 +1,21 @@
!!! XML
%instances
- @elements.each do |instance|
- %instance{:href => instance_url(instance.id)}
- %id #{instance.id}
+ %instance{:href => instance_url(instance.id), :id => instance.id}
%name #{instance.name}
%owner_id #{instance.owner_id}
- %image{:href => image_url(instance.image_id)}
- %realm{:href => realm_url(instance.realm_id)}
+ %image{:href => image_url(instance.image_id), :id => instance.image_id }
+ %realm{:href => realm_url(instance.realm_id), :id => instance.realm_id }
%state #{instance.state}
- - haml_tag :"hardware-profile", { :href => hardware_profile_url(instance.instance_profile.id)} do
- %id #{instance.instance_profile.id}
+ - 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)}
%actions
- instance.actions.compact.each do |action|
%link{:rel => action, :href => self.send("#{action}_instance_url", instance.id), :method => instance_action_method(action)}
- %public-addresses
+ %public_addresses
- instance.public_addresses.each do |address|
%address #{address}
- %private-addresses
+ %private_addresses
- instance.private_addresses.each do |address|
%address #{address}
Modified: incubator/deltacloud/trunk/server/views/instances/show.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/instances/show.html.haml?rev=962357&r1=962356&r2=962357&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/instances/show.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/instances/show.html.haml Thu Jul 8 23:49:02 2010
@@ -36,11 +36,6 @@
%dt Private Addresses
%dd
= @instance.private_addresses.collect { |address| "<div>#{address}</div>" }.join
- - unless @instance.launch_time.nil?
- %di
- %dt Launch Time
- %dd
- = @instance.launch_time
%di
%dt
%dd
Modified: incubator/deltacloud/trunk/server/views/instances/show.xml.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/instances/show.xml.haml?rev=962357&r1=962356&r2=962357&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/instances/show.xml.haml (original)
+++ incubator/deltacloud/trunk/server/views/instances/show.xml.haml Thu Jul 8 23:49:02 2010
@@ -1,34 +1,27 @@
!!! XML
-%instance{:href => instance_url(@instance.id)}
- %id<
- =@instance.id
+%instance{:href => instance_url(@instance.id), :id => @instance.id}
%name<
=@instance.name
%owner_id<
=@instance.owner_id
- %image{:href => image_url(@instance.image_id)}
- %realm{:href => realm_url(@instance.realm_id)}
+ %image{:href => image_url(@instance.image_id), :id => @instance.image_id }
+ %realm{:href => realm_url(@instance.realm_id), :id => @instance.realm_id }
%state<
=@instance.state
- - haml_tag :"hardware-profile", {:href => hardware_profile_url(@instance.instance_profile.id)} do
- %id<
- =@instance.instance_profile.id
+ - 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)}
%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)}
- %public-addresses
+ %public_addresses
- @instance.public_addresses.each do |address|
%address<
=address
- %private-addresses
+ %private_addresses
- @instance.private_addresses.each do |address|
%address<
=address
- - unless @instance.launch_time.nil?
- %launch-time<
- =@instance.launch_time
- if driver_has_auth_features?
%authentication{ :type => driver_auth_feature_name }
- if @instance.authn_feature_failed?
Modified: incubator/deltacloud/trunk/server/views/realms/index.xml.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/realms/index.xml.haml?rev=962357&r1=962356&r2=962357&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/realms/index.xml.haml (original)
+++ incubator/deltacloud/trunk/server/views/realms/index.xml.haml Thu Jul 8 23:49:02 2010
@@ -1,9 +1,7 @@
!!!XML
%realms
- @elements.each do |realm|
- %realm{:href => realm_url(realm.id)}
- %id<
- =realm.id
+ %realm{:href => realm_url(realm.id), :id => realm.id }
%name<
=realm.name
%state<
Modified: incubator/deltacloud/trunk/server/views/realms/show.xml.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/realms/show.xml.haml?rev=962357&r1=962356&r2=962357&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/realms/show.xml.haml (original)
+++ incubator/deltacloud/trunk/server/views/realms/show.xml.haml Thu Jul 8 23:49:02 2010
@@ -1,10 +1,9 @@
!!!XML
-%realm{:href => realm_url(@realm.id)}
- %id<
- =@realm.id
+%realm{:href => realm_url(@realm.id), :id => @realm.id }
%name<
=@realm.name
%state<
=@realm.state
- %limit<
- =@realm.limit.eql?(:unlimited) ? '' : @realm.limit
+ - unless @realm.limit.eql?(:unlimited)
+ %limit<
+ =@realm.limit
Modified: incubator/deltacloud/trunk/server/views/storage_snapshots/index.xml.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/storage_snapshots/index.xml.haml?rev=962357&r1=962356&r2=962357&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/storage_snapshots/index.xml.haml (original)
+++ incubator/deltacloud/trunk/server/views/storage_snapshots/index.xml.haml Thu Jul 8 23:49:02 2010
@@ -1,11 +1,9 @@
!!!XML
-%storage-snapshots
+%storage_snapshots
- @elements.each do |snapshot|
- %storage-snapshot{ :href => storage_snapshot_url(snapshot.id)}
- %id<
- =snapshot.id
+ %storage_snapshot{ :href => storage_snapshot_url(snapshot.id), :id => snapshot.id }
%created<
=snapshot.created
%state<
=snapshot.state
- %storage-volume{ :href => storage_volume_url(snapshot.storage_volume_id)}
+ %storage_volume{ :href => storage_volume_url(snapshot.storage_volume_id), :id => snapshot.storage_volume_id }
Modified: incubator/deltacloud/trunk/server/views/storage_snapshots/show.xml.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/storage_snapshots/show.xml.haml?rev=962357&r1=962356&r2=962357&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/storage_snapshots/show.xml.haml (original)
+++ incubator/deltacloud/trunk/server/views/storage_snapshots/show.xml.haml Thu Jul 8 23:49:02 2010
@@ -1,9 +1,7 @@
!!!XML
-%storage-snapshot{:href => storage_snapshot_url(@storage_snapshot.id)}
- %id<
- =@storage_snapshot.id
+%storage_snapshot{:href => storage_snapshot_url(@storage_snapshot.id), :id => @storage_snapshot.id }
%created<
=@storage_snapshot.created
%state<
=@storage_snapshot.state
- %storage-volume{:href => storage_volume_url(@storage_snapshot.storage_volume_id)}
+ %storage_volume{:href => storage_volume_url(@storage_snapshot.storage_volume_id), :id => @storage_snapshot.storage_volume_id}
Modified: incubator/deltacloud/trunk/server/views/storage_volumes/index.xml.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/storage_volumes/index.xml.haml?rev=962357&r1=962356&r2=962357&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/storage_volumes/index.xml.haml (original)
+++ incubator/deltacloud/trunk/server/views/storage_volumes/index.xml.haml Thu Jul 8 23:49:02 2010
@@ -1,13 +1,13 @@
!!!XML
-%storage-volumes
+%storage_volumes
- @elements.each do |volume|
- %storage-volume{ :href => storage_volume_url(volume.id)}
- %id<
- =volume.id
+ %storage_volume{ :href => storage_volume_url(volume.id), :id => volume.id }
%created<
=volume.created
%capacity<
=volume.capacity
- %device<
- =volume.device
- %instance{:href => volume.instance_id}
+ - unless volume.device.nil?
+ %device<
+ =volume.device
+ - unless volume.instance_id.nil?
+ %instance{:href => instance_url(volume.instance_id), :id => volume.instance_id}
Modified: incubator/deltacloud/trunk/server/views/storage_volumes/show.xml.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/storage_volumes/show.xml.haml?rev=962357&r1=962356&r2=962357&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/storage_volumes/show.xml.haml (original)
+++ incubator/deltacloud/trunk/server/views/storage_volumes/show.xml.haml Thu Jul 8 23:49:02 2010
@@ -1,5 +1,5 @@
!!!XML
-%storage-volume{ :href => storage_volume_url(@storage_volume.id)}
+%storage_volume{ :href => storage_volume_url(@storage_volume.id)}
%id<
=@storage_volume.id
%created<
@@ -10,4 +10,4 @@
=@storage_volume.device
%state<
=@storage_volume.state
- %instance{:href => @storage_volume.instance_id}
+ %instance{:href => @storage_volume.instance_id, :id => @storage_volume.instance_id}