class AdminModule::Command::Snapshot
Public Instance Methods
export(filepath)
click to toggle source
# File lib/admin_module/command/snapshot.rb, line 59 def export filepath cl = client.snapshots cl.export filepath ensure client.logout end
import(filepath)
click to toggle source
# File lib/admin_module/command/snapshot.rb, line 42 def import filepath cl = client.snapshots cl.import filepath ensure client.logout end
list()
click to toggle source
# File lib/admin_module/command/snapshot.rb, line 23 def list cl = client.snapshots list = cl.list list.each { |item| say item; } ensure client.logout end
read(name)
click to toggle source
# File lib/admin_module/command/snapshot.rb, line 98 def read name cl = client.snapshots data = cl.read name output = Hash.new output[name] = data $stdout << output.to_yaml ensure client.logout end
rename(src, dest)
click to toggle source
# File lib/admin_module/command/snapshot.rb, line 77 def rename src, dest cl = client.snapshots cl.rename src, dest rescue ArgumentError => e say e.message, :red ensure client.logout end