Sha256: 732afc989a15401932bebe35472065a5a78e777388f2d45fe86cd8e40eb0212a
Contents?: true
Size: 758 Bytes
Versions: 11
Compression:
Stored size: 758 Bytes
Contents
require 'chef/knife/joyent_base' class Chef class Knife class JoyentTagList < Knife include Knife::JoyentBase banner "knife joyent tag list <server>" def run server = name_args.first unless server show_usage exit 1 end tags = [ ui.color('Name', :bold), ui.color('Value', :bold), ] self.connection.servers.get(server).tags.each do |k, v| tags << k tags << v end puts ui.list(tags, :uneven_columns_across, 2) exit 0 rescue Excon::Errors::NotFound => e puts ui.error("Server #{server} not found") exit 1 rescue => e output_error(e) end end end end
Version data entries
11 entries across 11 versions & 1 rubygems