mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Add User/Group list to the show command
This commit is contained in:
parent
e0e5b17310
commit
ceacce79c9
@ -50,9 +50,10 @@ class OneGroupHelper < OpenNebulaHelper::OneHelper
|
||||
puts str % ["NAME", group.name]
|
||||
puts
|
||||
|
||||
CLIHelper.print_header(str_h1 % "USERS",false)
|
||||
CLIHelper.print_header(str_h1 % "USERS", false)
|
||||
CLIHelper.print_header("%-15s %-20s" % ["ID","NAME"])
|
||||
group.user_ids.each do |uid|
|
||||
puts str % ["ID", uid]
|
||||
puts "%-15s %-20s" % [uid, self.uid_to_str(uid.to_s)]
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -70,14 +70,15 @@ class OneUserHelper < OpenNebulaHelper::OneHelper
|
||||
CLIHelper.print_header(str_h1 % "USER #{user['ID']} INFORMATION")
|
||||
puts str % ["ID", user.id.to_s]
|
||||
puts str % ["NAME", user.name]
|
||||
puts str % ["GROUP", user.gid]
|
||||
puts str % ["MAIN_GROUP", user.gid]
|
||||
puts str % ["PASSWORD", user['PASSWORD']]
|
||||
puts str % ["ENABLED", user['ENABLED']]
|
||||
puts
|
||||
|
||||
CLIHelper.print_header(str_h1 % "SECONDARY GROUPS",false)
|
||||
CLIHelper.print_header(str_h1 % "GROUPS", false)
|
||||
CLIHelper.print_header("%-15s %-20s" % ["ID","NAME"])
|
||||
user.group_ids.each do |gid|
|
||||
puts str % ["ID", uid]
|
||||
puts "%-15s %-20s" % [gid, self.gid_to_str(gid.to_s)]
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user