Sha256: efd1ad315dfb3b3b92c6092658e2fae8e5855c9d3f889a944ab5d88341e83aa6
Contents?: true
Size: 619 Bytes
Versions: 11
Compression:
Stored size: 619 Bytes
Contents
require 'chef/knife/joyent_base' class Chef class Knife class JoyentSnapshotDelete < Knife include Knife::JoyentBase banner 'knife joyent snapshot delete <server> <snapshot_name>' def run unless name_args.size == 2 show_usage exit 1 end server = name_args[0] ssname = name_args[1] snapshot = self.connection.snapshots.get(server, ssname) snapshot.destroy puts ui.color("Deleted snapshot #{snapshot.name}", :cyan) exit 0 rescue => e output_error(e) exit 1 end end end end
Version data entries
11 entries across 11 versions & 1 rubygems