Sha256: dd0e3a4b74415b55ac0b84e379180b1f32c3c8c0050534439a88966c92f53029

Contents?: true

Size: 529 Bytes

Versions: 1

Compression:

Stored size: 529 Bytes

Contents

module Smartdc::Api
  module Machine
    class Metadata
      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 + '/metadata/', raw)
      end

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

      def destroy(id=nil)
        request.del('my/machines/' + @id.to_s + '/metadata/' + 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/metadata.rb