Sha256: a3faa005948384702f46eaabc8a23557737866261786dc49550cfb8b547b0f07

Contents?: true

Size: 654 Bytes

Versions: 1

Compression:

Stored size: 654 Bytes

Contents

module Smartdc::Api
  module Machine
    class Tags
      attr_reader :request

      def initialize(id, options)
        @id = id
        @request = Smartdc::Request.new(options)
      end

      def create(raw={})
        request.post('my/machines/' + @id.to_s + '/tags/', raw)
      end
      
      def read(id)
        raise ArgumentError unless id
        request.get('my/machines/' + @id.to_s + '/tags/' + id.to_s)
      end

      def all(query={})
        request.get('my/machines/' + @id.to_s + '/tags', query)
      end

      def destroy(id=nil)
        request.del('my/machines/' + @id.to_s + '/tags/' + id.to_s)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
smartdc-1.3.0 lib/smartdc/api/machine/tags.rb