mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
user/group id to name is no longer needed in cli
This commit is contained in:
parent
fc8b4093b2
commit
39cb1ea9c1
@ -160,6 +160,21 @@ EOT
|
||||
rid_to_str(:groups, gid, options)
|
||||
end
|
||||
|
||||
def user_name(resource, options={})
|
||||
if options[:numeric]
|
||||
resource['UID']
|
||||
else
|
||||
resource['UNAME']
|
||||
end
|
||||
end
|
||||
|
||||
def group_name(resource, options={})
|
||||
if options[:numeric]
|
||||
resource['GID']
|
||||
else
|
||||
resource['GNAME']
|
||||
end
|
||||
end
|
||||
########################################################################
|
||||
# Formatters for arguments
|
||||
########################################################################
|
||||
|
@ -68,8 +68,9 @@ class OneGroupHelper < OpenNebulaHelper::OneHelper
|
||||
d["NAME"]
|
||||
end
|
||||
|
||||
column :USER, "Username of the Group owner", :left, :size=>8 do |d|
|
||||
helper.uid_to_str(d["UID"], options)
|
||||
column :USER, "Username of the Group owner", :left,
|
||||
:size=>8 do |d|
|
||||
helper.user_name(d, options)
|
||||
end
|
||||
|
||||
default :ID, :USER, :NAME
|
||||
|
@ -87,12 +87,14 @@ class OneImageHelper < OpenNebulaHelper::OneHelper
|
||||
d["NAME"]
|
||||
end
|
||||
|
||||
column :USER, "Username of the Virtual Machine owner", :left, :size=>8 do |d|
|
||||
helper.uid_to_str(d["UID"], options)
|
||||
column :USER, "Username of the Virtual Machine owner", :left,
|
||||
:size=>8 do |d|
|
||||
helper.user_name(d, options)
|
||||
end
|
||||
|
||||
column :GROUP, "Group of the Virtual Machine", :left, :size=>8 do |d|
|
||||
helper.gid_to_str(d["GID"], options)
|
||||
column :GROUP, "Group of the Virtual Machine", :left,
|
||||
:size=>8 do |d|
|
||||
helper.group_name(d, options)
|
||||
end
|
||||
|
||||
column :TYPE, "Type of the Image", :size=>4 do |d,e|
|
||||
|
@ -66,12 +66,13 @@ class OneTemplateHelper < OpenNebulaHelper::OneHelper
|
||||
d["NAME"]
|
||||
end
|
||||
|
||||
column :USER, "Username of the Template owner", :left, :size=>8 do |d|
|
||||
helper.uid_to_str(d["UID"], options)
|
||||
column :USER, "Username of the Template owner", :left,
|
||||
:size=>8 do |d|
|
||||
helper.user_name(d, options)
|
||||
end
|
||||
|
||||
column :GROUP, "Group of the Template", :left, :size=>8 do |d|
|
||||
helper.gid_to_str(d["GID"], options)
|
||||
helper.group_name(d, options)
|
||||
end
|
||||
|
||||
column :REGTIME, "Registration time of the Template", :size=>20 do |d|
|
||||
|
@ -112,12 +112,14 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
|
||||
d["NAME"]
|
||||
end
|
||||
|
||||
column :USER, "Username of the Virtual Machine owner", :left, :size=>8 do |d|
|
||||
helper.uid_to_str(d["UID"], options)
|
||||
column :USER, "Username of the Virtual Machine owner", :left,
|
||||
:size=>8 do |d|
|
||||
helper.user_name(d, options)
|
||||
end
|
||||
|
||||
column :GROUP, "Group of the Virtual Machine", :left, :size=>8 do |d|
|
||||
helper.gid_to_str(d["GID"], options)
|
||||
column :GROUP, "Group of the Virtual Machine", :left,
|
||||
:size=>8 do |d|
|
||||
helper.group_name(d, options)
|
||||
end
|
||||
|
||||
column :STAT, "Actual status", :size=>4 do |d,e|
|
||||
|
@ -79,12 +79,14 @@ class OneVNetHelper < OpenNebulaHelper::OneHelper
|
||||
d["NAME"]
|
||||
end
|
||||
|
||||
column :USER, "Username of the Virtual Network owner", :left, :size=>8 do |d|
|
||||
helper.uid_to_str(d["UID"], options)
|
||||
column :USER, "Username of the Virtual Network owner", :left,
|
||||
:size=>8 do |d|
|
||||
helper.user_name(d, options)
|
||||
end
|
||||
|
||||
column :GROUP, "Group of the Virtual Network", :left, :size=>8 do |d|
|
||||
helper.gid_to_str(d["GID"], options)
|
||||
column :GROUP, "Group of the Virtual Network", :left,
|
||||
:size=>8 do |d|
|
||||
helper.group_name(d, options)
|
||||
end
|
||||
|
||||
column :TYPE, "Type of Virtual Network", :size=>6 do |d|
|
||||
|
Loading…
x
Reference in New Issue
Block a user