Sha256: 0f559ad0e0b5e2e4e363a1eebc9a18ce1db5a282a64bbd1c1cd3fd2731b76624

Contents?: true

Size: 663 Bytes

Versions: 1

Compression:

Stored size: 663 Bytes

Contents

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

      def initialize(request, id1, id)
        @request = request
        @id1 = id1
        @id = id
      end

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

      def find(params={})
        request.get('my/machines/' + @id1.to_s + '/tags', params)
      end

      def delete
        request.delete('my/machines/' + @id1.to_s + '/tags/' + id.to_s)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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