Sha256: 7c056389eea8efd293d1de0e7b169a9022ed3d08fb51b504ba456a16e97955a3

Contents?: true

Size: 603 Bytes

Versions: 10

Compression:

Stored size: 603 Bytes

Contents

require 'chef/knife/joyent_base'

class Chef
  class Knife
    class JoyentImageGet < Knife

      include Knife::JoyentBase

      banner "knife joyent image get <image_id>"

      def run
        unless name_args.size === 1
          show_usage
          exit 1
        end

        id = name_args.first
        # puts id
        res = self.connection.request(
          :method => "GET",
          :path => "/my/images/#{id}"
        )

        if res.status != 200
          output_error(res)
        else
          r = res.body
          ui.output(res.body)
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
knife-joyent-0.4.14 lib/chef/knife/joyent_image_get.rb
knife-joyent-0.4.12 lib/chef/knife/joyent_image_get.rb
knife-joyent-0.4.11 lib/chef/knife/joyent_image_get.rb
knife-joyent-0.4.10 lib/chef/knife/joyent_image_get.rb
knife-joyent-0.4.9 lib/chef/knife/joyent_image_get.rb
knife-joyent-0.4.8 lib/chef/knife/joyent_image_get.rb
knife-joyent-0.4.5 lib/chef/knife/joyent_image_get.rb
knife-joyent-0.4.4 lib/chef/knife/joyent_image_get.rb
knife-joyent-0.4.3 lib/chef/knife/joyent_image_get.rb
knife-joyent-0.4.2 lib/chef/knife/joyent_image_get.rb