deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 6/9] CIMI: Added Service::Base#parse method
Date Fri, 01 Mar 2013 13:32:26 GMT
From: Michal Fojtik <mfojtik@redhat.com>

Make possible to call .parse on Service models from
Rabbit collections.

Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/lib/cimi/service/base.rb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/server/lib/cimi/service/base.rb b/server/lib/cimi/service/base.rb
index 9f2c765..8fbf256 100644
--- a/server/lib/cimi/service/base.rb
+++ b/server/lib/cimi/service/base.rb
@@ -50,6 +50,11 @@ module CIMI::Service
           define_method(:"#{name}=") { |newval| self[name] = newval }
         end
       end
+
+      def parse(text, content_type)
+        model_class.parse(text, content_type)
+      end
+
     end
 
     def initialize(context, opts)
-- 
1.8.1.2


Mime
View raw message