mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
feature #200: Polishing the oneimage CLI
This commit is contained in:
parent
334ad65c82
commit
fecfa93cce
@ -75,8 +75,9 @@ ShowTableImage={
|
||||
:public => {
|
||||
:name => "PUBLIC",
|
||||
:desc => "Whether the Image is public or not",
|
||||
:size => 1,
|
||||
:proc => lambda {|d,e| if d["PUBLIC"].to_i == 1 then "Y" else "N" end}
|
||||
:size => 3,
|
||||
:proc => lambda {|d,e|
|
||||
if d["PUBLIC"].to_i == 1 then "Yes" else "No" end}
|
||||
},
|
||||
:state => {
|
||||
:name => "STAT",
|
||||
@ -367,7 +368,8 @@ when "register", "create", "add"
|
||||
result = image.enable
|
||||
else
|
||||
result=OpenNebula::Error.new(
|
||||
"Cannot copy image, please update before enabling it.")
|
||||
"Cannot copy image, aborting.")
|
||||
image.delete
|
||||
end
|
||||
end
|
||||
|
||||
@ -478,7 +480,6 @@ when "show"
|
||||
print_header(str_h1, "IMAGE #{image[:id]} INFORMATION", true)
|
||||
|
||||
puts str % ["ID", image[:id]]
|
||||
puts str % ["USER", image[:user]]
|
||||
puts str % ["NAME", image[:name]]
|
||||
puts str % ["TYPE", image.type_str]
|
||||
|
||||
@ -490,12 +491,12 @@ when "show"
|
||||
end
|
||||
puts str % ["REGISTER TIME", value]
|
||||
if image[:public].to_i == 1
|
||||
public_str = "Y"
|
||||
public_str = "Yes"
|
||||
else
|
||||
public_str = "N"
|
||||
public_str = "No"
|
||||
end
|
||||
puts str % ["PUBLIC", public_str]
|
||||
|
||||
puts str % ["PUBLIC", public_str]
|
||||
puts str % ["SOURCE", image[:source]]
|
||||
puts str % ["STATE", image.short_state_str]
|
||||
puts str % ["RUNNING_VMS", image[:runningvms]]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user