deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [1/2] git commit: Client: Explicitly convert the name and id in Instance formatter to String (DTACLOUD-27)
Date Mon, 30 Apr 2012 10:17:27 GMT
Updated Branches:
  refs/heads/master c13da7b50 -> 86d3b8f0a


Client: Explicitly convert the name and id in Instance formatter to String (DTACLOUD-27)


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/86d3b8f0
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/86d3b8f0
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/86d3b8f0

Branch: refs/heads/master
Commit: 86d3b8f0a21af13835c923aa8fb96239d1ed8e1f
Parents: 1a4b46e
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Thu Apr 26 16:25:40 2012 +0200
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Thu Apr 26 16:25:40 2012 +0200

----------------------------------------------------------------------
 client/lib/plain_formatter.rb |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/86d3b8f0/client/lib/plain_formatter.rb
----------------------------------------------------------------------
diff --git a/client/lib/plain_formatter.rb b/client/lib/plain_formatter.rb
index a8a501e..2e2ada3 100644
--- a/client/lib/plain_formatter.rb
+++ b/client/lib/plain_formatter.rb
@@ -68,9 +68,9 @@ module DeltaCloud
       class Instance < Base
         def format
           sprintf("%-15s | %-15s | %-15s | %10s | %32s | %32s",
-            @obj.id ? @obj.id[0,15] : '-',
-            @obj.name ? @obj.name[0,15] : 'unknown',
-            @obj.image.name ? @obj.image.name[0,15] : 'unknown',
+            @obj.id ? @obj.id.to_s[0,15] : '-',
+            @obj.name ? @obj.name.to_s[0,15] : 'unknown',
+            @obj.image.name ? @obj.image.name.to_s[0,15] : 'unknown',
             @obj.state ? @obj.state.to_s[0,10] : 'unknown',
             @obj.public_addresses.collect { |a| a[:address] }.join(',')[0,32],
             @obj.private_addresses.collect { |a| a[:address] }.join(',')[0,32]


Mime
View raw message