From bab1573f316ba3d74bf9f652de531d9daeb0857c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Fri, 10 Feb 2012 19:01:20 +0100 Subject: [PATCH] Feature #1112: Fix onedatastore show output --- src/cli/one_helper/onedatastore_helper.rb | 2 +- src/oca/ruby/OpenNebula/Datastore.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli/one_helper/onedatastore_helper.rb b/src/cli/one_helper/onedatastore_helper.rb index b0f6602c6c..4c642e818b 100644 --- a/src/cli/one_helper/onedatastore_helper.rb +++ b/src/cli/one_helper/onedatastore_helper.rb @@ -70,7 +70,7 @@ class OneDatastoreHelper < OpenNebulaHelper::OneHelper CLIHelper.print_header(str_h1 % "IMAGES", false) CLIHelper.print_header("%-15s" % ["ID"]) - datastore.user_ids.each do |id| + datastore.img_ids.each do |id| puts "%-15s" % [id] end end diff --git a/src/oca/ruby/OpenNebula/Datastore.rb b/src/oca/ruby/OpenNebula/Datastore.rb index a88a6b738b..75329f32af 100644 --- a/src/oca/ruby/OpenNebula/Datastore.rb +++ b/src/oca/ruby/OpenNebula/Datastore.rb @@ -86,10 +86,10 @@ module OpenNebula end # Returns an array with the numeric image ids - def user_ids + def img_ids array = Array.new - self.each("DATASTORE/ID") do |id| + self.each("IMAGES/ID") do |id| array << id.text.to_i end