deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@redhat.com
Subject [PATCH 2/2] Deltacloud - remove unused 'resource_types' attribute from Realm model part of DTACLOUD-488 https://issues.apache.org/jira/browse/DTACLOUD-488
Date Tue, 19 Feb 2013 16:44:02 GMT
From: marios <marios@redhat.com>

API-Change: remove unused 'resource_types' attribute from Realm

Signed-off-by: marios <marios@redhat.com>
---
 server/lib/deltacloud/models/realm.rb | 7 -------
 server/views/realms/index.html.haml   | 2 --
 server/views/realms/show.html.haml    | 4 ----
 server/views/realms/show.xml.haml     | 3 ---
 4 files changed, 16 deletions(-)

diff --git a/server/lib/deltacloud/models/realm.rb b/server/lib/deltacloud/models/realm.rb
index ce1ac26..d6e050f 100644
--- a/server/lib/deltacloud/models/realm.rb
+++ b/server/lib/deltacloud/models/realm.rb
@@ -20,12 +20,6 @@ class Realm < BaseModel
   attr_accessor :name
   attr_accessor :limit
   attr_accessor :state
-  attr_accessor :resource_types
-
-  def initialize(init=nil)
-    super(init)
-    self.resource_types ||= []
-  end
 
   def to_hash(context)
     r = {
@@ -35,7 +29,6 @@ class Realm < BaseModel
       :state => state,
       :limit => limit
     }
-    r.merge!({:resource_types => resource_types}) if resource_types
     r
   end
 
diff --git a/server/views/realms/index.html.haml b/server/views/realms/index.html.haml
index 91636a8..5e91e56 100644
--- a/server/views/realms/index.html.haml
+++ b/server/views/realms/index.html.haml
@@ -10,6 +10,4 @@
           %img{ :class => 'ui-link-thumb', :src => '/images/realm.png'}
           %h3= realm.name
           %p=[realm.id, realm.limit].join(', ')
-          -if realm.resource_types
-            %p=realm.resource_types.join(",")
           %span{ :class => 'ui-li-count'}=realm.state
diff --git a/server/views/realms/show.html.haml b/server/views/realms/show.html.haml
index e1c16d4..f2c52f7 100644
--- a/server/views/realms/show.html.haml
+++ b/server/views/realms/show.html.haml
@@ -15,7 +15,3 @@
     %li{ :'data-role' => 'list-divider'} Limit
     %li
       %p{ :'data-role' => 'fieldcontain'}=@realm.limit
-    - if @realm.resource_types
-      %li{ :'data-role' => 'list-divider'} Resource Types
-      %li
-        %p{ :'data-role' => 'fieldcontain'}=@realm.resource_types
diff --git a/server/views/realms/show.xml.haml b/server/views/realms/show.xml.haml
index 268cb65..5c06c06 100644
--- a/server/views/realms/show.xml.haml
+++ b/server/views/realms/show.xml.haml
@@ -9,6 +9,3 @@
     %limit<
       =cdata do
         =@realm.limit
-  - @realm.resource_types.each do |r|
-    %resource_type<
-      =r
-- 
1.7.11.7


Mime
View raw message