deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 3/5] Client: Added #url method to all client objects
Date Wed, 03 Apr 2013 14:20:02 GMT
From: Michal Fojtik <mfojtik@redhat.com>


Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 client/lib/deltacloud/client/models/base.rb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/client/lib/deltacloud/client/models/base.rb b/client/lib/deltacloud/client/models/base.rb
index dbf34f7..cfdab5d 100644
--- a/client/lib/deltacloud/client/models/base.rb
+++ b/client/lib/deltacloud/client/models/base.rb
@@ -27,6 +27,7 @@ module Deltacloud::Client
     # - obj_id -> The :id of Deltacloud API model (eg. instance ID)
     #
     attr_reader :obj_id
+    attr_reader :url
     attr_reader :name
     attr_reader :description
 
@@ -122,6 +123,7 @@ module Deltacloud::Client
         attrs = parse(body)
         attrs.merge!({
           :_id => body['id'],
+          :url => body['href'],
           :_client => client_ref,
           :name => body.text_at(:name),
           :description => body.text_at(:description)
-- 
1.8.1.4


Mime
View raw message