1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

Bug #3861: Fix etc file paths for oneacct

This commit is contained in:
Carlos Martín 2015-07-03 10:41:53 +02:00
parent 880c553a60
commit 6e687abef5
2 changed files with 5 additions and 5 deletions

View File

@ -649,13 +649,13 @@ user #{self.rname} of the user identified by the username
EOT
end
def self.table_conf
path = "#{ENV["HOME"]}/.one/cli/#{self.conf_file}"
def self.table_conf(conf_file=self.conf_file)
path = "#{ENV["HOME"]}/.one/cli/#{conf_file}"
if File.exists?(path)
return path
else
return "#{TABLE_CONF_PATH}/#{self.conf_file}"
return "#{TABLE_CONF_PATH}/#{conf_file}"
end
end

View File

@ -114,7 +114,7 @@ class AcctHelper < OpenNebulaHelper::OneHelper
ACCT_OPTIONS = [START_TIME_ACCT, END_TIME_ACCT, USERFILTER, GROUP, HOST, XPATH, XML, JSON, SPLIT]
SHOWBACK_OPTIONS = [START_TIME_SHOWBACK, END_TIME_SHOWBACK, USERFILTER, GROUP, XML, JSON]
ACCT_TABLE = CLIHelper::ShowTable.new("oneacct.yaml", nil) do
ACCT_TABLE = CLIHelper::ShowTable.new(self.table_conf("oneacct.yaml"), nil) do
column :UID, "User ID", :size=>4 do |d|
d["UID"]
end
@ -190,7 +190,7 @@ class AcctHelper < OpenNebulaHelper::OneHelper
default :VID, :HOSTNAME, :ACTION, :REASON, :START_TIME, :END_TIME, :MEMORY, :CPU, :NETRX, :NETTX, :TOTAL_DISK_SIZE
end
SHOWBACK_TABLE = CLIHelper::ShowTable.new("oneshowback.yaml", nil) do
SHOWBACK_TABLE = CLIHelper::ShowTable.new(self.table_conf("oneshowback.yaml"), nil) do
column :UID, "User ID", :size=>4 do |d|
d["UID"]
end